Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
logiciels:amber [2016/06/10 15:01] 164.81.157.90 |
logiciels:amber [2016/06/10 15:08] (Version actuelle) 164.81.157.90 |
||
---|---|---|---|
Ligne 38: | Ligne 38: | ||
==== Serial ==== | ==== Serial ==== | ||
- | < | ||
- | #!/bin/bash | ||
- | #SBATCH --nodes=1 | + | # |
- | #SBATCH --ntasks=1 | + | |
- | #SBATCH --time=02: | + | #SBATCH --ntasks=1 |
- | #SBATCH --partition=normal | + | #SBATCH --time=02: |
- | #SBATCH --cpus-per-task=1 | + | #SBATCH --partition=normal |
- | #SBATCH --mem-per-cpu=2000 | + | #SBATCH --cpus-per-task=1 |
+ | #SBATCH --mem-per-cpu=2000 | ||
+ | topname=del | ||
+ | crdname=del | ||
+ | CURR=$(pwd) | ||
+ | RESTART=YES | ||
+ | STEP=0 | ||
+ | FINAL=1 | ||
+ | module load amber/ | ||
+ | # MD are performed in Scratch | ||
+ | # Export running directectory | ||
+ | export RUN_DIR=" | ||
+ | # Link the scratch directory to the current directory | ||
+ | # Link name is related to JOB ID and NOT TO JOBNAME --> Prevent issues related to new MDs with same name | ||
+ | ln -sfn ${RUN_DIR} ${SLURM_JOB_ID}.results | ||
+ | echo ${RUN_DIR} | ||
+ | # Create Scratch directory | ||
+ | mkdir -p ${RUN_DIR} | ||
+ | # Copy Topology and CRD names into Scratch directory | ||
+ | cp ${topname}.prmtop *.in ${RUN_DIR} | ||
+ | # Copy starting CRD files according to restart procedure or not | ||
+ | if [ $RESTART = ' | ||
+ | cp ${topname}_md${STEP}.rst ${RUN_DIR}/ | ||
+ | else | ||
+ | STEP=0 | ||
+ | cp ${topname}.inpcrd ${RUN_DIR}/ | ||
+ | fi | ||
+ | # Enter into Scratch directory | ||
+ | cd ${RUN_DIR} | ||
+ | # Run calculation | ||
+ | # Keep in mind: Never run a long MD into a single trajectory file - Split it into several trajectories | ||
+ | for i in `seq $STEP 1 $FINAL` | ||
+ | do | ||
+ | j=$(( $i + 1 )) | ||
+ | # Run MD | ||
+ | pmemd -O -i md.in -o ${crdname}_md${j}.out -p $topname.prmtop -c ${crdname}_md${i}.rst -r ${crdname}_md${j}.rst -x ${crdname}_${j}.mdcrd | ||
+ | # Compress mdcrd file to prevent storage issues and remove the uncompressed trajectory | ||
+ | tar -zcvf ${crdname}_${j}.mdcrd.tar.gz ${crdname}_${j}.mdcrd | ||
+ | rm -rf ${crdname}_${j}.mdcrd | ||
+ | done | ||
- | topname=del | + | ==== MPI ==== |
- | crdname=del | + | |
- | CURR=$(pwd) | + | |
- | RESTART=YES | + | |
- | STEP=0 | + | |
- | FINAL=1 | + | |
- | module load amber/ | + | # |
+ | #SBATCH --nodes=1-X | ||
+ | #SBATCH --ntasks=X | ||
+ | #SBATCH --time=XX: | ||
+ | #SBATCH --partition=normal | ||
+ | #SBATCH --cpus-per-task=1 | ||
+ | #SBATCH --mem-per-cpu=XXX | ||
+ | topname=del | ||
+ | crdname=del | ||
+ | CURR=$(pwd) | ||
+ | RESTART=YES | ||
+ | STEP=0 | ||
+ | FINAL=1 | ||
+ | | ||
+ | # MD are performed in Scratch | ||
+ | # Export running directectory | ||
+ | export RUN_DIR=" | ||
+ | # Link the scratch directory to the current directory | ||
+ | # Link name is related to JOB ID and NOT TO JOBNAME --> Prevent issues related to new MDs with same name | ||
+ | ln -sfn ${RUN_DIR} ${SLURM_JOB_ID}.results | ||
+ | echo ${RUN_DIR} | ||
+ | # Create Scratch directory | ||
+ | mkdir -p ${RUN_DIR} | ||
+ | # Copy Topology and CRD names into Scratch directory | ||
+ | cp ${topname}.prmtop *.in ${RUN_DIR} | ||
+ | # Copy starting CRD files according to restart procedure or not | ||
+ | if [ $RESTART = ' | ||
+ | cp ${topname}_md${STEP}.rst ${RUN_DIR}/ | ||
+ | else | ||
+ | STEP=0 | ||
+ | cp ${topname}.inpcrd ${RUN_DIR}/ | ||
+ | fi | ||
+ | # Enter into Scratch directory | ||
+ | cd ${RUN_DIR} | ||
+ | # Run calculation | ||
+ | # Keep in mind: Never run a long MD into a single trajectory file - Split it into several trajectories | ||
+ | for i in `seq $STEP 1 $FINAL` | ||
+ | do | ||
+ | j=$(( $i + 1 )) | ||
+ | # Run MD | ||
+ | srun premed.MPI -O -i md.in -o ${crdname}_md${j}.out -p $topname.prmtop -c ${crdname}_md${i}.rst -r ${crdname}_md${j}.rst -x ${crdname}_${j}.mdcrd | ||
+ | # Compress mdcrd file to prevent storage issues and remove the uncompressed trajectory | ||
+ | tar -zcvf ${crdname}_${j}.mdcrd.tar.gz ${crdname}_${j}.mdcrd | ||
+ | rm -rf ${crdname}_${j}.mdcrd | ||
+ | done | ||
- | # MD are performed in Scratch | + | ==== GPU ==== |
- | # Export running directectory | + | |
- | export RUN_DIR=" | + | |
- | + | ||
- | # Link the scratch directory to the current directory | + | |
- | # Link name is related to JOB ID and NOT TO JOBNAME --> Prevent issues related to new MDs with same name | + | |
- | ln -sfn ${RUN_DIR} ${SLURM_JOB_ID}.results | + | |
- | echo ${RUN_DIR} | + | |
- | + | ||
- | # Create Scratch directory | + | |
- | mkdir -p ${RUN_DIR} | + | |
- | + | ||
- | # Copy Topology and CRD names into Scratch directory | + | |
- | cp ${topname}.prmtop *.in ${RUN_DIR} | + | |
- | + | ||
- | # Copy starting CRD files according to restart procedure or not | + | |
- | if [ $RESTART | + | |
- | cp ${topname}_md${STEP}.rst ${RUN_DIR}/ | + | |
- | else | + | |
- | STEP=0 | + | |
- | cp ${topname}.inpcrd ${RUN_DIR}/ | + | |
- | fi | + | |
- | + | ||
- | # Enter into Scratch directory | + | |
- | cd ${RUN_DIR} | + | |
- | + | ||
- | # Run calculation | + | |
- | # Keep in mind: Never run a long MD into a single trajectory file - Split it into several trajectories | + | |
- | for i in `seq $STEP 1 $FINAL` | + | |
- | do | + | |
- | j=$(( $i + 1 )) | + | |
- | # Run MD | + | |
- | pmemd -O -i md.in -o ${crdname}_md${j}.out -p $topname.prmtop -c ${crdname}_md${i}.rst -r ${crdname}_md${j}.rst -x ${crdname}_${j}.mdcrd | + | |
- | # Compress mdcrd file to prevent storage issues and remove the uncompressed trajectory | + | |
- | tar -zcvf ${crdname}_${j}.mdcrd.tar.gz ${crdname}_${j}.mdcrd | + | |
- | rm -rf ${crdname}_${j}.mdcrd | + | |
- | done | + | |
- | </ | + | |
+ | #!/bin/bash | ||
+ | #SBATCH --nodes=1 | ||
+ | #SBATCH --time=02: | ||
+ | #SBATCH --partition=gpu | ||
+ | #SBATCH --cpus-per-task=1 | ||
+ | #SBATCH --gres=gpu | ||
+ | topname=del | ||
+ | crdname=del | ||
+ | CURR=$(pwd) | ||
+ | RESTART=YES | ||
+ | STEP=0 | ||
+ | FINAL=1 | ||
+ | module load amber/ | ||
+ | module load nvidia/ | ||
+ | # MD are performed in Scratch | ||
+ | # Export running directectory | ||
+ | export RUN_DIR=" | ||
+ | # Link the scratch directory to the current directory | ||
+ | # Link name is related to JOB ID and NOT TO JOBNAME --> Prevent issues related to new MDs with same name | ||
+ | ln -sfn ${RUN_DIR} ${SLURM_JOB_ID}.results | ||
+ | echo ${RUN_DIR} | ||
+ | # Create Scratch directory | ||
+ | mkdir -p ${RUN_DIR} | ||
+ | # Copy Topology and CRD names into Scratch directory | ||
+ | cp ${topname}.prmtop *.in ${RUN_DIR} | ||
+ | # Copy starting CRD files according to restart procedure or not | ||
+ | if [ $RESTART = ' | ||
+ | cp ${topname}_md${STEP}.rst ${RUN_DIR}/ | ||
+ | else | ||
+ | STEP=0 | ||
+ | cp ${topname}.inpcrd ${RUN_DIR}/ | ||
+ | fi | ||
+ | # Enter into Scratch directory | ||
+ | cd ${RUN_DIR} | ||
+ | # Run calculation | ||
+ | # Keep in mind: Never run a long MD into a single trajectory file - Split it into several trajectories | ||
+ | for i in `seq $STEP 1 $FINAL` | ||
+ | do | ||
+ | j=$(( $i + 1 )) | ||
+ | # Run MD | ||
+ | pmemd.cuda -O -i md.in -o ${crdname}_md${j}.out -p $topname.prmtop -c ${crdname}_md${i}.rst -r ${crdname}_md${j}.rst -x ${crdname}_${j}.mdcrd | ||
+ | # Compress mdcrd file to prevent storage issues and remove the uncompressed trajectory | ||
+ | tar -zcvf ${crdname}_${j}.mdcrd.tar.gz ${crdname}_${j}.mdcrd | ||
+ | rm -rf ${crdname}_${j}.mdcrd | ||
+ | done | ||