Archive for the 'Paper' Category

Euler identity

Posted in Paper 4 years, 10 months ago

Another interesting paper came out last week on the preprint archive, “A matrix generalization of Euler identity.” The Euler identity reads,

e^{jx} = \cos(x) + j \sin(x)

and is traditionally derived from the Taylor expansion of sine and cosine. In this paper, the author generalizes the Euler identity to matrices. He does this by introducing a complex matrix, known as the imaginary unit matrix

\mathbf{\Phi} = \left( \begin{array}{cc} 0 & j \\j \alpha^2 & 0\end{array} \right)

Just like j^2 = -1, \mathbf{\Phi^2} = – \alpha^2 \mathbf{I}.

He then proves the Euler identity for these matrices as:

e^{x \mathbf{\Phi}} = \cos(\alpha x)\mathbf{I} + \frac{1}{\alpha} \sin(\alpha x) \mathbf{\Phi}

for all real x.

Avoidable integrator errors

Posted in Paper 4 years, 11 months ago

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

Fast Molecular Dynamics

Posted in Paper 5 years, 2 months ago

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.