[gmx-users] Non-conservation of total energy while using structure file to resume the simulation

Dmitri Dubov ddubov at ngs.ru
Thu May 27 11:08:58 CEST 2010

Dear Mark,

thank you for your prompt reply.

> ----- Original Message -----
> From: Dmitri Dubov <ddubov at ngs.ru>
> Date: Thursday, May 27, 2010 15:41
> Subject: [gmx-users] Non-conservation of total energy while using
> structure file to resume the simulation
> To: Discussion list for GROMACS users <gmx-users at gromacs.org>

>> Dear GMX'ers!

>> 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. 

>> 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. 

>> NOTE that it is the case even when I change NOTHING in my job.mdp file! 

> Sure, discontinuity is guaranteed from the loss of precision.

>> 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:

>> Is there another reason for the total energy non-conservation in my simulation?

> Probably not.

>>How can I get the full precision in output structure file RIGTH after mdrun? Or it is mandatory to use trjconv with -ndec option?

> I expect that either 

> grompp -f new -o newtpr
> mdrun -s newtpr -cpi old_state.cpt

No, this way is unsuccessful, maybe due to somewhat contradictive instructions:
grompp supplies newtpr with usual options
tinit                    = 0
nsteps                   = 100000
simulation_part          = 1
and from old_state.cpt the system finds itself on 100000th step already and stops.

> or

> grompp -f new -t old_state.cpt -o newtpr
> mdrun -s newtpr
> will do what you want. Please report back if one or both work :-)
And the latter variant is working! More precisely I use

grompp -f new -t old_state.cpt -c oldtpr -o newtpr 
mdrun_d -s newtpr

Thanks one more for the fruitful suggestion!

> Or, maybe you can use old-style .trr and .edr output as input to
> grompp, so long as you planned that in advance. A checkpoint-file approach is superior, however.

>> What is the default precision of .trr trajectory file in single and double precision modes?

> Machine precision.

> Mark

 Dmitri                          mailto:ddubov at ngs.ru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20100527/2a9ff69b/attachment.html>

More information about the gromacs.org_gmx-users mailing list