Molecular Dynamics Background


It is this simple, take a collection of particles and compute the interaction between all of them with each other in a system and predict how they will interact over time. This sounds very simple, but there is a whole lot of difficulty couched in the above problem. Fortunately for computational scientists, solving this problem touches a large range of different scientific disciplines. Fluid dynamics, cosmology, sociology, chemistry and particle physics the N-body interacting particle problem is pervasive and useful.

Computation biologists have probably been the field to take this problem the furthest in their modeling of large molecular systems of interest as a collection of particles governed by classical potentials. The so-called Molecular Dynamics method is by far the most widely used computational method on today?s NSF computational resources, and is the driving algorithm behind programs such as NAMD, AMBER, DESMOND, and LAMMPS which are codes that have been scaled to 100,000s of cores on HPC architectures. At the heart each of these programs, is the integration of the particle positions over time expressed as a discrete iterative process where the forces of each particle in the system is computed at an instant in time and used to propagate their positions to the next timestep.

We will be working in this example on a fairly simple version of this algorithm where we will have a collection of random Argon atoms in a flat box, each with varying mass and positions. Space will be divided into ?cells? in which each particle will belong, which will allow us to neglect particles that have negligible contribution to the force of a particle. We will then update the particles positions and move onto the next timestep.

The particular potential we will be using in this example to govern the particles in the system is known as the Lennard-Jones potential, named after John Lennard-Jones who proposed it in 1924. It is also known at the 6-12 potential, and has the form:

Equation 1

This potential is fitted to reproduce quantum chemistry results. Figure 1 is a plot of the L-J potential for Argon as a function of the distance between two atoms. Normally, the L-J potential is defined specifically for types of atom.

For a discussion of Molecular Dynamics, see

The Algorithm

We will be working with Argon atoms, there are several parameters that we will be fixing in our algorithm. These parameters will be fixed in the code for the purposes of our exercises.
  • We will be using 1.0 fs timestep, meaning that we will propogate 1 fs in time at every iteration.
  • The mass of Argon is 39.849 a.u. and the density in 2 Dimension is 0.052 Atoms/Angstrom2
  • Our cells dimensions will be 12 Angstroms (an Angstrom is a common unit of measurement in chemistry and is equivalent to 10-11 meters).
  • No atom can begin the simulation less than 2 Angstroms apart, otherwise, the L-J potential will blow up.
  • The L-J potential is defined for Argon as having ?=119.8 K and ? = 3.405 Angstroms. (see Figure 1 for what the potential looks like).
Following is a high-level description of the algorithm you will be implementing.
  1. Based on number of particles and the cutoff (in each cells, allocate space to hold the particles positions, and forces, indexed by cell.
  2. Begin loop over the cells in the system and compute the forces resulting from the potential of all of the particles that are in the same cell. Computing the force requires computing the derivative with respect to R of the potential.
  3. The loop over all of the cells to compute the forces resulting from the particles that reside in an adjacent cell.
  4. Once all of the forces have been calculated, use the forces to propagate the all of the particles in the system to their positions for the next times step.
  5. Iterate till completion.
There is really no convergence of this type of algorithm, so we will need to specify a fixed number of iterations to perform. Even describing it seems simple, but the fun comes in parallelizing it in a distributed memory algorithm.

Molecular Dynamics Exercise 1
Molecular Dynamics Exercise 2
Molecular Dynamics Exercise 3
Molecular Dynamics Exercise 4
Molecular Dynamics Exercise 5