Last active
August 29, 2015 14:08
-
-
Save kmtu/911588ed85dbb1eda4aa to your computer and use it in GitHub Desktop.
run-md-nve.sh
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
if [[ ! $# == 1 ]]; then | |
echo "Usage: $0 <index of md>" | |
exit 1; | |
fi | |
idx=$1 | |
sdir=../../2-npt | |
tdir=md$idx | |
if [[ ! -d "$tdir" ]]; then | |
mkdir $tdir &&\ | |
ln -s $sdir/md-npt-${idx}.cpt $tdir/ &&\ | |
ln -s $sdir/md-npt-${idx}.tpr $tdir/ || exit 1; | |
fi | |
cd $tdir &&\ | |
cat > run-md.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