softmatter:Molecular Dynamics Simulation (MD)
From NSDL Materials Digital Library Wiki
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:
- Initialize particle positions and velocities
- Calculate the force on each particle as a function of the position of all particles in the system
- Integrate particle accelerations (force / mass) to find the new velocities
- Integrate particle velocities to find new positions
- 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,
.
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,
Where the Cartesian spatial coordinates are represented by
.
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:
where K is the total kinetic energy and U the total potential energy, with q being a generalized coordinate and
is the time derivative of the generalized coordinate. The quation of motion in Lagranian mechanics is:
.
This gives us N second-order differential equations.
If we define:
and
.
then
.
Substituting into [[softmatter:Lagrangian | Langrange]'s quation of motion:
,
which simplifies to:
Hamiltonian Formulation
Mathematically, the Lagrangian treats q and
as distinct. The momentum is given as:
.
The goal is to use a Legendre transform to formulate this in a way such that p is an independent variable .
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:
where p is the momentum of the particle.
Intergration Schemes
See integration schemes.
Thermostats
See Thermostats.
Barostats
See Barostats.


