Avoidable integrator errors

A friend brought this paper(pdf) to my attention “A common, avoidable source of error in molecular dynamics integrators” recently published in the Journal of Chemical Physics by D. E. Shaw Research. I had previously written about their award winning paper at SC06.

In constrained molecular dynamics simulations using some of the most popular molecular dynamics codes, calculation of the velocities of constrained particles is based solely on the differences in particle positions during two successive time steps. This creates a numerical instability that the authors’ show to be significant in a typical single-precision floating-point simulation. They describe a simple modification that eliminates this source of instability and demonstrate that this change substantially reduces the energy drift of a sample single-precision NVE simulation.

The paper is really short (2 pages) and describes recipes for modifying constraint algorithms SHAKE, RATTLE and SETTLE. Below is a graph of the energy drift in double-precision, single-precision and modified versions of GROMACS and Desmond (that’s D.E. Shaw’s MD engine.) They simulated a 30A cube of 901 water molecules with periodic boundary conditions for one nanosecond with a one femtosecond timestep. See how bad single-precision GROMACS is for NVE simulations?

desmond.jpg

Comments are closed.