[gmx-users] stability of the simulation

Erik Lindahl lindahl at csb.stanford.edu
Sun Mar 7 22:17:01 CET 2004


> I have noticed few times that trajectories from the one tpr file but 
> computed
> on different hardware could diverse significantly. (i.e. RMSD of Ca 
> atoms
> after 7 ns of the simulation is 1.6 and 0.3!!!).

Simulation is all about statistical mechanics. Molecular dynamics is 
actually a chaotic process, so no matter how exact you know the initial 
condition the trajectories will eventually diverge.

In theory you could force IEEE single (or double) precision 
calculations in the compiler, and then you should end up with identical 
results. This is not a reasonable approach in practice, since some CPUs 
(e.g. x86) use 80 bits in the floating-point registers, and then you 
have to store-and-reload every single result to memory to get exact 
IEEE behavoir (read: it would be incredibly slow). Other machines use 
fused multiply-add instructions, which are specified in IEEE, but you 
will not get the same result from separate multiply followed by an add 
as from a fused multiply add (FMA) instruction.

The reason why people don't care too much about this (and why we 
usually can use single precision) is that you don't know the initial 
state exactly. Since it is a chaotic process, the deviation between 
trajectories will increase exponentially, so double precision just buys 
you a factor two of time before you get the same deviation.

This isn't as bad as it sounds - Herman (Berendsen) and Wilfred (van 
Gunsteren) introduced the concept of "shadow trajectories" which 
somewhat simplified says that the only important thing is that each 
part of your trajectory is sufficiently close to some real trajectory.

> What for the difference could be attributed?
> Does this mean that one cann't investigate dynamics of a protein from 
> a single
> run?

Right: it is not possible to predict the exact motion of individual 
atoms on long timescales in computers due to the chaotic character of 
dynamics. Remember that it is a simulation with random (velocities) 
initial conditions - never, ever, trust something you see only once. 
Rely on statistics, and if something happens in 9 runs out of 10 it is 
probably true.



More information about the gromacs.org_gmx-users mailing list