[gmx-users] desorting
Chris Neale
chris.neale at utoronto.ca
Tue Jan 23 04:10:22 CET 2007
I still need to run some tests on longer runs to see if things are
working out ok, but here is a procedure that seems to work for me to
deshuffle/desort based on the deshuffledesort script from
http://www.gromacs.org/pipermail/gmx-users/2002-May/001546.html. I have
pasted together the relevant commands from the script that I use to
manage the runs and the scripts that are created for submission to the
queue, but the basic idea is maintained. The only problem that I am
having is that the MW TIP4p dummy atom is right on top of OW, but I am
still not sure how it is positioned during the simulation.
### Basic procedure to run multiple steps of –shuffle –sort
ED=/projects/pomes/cneale/exe/gromacs-3.3.1/exec/fftw-3.1.2/bin
LAM=/tools/lam/lam-7.1.2/bin
DD=/home/cneale/exe
MD=/working/directory
cd ${MD}
MYMOL=sysName
in="_md1"
out="_md2"
#Shuffle the .trr input file correctly. Assume that it is not currently
shuffled
${ED}/grompp -np 4 -shuffle -sort -f ${MYMOL}${out}.mdp -c
${MYMOL}${in}_deshuffleddesorted.gro -p ${MYMOL}.top -n ${MYMOL}.ndx -o
${MYMOL}${out}_a.tpr -deshuf deshuf.ndx> output.${MYMOL}_grompp${out}_a
2> output.${MYMOL}_grompp${out}_e_a
rm -f deshuf.ndx mdout.mdp
echo System | ${ED}/editconf -f ${MYMOL}${out}_a.tpr -o
${MYMOL}${out}_shuffledsortedInit_a.gro
${DD}/deshuffledesort ${MYMOL}${out}_shuffledsortedInit_a.gro
${MYMOL}${in}_deshuffleddesorted.gro > reshuffleresort${out}_a.ndx
${ED}/trjconv -f ${MYMOL}${in}_deshuffleddesorted.trr -o
${MYMOL}${in}_reshuffleresort.trr -n reshuffleresort${out}_a.ndx
#Create the run input file
${ED}/grompp -np 4 -shuffle -sort -f ${MYMOL}${out}.mdp -c
${MYMOL}${in}_deshuffleddesorted.gro -t
${MYMOL}${in}_reshuffleresort.trr -p ${MYMOL}.top -n ${MYMOL}.ndx
-deshuf deshuffle${out}.ndx -e ${MYMOL}${in}.edr -o ${MYMOL}${out}.tpr >
output.${MYMOL}_grompp${out} 2> output.${MYMOL}_grompp${out}_e
#If a new reshuffle.ndx file differs then the run is invalid.
echo System | ${ED}/editconf -f ${MYMOL}${out}.tpr -o
${MYMOL}${out}_shuffledsortedInit.gro
${DD}/deshuffledesort ${MYMOL}${out}_shuffledsortedInit.gro
${MYMOL}${in}_deshuffleddesorted.gro > reshuffleresort${out}.ndx
look=`diff -q reshuffleresort${out}_a.ndx reshuffleresort${out}.ndx`
if [ -n "$look" ]; then
echo There was a big problem. reshuffleresort${out}_a.ndx
reshuffleresort${out}.ndx are different.
#Move the .tpr file to a new name to ensure that production halts
mv ${MYMOL}${out}.tpr ${MYMOL}${out}_notValid.tpr
fi
#Create the deshuffle file to properly handle the next run
${DD}/deshuffledesort ${MYMOL}${in}_deshuffleddesorted.gro
${MYMOL}${out}_shuffledsortedInit.gro > deshuffledesort${out}.ndx
rm -f ${MYMOL}${out}_a.tpr ${MYMOL}${out}_shuffledsortedInit_a.gro
reshuffleresort${out}_a.ndx ${MYMOL}${in}_reshuffleresort.trr
${MYMOL}${out}_shuffledsortedInit.gro reshuffleresort${out}.ndx mdout.mdp
mkdir ${IN}_success
sleep 5
mv ${MYMOL}*${IN}* ${MYSYS}_*${IN}* output* ${IN}_success
cp *.top ${IN}_success
#Production dynamics
${LAM}/mpirun C ${ED}/mdrun_mpi -np 4 -s ${MYMOL}${out}.tpr -deffnm
${MYMOL}${out} -v > output.${MYMOL}_mdrun${out} 2>
output.${MYMOL}_mdrun${out}_e
echo "mdrun finished"
#Deshuffle the gro xtc and trr files. The edr file does not need this.
echo System | ${ED}/trjconv -f ${MYMOL}${out}.xtc -s ${MYMOL}${out}.tpr
-n deshuffledesort${out}.ndx -o ${MYMOL}${out}_deshuffleddesorted.xtc
echo System | ${ED}/trjconv -f ${MYMOL}${out}.trr -s ${MYMOL}${out}.tpr
-n deshuffledesort${out}.ndx -o ${MYMOL}${out}_deshuffleddesorted.trr
echo System | ${ED}/trjconv -f ${MYMOL}${out}.gro -s ${MYMOL}${out}.tpr
-n deshuffledesort${out}.ndx -o ${MYMOL}${out}_deshuffleddesorted.gro
More information about the gromacs.org_gmx-users
mailing list