Hello,<div><br></div><div>Hopefully someone can help me understand how to use the mdrun -rerun functionality, because currently I am confused. I would like to be able to look up potential energy values for a number of conformations by calling mdrun -rerun once.</div>
<div><br></div><div>The idea to use mdrun -rerun is from advice given to me by Mark Abraham on the gmx-developers list (<a href="http://lists.gromacs.org/pipermail/gmx-developers/2010-September/004731.html">http://lists.gromacs.org/pipermail/gmx-developers/2010-September/004731.html</a> and <a href="http://lists.gromacs.org/pipermail/gmx-developers/2010-October/004770.html">http://lists.gromacs.org/pipermail/gmx-developers/2010-October/004770.html</a>):</div>
<div><br></div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
You want GROMACS to find the energy of a potentially infinite set of coordinates that appear magically, and that is what mdrun -rerun does.</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<br></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
The elegant way to do that is to write your series of conformations to a pseudo-trajectory (in whichever of GROMACS many trajectory formats is convenient to you), and then invoke mdrun -rerun on that trajectory with a suitable .tpr. Then you either parse the .log file or the output .edr file for the energies.</blockquote>
<div><br></div><div>I wanted to find out how this works so I have been experimenting. I started out by looking at the Peptide tutorial at <a href="http://manual.gromacs.org/current/online/speptide.html">http://manual.gromacs.org/current/online/speptide.html</a>. I used three different mdp files (integrator = steep, nsteps = 0, 1, 2). This gave me three conformations and their energy values. For testing purposes I then wanted to get the energy values for those three conformations using mdrun -rerun (and since I already have the correct energy values it is easy to verify the results).</div>
<div><br>First, I created a trajectory by concatenating the three conformations (gro files) into one gro file (which is okay according to <a href="http://manual.gromacs.org/current/online/gro.html">http://manual.gromacs.org/current/online/gro.html</a>: &quot;gro files can be used as trajectory by simply concatenating files&quot;). I then used an mdp file with integrator = steep and nsteps = 0 indicating that I just want the energy value (listed in the output, in the log file or by using g_energy). Now, by using mdrun -s &lt;tpr file&gt; -rerun &lt;gro trajectory file&gt; I only get the energy value for the first conformation listed in the gro file used to create the tpr file. The -rerun option does not seem to have any effect at all.</div>
<div><br></div><div>I used the following commands three times to create three different conformations (one conf_mdrun.gro file for each time) with different energy values. I am just setting nsteps to 0, 1, or 2 (integrator = steep) in em.mdp.</div>
<div><br></div><div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
pdb2gmx -f speptide -o conf_pdb2gmx -p top_pdb2gmx -i top_pdb2gmx &lt;&lt; EOF</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
1</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
1</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
EOF</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<br></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
editconf -f conf_pdb2gmx -o conf_editconf -d 0.5</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<br></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
genbox -cp conf_editconf -cs -p top_pdb2gmx -o conf_genbox</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
mv top_pdb2gmx.top top_genbox.top</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
mv &quot;#top_pdb2gmx.top.1#&quot; top_pdb2gmx.top</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<br></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
grompp -f em -po em_grompp -c conf_genbox -p top_genbox -o em_grompp</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<br></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
mdrun -s em_grompp -o mdrun -c conf_mdrun -e mdrun -g mdrun</blockquote></div><div><br></div><div>I was hoping the following would give me the three energy values for the three conformations in 2+1+0.gro, which is the concatenation of the three conf_mdrun.gro files from before. However, I just get the energy value from the first conformation in the file. Using the -rerun option does not make a difference (I can put whatever after -rerun, even files that do not exist, without any effect).</div>
<div><br></div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
grompp -f em -po em_grompp -c gro/2+1+0 -p top_genbox -o em_grompp</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<br></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
mdrun -s em_grompp.tpr -rerun gro/2+1+0.gro</blockquote><div><br></div><div>Regards,</div><div>Martin.</div>