softmatter:Molecular Dynamics Simulation (MD)

From NSDL Materials Digital Library Wiki

Jump to: navigation, search

Molecular Dynamics (MD) is probably the most intuitive molecular simulation method. Here, atoms or molecules in a computer simulation are allowed to interact via the laws of physics, and therefore inherently adhere to the laws of statistical mechanics. A rudimentary MD simulation involves calculating the instantaneous forces on each particle in the simulation cell and then applying Newton's equations of motion to predict the future state of the system. This process involves numerical approximation, since it is difficult to obtain an analytical solution to the complex system of differential equations posed by a many-particle system. Rather, Newton’s equations are integrated by choosing a discrete timestep δt as an integration variable and stepping piecewise throughout time. The resulting MD algorithm is given as follows:


Basic algorithm for carrying out NVE Molecular Dynamics:

  1. Initialize particle positions and velocities
  2. Calculate the force on each particle as a function of the position of all particles in the system
  3. Integrate particle accelerations (force / mass) to find the new velocities
  4. Integrate particle velocities to find new positions
  5. Go to step 2)


The total force on each particle is calculated by the vector sum of the interaction with neighboring particles. Typically, a continuous conservative pair potential, such as The Lennard-Jones Potential, is used to describe the interaction between two atoms/molecules where the force is the gradient of the scalar potential energy,

 \overrightarrow{F} = - \overrightarrow{\mathcal{5}}_{i} U .

We note that the former MD algorithm involves sampling the canonical ensemble system under conditions of constant (N)umber of particles, (V)olume and (E)nergy (NVE) since the total energy of the system (determined by the initial kinetic energy of the particles) is conserved. The algorithm would require more steps to run at constant temperature (NVT), constant pressure (NPE), etc. (for a more detailed explanation see Thermodynamic Ensembles, MD In Various Ensembles).

Contents

Newtonian Formulation

For a system of N atoms, we have a system of N 2nd-order differential equations,

 m\frac{d^2\mathbf{r}_{i}}{dt^2} \equiv m\ddot{\mathbf{r}}= \mathbf{F}_{i}

Where the Cartesian spatial coordinates are represented by  \mathbf{r}_{i} = (x_{i}, y_{i}, z_{i}) . Unlike Brownian Dynamics and Dissipative Particle Dynamics, the force, F, on the right side of the equation is only the conservative force; there are no random or dissipative forces.

Lagrangian Formulation

First define the Lagrangian as:

 L(\mathbf{q}, \dot{\mathbf{q}}) \equiv K(\mathbf{q}, \dot{\mathbf{q}})- U(\mathbf{q})

where K is the total kinetic energy and U the total potential energy, with q being a generalized coordinate and  \dot{q} is the time derivative of the generalized coordinate. The quation of motion in Lagranian mechanics is:

 \frac{d}{dt}\left(\frac{\delta L}{\delta \dot{\mathbf{q}} }\right)-\frac{\delta L}{\delta \mathbf{q}}=0 .

This gives us N second-order differential equations.

If we define:

 K = \sum_{i}\frac{1}{2}m\dot{x}_i^2

and

 U = \sum_{i}U_{i}(x_{1}, x_{2}, ...x_{N}) = \frac{1}{2}\sum_{i} \sum_{j}U_{i,j}(x_{i},x_{j}) .

then

 L(\mathbf{q}, \dot{\mathbf{q}}) \equiv K(\mathbf{q}, \dot{\mathbf{q}})- U(\mathbf{q}) 

\Rightarrow 
L(x, \dot{x}) = \sum_{i}\frac{1}{2}m\dot{x}_{i}^2 - \frac{1}{2}\sum_{i} \sum_{j} U_{i,j}(x_{i},x_{j}) .

Substituting into [[softmatter:Lagrangian | Langrange]'s quation of motion:

 \frac{d}{dt}\left(\frac{\delta L}{\delta \dot{\mathbf{q}}}\right) = \frac{d}{dt}\left(\frac{d}{d \dot{x}} \sum_{i} \frac{1}{2}m_{i}\dot{x}_{i}^2-\frac{\delta U}{\delta \dot{x}}\right) = \frac{d}{dt}\left( \sum_{i}\frac{d}{d \dot{x}}\frac{1}{2}m_{i}\dot{x}_{i}^2\right) = \frac{d}{dt}\sum_{i}(m_{i}\dot{x}_{i})=\sum_{i}(m_{i}\ddot{x}_{i}) =ma ,

which simplifies to:

 - \frac{1}{2} \sum_{i}\sum_{j}\frac{dU_{i,j}(x_{i},x_{j})}{dx} = \sum_{i}(m_{i}\ddot{x}_{i}) \Rightarrow F = ma

Hamiltonian Formulation

Mathematically, the Lagrangian treats q and  \dot{q} as distinct. The momentum is given as:

 \mathbf{p} = \frac{\delta L}{\delta \dot{\mathbf{q}}} .

The goal is to use a Legendre transform to formulate this in a way such that p is an independent variable .

 H(\mathbf{q}, \mathbf{p}) = - [L(\mathbf{q}, \dot{\mathbf{q}})-\sum p_{i}\dot{q}_{i}]

 H(\mathbf{q}, \mathbf{p}) = -K(\mathbf{q}, \dot{\mathbf{q}})+U(\mathbf{q})+\sum\frac{\delta K}{\delta \dot{q}_{i}}\dot{q}_{i}

 H(\mathbf{q}, \mathbf{p}) = -\sum a_{i}\dot{q}_{i}^2+U(\mathbf{q}+\sum(2a_{i}\dot{q}_{i})\dot{q}_{i}

 H(\mathbf{q}, \mathbf{p}) = +\sum a_{i}\dot{q}_{i}^2+U(\mathbf{q})

 H(\mathbf{q}, \mathbf{p}) = K+U

Therefore the Hamiltonian is the sum of the kinetic and potential energies.

Using the Hamiltonian formulation of mechanics, we can write the equations of motion as a set of first order equations:

 \frac{d\mathbf{r}_{i}}{dt} = \frac{\mathbf{p}_{i}}{m}

 \frac{d\mathbf{p}_{i}}{dt} = \mathbf{F}_{i}

where p is the momentum of the particle.

Intergration Schemes

See integration schemes.

Thermostats

See Thermostats.

Barostats

See Barostats.

Related Pages

Personal tools

Kent State University NIST MIT University of Michigan Purdue Iowa State University