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

Jay Mashl mashl at kermit.ncsa.uiuc.edu
Thu Jul 21 18:52:21 CEST 2005


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

Jay

-- 
R. Jay Mashl                  \                    University of Illinois
mashl at uiuc.edu                \            4027 Beckman Institute, MC-251
Tel. 217-244-5818, -2909(fax) \  405 N. Mathews Avenue; Urbana, IL  61801



More information about the gromacs.org_gmx-developers mailing list