Skip to content

Instantly share code, notes, and snippets.

@kmtu
Last active August 29, 2015 14:08
Show Gist options
  • Save kmtu/306cf23322a9f94552b4 to your computer and use it in GitHub Desktop.
Save kmtu/306cf23322a9f94552b4 to your computer and use it in GitHub Desktop.
make-run_md-nve.sh
if [[ ! $# == 1 ]]; then
echo "Usage: $0 <md index>"
exit 1;
fi
IDX=$1
cd md$1 &&\
cat > run_md-nve.sh <<EOF
#PBS -l nodes=2:ppn=12
#PBS -N system-md$IDX
cd \$PBS_O_WORKDIR
NPROCS=\`wc -l <\$PBS_NODEFILE\`
MPIRUN="mpirun -machinefile \$PBS_NODEFILE -n \$NPROC"
GMDIR=/home/kmtu/local/gromacs-4.6.6/bin
GROMPP=\$GMDIR/grompp_d
MDRUN=\$GMDIR/mdrun_mpi_d
TOP=../../system
PREV=md-npt-$IDX
STAGE=md-nve
\$GROMPP -f ../\${STAGE}.mdp -c \$PREV.tpr -t \$PREV.cpt -p \$TOP.top -o \$STAGE.tpr
\$MPIRUN \$MDRUN -s \$STAGE.tpr -deffnm \$STAGE
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment