Fast Molecular Dynamics

SC06 Logo

One of the papers nominated for the best paper award at Supercomputing 06 is titled “Scalable Algorithms for Molecular Dynamics Simulations on Commodity Clusters” from the DE Shaw Research group. If your standard of a modern molecular dynamics code is Computer Simulations of Liquids, then this paper is definitely worth a look. I’ve summarized the innovations below:

Midpoint method

Published earlier this year in the Journal of Chemical Physics, this is a parallelizing algorithm which is a hybrid between spatial decompositions and force decompositions. The major innovation of this method is the reduced communication bandwidth, which can be a problem when you scale simulations to hundreds of computers.

Bitwise Time Reversibility

One of the most important requirements for an integrator solving Newton’s equations of motion is symplecticity. One way to check to check for this is by running your integrator in negative time. Doing so should return the system to the initial state. Though not an absolute requirement, this is a nice thing to have for minimizing the energy drift, which ultimately leads to a more realistic simulation. These guys have an integrator that does this.

Constraints in single precision

To reduce high frequency motions (like vibrations of Carbon-Hydrogen bonds for example), simulations typically make use of constraints to hold bond lengths or atom velocities fixed. Typical codes RATTLE and SHAKE need to be done in double precision for accuracy and to maintain energy conservation. This paper talks about the use of an (unpublished) algorithm that is stable in single precision.

Normalized local coordinates

Instead of representing coordinates in an absolute global frame, these guys normalize coordinates. This gives them more precision (due to operations done on floating points of the same magnitudes.) It also makes handling periodic boundary conditions simple. Another advantage they mention is that doing pressure control is time reversible.

Interpolation schemes

Personally, I think this is the cornerstone of the paper. The paper mentions that instead of interactions being a function of distance r between the particles, they compute it as a function of ar^2+b. The advantage is that the same set of polynomial coefficients can be used for computing both forces and energies.

SIMD instructions

I’m just mentioning this for completeness. As far as I know, every high performance engine makes use of these instructions. In fact, GROMACS has hand tuned kernels written using these instructions. In theory, this makes your code four times faster.

In conclusion, I was pretty impressed with the quality of work and the innovations these guys have brought to the community. Download the paper here.

2 Responses to “Fast Molecular Dynamics”

  1. [...] 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. [...]

  2. [...] D.E. Shaw Research took over with their super-scalable algorithms (I’ve written about this before.) With Gromacs 4.0, they’ve fixed the scalability problems and with a variety of other [...]