Computational Methods in Physics ASU Physics PHY 494

11 Molecular Dynamics (MD) Simulations

Classical molecular dynamics (MD) simulations consist of a large number of particles () that interact with each other through a classical potential energy function . The force on the -th particle is

and Newton's equations of motions for all the particles

form a system of coupled second-order ODEs (because we have particles in 3-dimensional space).

Solving the ODEs yields the trajectories (and ) of all particles. Using the tools of statistical mechanics we can calculate experimental observables from the trajectories. These calculations either take the form of averages of so-called estimator functions over trajectories, or calculations of distributions of quantitites of interest.

Integrating the equations of motions

In order to integrate the EOMs we use an integrator that closely matches the underlying physics. The Verlet-type integrators have built-in time reversal symmetry (like Newton's and Hamilton's EOMs), are phase-space area conserving, and have the symplectic structure of Hamilton's equations. They have moderate short-term stability and energy conservation but good long term stability and conserve energy for simulations in the microcanonical ensemble (i.e., without any coupling to external sources of heat or mechanical work).

Basic MD program

The basic outline of a MD program is simple and follows the same pattern that we used when integrating other ODEs:

initialize()
t = 0
while t < t_max:
   f = forces(r)
   r = integrate(r, f)
   write_trajectory(r)
   t += dt

First initialize positions and velocities, then advance the solution in small time step increments while using the forces (the derivatives) to extrapolate the solution.

The main difficulties are to manage the book keeping for all the particles (use numpy arrays!) and to obtain sufficient performance.

Additional resources:

  • Lecture Notes: 11 MD (pdf)
  • Computational Modelling: Chapter 11.4
  • Computational Physics: Chapter 18
  • Daan Frenkel and Berend Smit. Understanding molecular simulation: from algorithms to applications. 2002, 2nd ed., Computational science series. Academic Press. (ASU eBook)
  • Mark Tuckerman. Statistical Mechanics: Theory And Molecular Simulation. 2010, Oxford University Press. (ASU eBook)