Last active
November 13, 2015 05:18
-
-
Save kmtu/fedfa845c2dcf298401b to your computer and use it in GitHub Desktop.
Produce a cpt file every 1 ns for NPT run (for Gromacs ver. 5.1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cd ${PBS_O_WORKDIR} | |
NPROCS=`wc -l <$PBS_NODEFILE` | |
GMDIR=$HOME/local/gromacs-5.1/bin | |
GMX=$GMDIR/gmx_d | |
GROMPP="$GMX grompp" | |
TPBCONV="$GMX convert-tpr" | |
MDRUN=$GMDIR/mdrun_mpi_d | |
TOP=../C4mimNTf2 | |
PREV=eq-npt | |
STAGE=md-npt | |
MAXH=1 | |
NPME=-1 | |
# extending 500000 steps per run (= 1ns if timestep is 2fs) | |
STEP=500000 | |
for i in {0..99} # run 99 more npt simulations for 99 more .tpr and .cpt file pairs | |
do | |
if [ $i == 0 ]; then | |
ln -s $PREV.cpt ${STAGE}-$i.cpt | |
$GROMPP -f $STAGE.mdp -c $PREV.tpr -p $TOP.top -o ${STAGE}-$i.tpr -t $PREV.cpt | |
else | |
$TPBCONV -s ${STAGE}-$[i-1].tpr -o ${STAGE}-$i.tpr -nsteps $((STEP * i)) | |
cp ${STAGE}-$i.tpr ${STAGE}.tpr | |
mpirun -n $NPROCS -hostfile $PBS_NODEFILE $MDRUN \ | |
-deffnm ${STAGE} -cpi ${STAGE} -npme $NPME | |
cp ${STAGE}.cpt ${STAGE}-$i.cpt | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment