<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>Re[2]: [gmx-users] Non-conservation of total energy while using structure file to resume the simulation</title>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
body {
  margin: 5px 5px 5px 5px;
  background-color: #ffffff;
}
/* ========== Text Styles ========== */
hr { color: #000000}
body, table /* Normal text */
{
 font-size: 9pt;
 font-family: 'Courier New';
 font-style: normal;
 font-weight: normal;
 color: #000000;
 text-decoration: none;
}
span.rvts1 /* Heading */
{
 font-size: 10pt;
 font-family: 'Arial';
 font-weight: bold;
 color: #0000ff;
}
span.rvts2 /* Subheading */
{
 font-size: 10pt;
 font-family: 'Arial';
 font-weight: bold;
 color: #000080;
}
span.rvts3 /* Keywords */
{
 font-size: 10pt;
 font-family: 'Arial';
 font-style: italic;
 color: #800000;
}
a.rvts4, span.rvts4 /* Jump 1 */
{
 font-size: 10pt;
 font-family: 'Arial';
 color: #008000;
 text-decoration: underline;
}
a.rvts5, span.rvts5 /* Jump 2 */
{
 font-size: 10pt;
 font-family: 'Arial';
 color: #008000;
 text-decoration: underline;
}
span.rvts6
{
 font-weight: bold;
 color: #800000;
}
a.rvts7, span.rvts7
{
 color: #0000ff;
 text-decoration: underline;
}
span.rvts8
{
 font-weight: bold;
 color: #800000;
}
span.rvts9
{
 font-weight: bold;
 color: #800080;
}
span.rvts10
{
 font-size: 8pt;
 font-family: 'arial';
 font-style: italic;
 color: #c0c0c0;
}
a.rvts11, span.rvts11
{
 font-size: 8pt;
 font-family: 'arial';
 color: #0000ff;
 text-decoration: underline;
}
span.rvts12
{
 font-size: 13pt;
}
/* ========== Para Styles ========== */
p,ul,ol /* Paragraph Style */
{
 text-align: left;
 text-indent: 0px;
 padding: 0px 0px 0px 0px;
 margin: 0px 0px 0px 0px;
}
.rvps1 /* Centered */
{
 text-align: center;
}
--></style>
</head>
<body>

<p>Dear Mark,</p>
<p><br></p>
<p>thank you for your prompt reply.</p>
<p><br></p>
<p><span class=rvts6>&gt; ----- Original Message -----</span></p>
<p><span class=rvts6>&gt; From: Dmitri Dubov &lt;</span><a class=rvts7 href="mailto:ddubov@ngs.ru">ddubov@ngs.ru</a><span class=rvts8>&gt;</span></p>
<p><span class=rvts6>&gt; Date: Thursday, May 27, 2010 15:41</span></p>
<p><span class=rvts6>&gt; Subject: [gmx-users] Non-conservation of total energy while using</span></p>
<p><span class=rvts6>&gt; structure file to resume the simulation</span></p>
<p><span class=rvts6>&gt; To: Discussion list for GROMACS users &lt;</span><a class=rvts7 href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><span class=rvts8>&gt;</span></p>
<p><br></p>
<p><span class=rvts9>&gt;&gt; Dear GMX'ers!</span></p>
<p><br></p>
<p><span class=rvts9>&gt;&gt; I simulate system of about hundreds of water molecules in NVE ensemble with md integrator. Every 100 ps I need to change slightly some parameters, say, electric field and to continue the simulation from this point. As I realize I cannot go on my run using the checkpointing and tpbconv in this case. Therefore I try to use the output structure file confout.gro which contains both coordinates and velocities at the end of the previous step.&nbsp;</span></p>
<p><br></p>
<p><span class=rvts9>&gt;&gt; The problem is in the total energy. Within every 100-ps run the energy drift is quite low. But when I start the next step, at its very beginning I see the considerable jump in the total energy and the temperature comparing with the end values of previuos step.&nbsp;</span></p>
<p><br></p>
<p><span class=rvts9>&gt;&gt; NOTE that it is the case even when I change NOTHING in my job.mdp file!&nbsp;</span></p>
<p><br></p>
<p><span class=rvts6>&gt; Sure, discontinuity is guaranteed from the loss of precision.</span></p>
<p><br></p>
<p><span class=rvts9>&gt;&gt; To my knowledge the coordinates and velocities define exactly the energy and the temperature. Now I suspect the only reason - low precision of confout.gro. So, my questions are:</span></p>
<p><br></p>
<p><span class=rvts9>&gt;&gt; Is there another reason for the total energy non-conservation in my simulation?</span></p>
<p><br></p>
<p><span class=rvts6>&gt; Probably not.</span></p>
<p><br></p>
<p><span class=rvts9>&gt;&gt;How can I get the full precision in output structure file RIGTH after mdrun? Or it is mandatory to use trjconv with -ndec option?</span></p>
<p><br></p>
<p><span class=rvts6>&gt; I expect that either&nbsp;</span></p>
<p><br></p>
<p><span class=rvts6>&gt; grompp -f new -o newtpr</span></p>
<p><span class=rvts6>&gt; mdrun -s newtpr -cpi old_state.cpt</span></p>
<p><br></p>
<p>No, this way is unsuccessful, maybe due to somewhat contradictive instructions:</p>
<p>grompp supplies newtpr with usual options</p>
<p>tinit &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 0</p>
<p>nsteps &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 100000</p>
<p>simulation_part &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 1</p>
<p>and from old_state.cpt the system finds itself on 100000th step already and stops.</p>
<p><br></p>
<p><span class=rvts6>&gt; or</span></p>
<p><br></p>
<p><span class=rvts6>&gt; grompp -f new -t old_state.cpt -o newtpr</span></p>
<p><span class=rvts6>&gt; mdrun -s newtpr</span></p>
<p><span class=rvts6>&gt; will do what you want. Please report back if one or both work :-)</span></p>
<p>And the latter variant is working! More precisely I use</p>
<p><br></p>
<p>grompp -f new -t old_state.cpt -c oldtpr -o newtpr&nbsp;</p>
<p>mdrun_d -s newtpr</p>
<p><br></p>
<p>Thanks one more for the fruitful suggestion!</p>
<p><br></p>
<p><span class=rvts6>&gt; Or, maybe you can use old-style .trr and .edr output as input to</span></p>
<p><span class=rvts6>&gt; grompp, so long as you planned that in advance. A checkpoint-file approach is superior, however.</span></p>
<p><br></p>
<p><span class=rvts9>&gt;&gt; What is the default precision of .trr trajectory file in single and double precision modes?</span></p>
<p><br></p>
<p><span class=rvts6>&gt; Machine precision.</span></p>
<p><br></p>
<p><span class=rvts6>&gt; Mark</span></p>
<p><br></p>
<p><span class=rvts10>--&nbsp;</span></p>
<p><span class=rvts10>Sincerely,</span></p>
<p><span class=rvts10>&nbsp;Dmitri &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><a class=rvts11 href="mailto:ddubov@ngs.ru">mailto:ddubov@ngs.ru</a></p>

</body></html>