[gmx-developers] Double precision restarts are exact, single precision are not in gromacs 3.2.1

David spoel at xray.bmc.uu.se
Thu Jul 21 19:23:17 CEST 2005


On Thu, 2005-07-21 at 11:52 -0500, Jay Mashl wrote:
> On Fri, 22 Jul 2005, Mark Abraham wrote:
> > After posting twice to gmx-users about this problem and apparently being 
> > ignored, I've done yet more testing and discovered a clear difference in the 
> > way single precision and double precision gromacs handle MD restarts in 
> > version 3.2.1 (using Berendsen thermostat and barostat, and PME, on Pentium 4 
> > architecture).
Sorry, I don't have answers to all questions. Berk is the person to
answer this, but apparently he is offline...

> >
> > Single precision restarts using the previous run's trajectory (.trr) and 
> > energy (.edr) files to obtain the configuration and other information (and 
> > using unconstrained_start = yes, and gen_vel = no in the .mdp file to make 
> > sure that the old configuration is preserved) do in fact reproduce the 
> > configuration exactly, in that the energy components calculated by the force 
> > field are identical in Step 0 of the restart with those of the final Step in 
> > the previous run. However the total pressure is different, and by 10 steps 
> > later (my next output interval), all energy components as well as the 
> > pressure have diverged from those obtained for a run. This suggests that 
> > values used to calculate the total pressure (e.g. the virial) are not being 
> > preserved correctly across the restart, and this is subsequently perturbing 
> > the system, at least through the barostat.
> >
> > However double precision gromacs performs "correctly" - all energy components 
> > and the total pressure are reproduced correctly in Step 0 of the restart, and 
> > future steps agree exactly (within output precision over only a few tens of 
> > MD steps) with those obtained from a run that extended over the restart time 
> > from the original starting point.
Is your original trr in double? In that case try an original trr in
single.

> >
> > This suggests that something is being written or read at an inappropriate 
> > precision in the .edr files. Can this be brought to the attention of somebody 
> > who knows how that code is supposed to work, please? They may wish to see if 
> > they can reproduce my observations & work out what is wrong.
> 
> 
> The file include/types/energy.h has a mixture of real and double types for 
> variables that accumulate energy data. Maybe the doubles when changed to reals 
> might work.
Don't meddle with these vars...
It could be that in order to retain precision one needs more double
precision vars.


> Jay
> 
-- 
David.
________________________________________________________________________
David van der Spoel, PhD, Assoc. Prof., Molecular Biophysics group,
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596,          75124 Uppsala, Sweden
phone:  46 18 471 4205          fax: 46 18 511 755
spoel at xray.bmc.uu.se    spoel at gromacs.org   http://xray.bmc.uu.se/~spoel
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




More information about the gromacs.org_gmx-developers mailing list