Molecular dynamics

Molecular dynamics

How molecular dynamics simulates the motion of atoms by repeatedly solving Newton's equations with a force field, giving structures, dynamics and thermodynamic properties of molecules and materials.

What it is

Molecular dynamics (MD) is a computer simulation method that follows how atoms and molecules move over time. The forces on each atom are computed from a model of interatomic interactions, Newton’s equations of motion are integrated in small time steps, and the resulting trajectory records every atom’s position and velocity at each step, like a movie at atomic resolution. From the trajectory one can calculate structural, dynamic and thermodynamic properties by statistical mechanics. First used in the 1950s for hard spheres (Alder and Wainwright) and for liquid argon (Rahman, 1964), MD now simulates proteins, membranes, polymers, liquids, crystals, nanomaterials and interfaces with millions of atoms, and the 2013 Nobel Prize in Chemistry recognized multiscale models in this area.

It answers questions such as: How does a protein fold or change shape? How does a drug bind and unbind? How fast do ions diffuse in a battery electrolyte? What is the viscosity, density or thermal conductivity of a fluid? How do defects or cracks evolve in a material? MD links atomic structure to measurable properties and shows mechanisms that experiments cannot resolve.

Fundamentals

Force fields

The potential energy U(rN) is given by a force field, an empirical function with parameters for each atom type. A typical biomolecular form is: U = Σbonds kb(r − r0)2 + Σangles kθ(θ − θ0)2 + Σdihedrals kφ[1 + cos(nφ − δ)] + Σi<j {4εij[(σij/rij)12 − (σij/rij)6] + qiqj/(4πε0rij)}. The last terms are the Lennard-Jones potential (repulsion and van der Waals attraction) and Coulomb electrostatics with partial atomic charges. Common force fields: AMBER, CHARMM, OPLS and GROMOS for biomolecules, and for materials EAM (metals), Tersoff and Stillinger–Weber (covalent solids), ReaxFF (reactive bond formation), and machine-learned interatomic potentials (see machine-learned interatomic potentials). Water models (TIP3P, SPC/E, TIP4P/2005) matter greatly. Force fields are approximate and cannot form or break bonds unless reactive; accuracy depends on the parameters, and ab initio MD (using DFT forces, see density functional theory) avoids parameterization at much higher cost.

Integration and time step

Each atom obeys mi d2ri/dt2 = Fi = −∇iU. The standard integrator is velocity Verlet: r(t + Δt) = r(t) + v(t)Δt + ½a(t)Δt2, then v(t + Δt) = v(t) + ½[a(t) + a(t + Δt)]Δt. It is time-reversible and conserves energy well over long runs. The time step must resolve the fastest motion, the vibration of bonds to hydrogen (period about 10 fs), so Δt is about 1–2 fs, or 2 fs when bonds with hydrogen are constrained with algorithms like SHAKE or LINCS, and up to 4 fs with hydrogen mass repartitioning. A 1 µs simulation therefore needs 5 × 108 steps. Most of the cost is computing nonbonded forces: a cutoff (typically 1.0–1.2 nm) with neighbor lists is used for short-range terms, and long-range electrostatics use particle-mesh Ewald (PME), which scales as N log N.

Ensembles, thermostats and boundaries

Pure Newtonian dynamics conserves energy (NVE ensemble). Experiments usually have constant temperature and pressure (NPT), so thermostats (Nosé–Hoover, velocity-rescaling/Bussi, Langevin) and barostats (Parrinello–Rahman, Berendsen for equilibration only) are used to sample the right ensemble. Temperature is defined from kinetic energy, ⟨½ m v2⟩ = (3/2) kBT per particle. Small boxes are simulated with periodic boundary conditions, in which the box is replicated in all directions so molecules leaving one side re-enter on the other, avoiding surface effects; the box must be larger than twice the cutoff and large enough to avoid self-interaction of a solute. Systems are built by placing a molecule in a box of water and ions (solvation and neutralization, often 0.15 M NaCl).

Workflow: minimization, equilibration, production

First, energy minimization removes bad contacts. Then equilibration brings the system to the target temperature and density (often with position restraints on the solute that are gradually released) until properties such as energy, temperature, pressure and density stabilize. Finally, the production run collects data, written out every few picoseconds. Duration needs to exceed the slowest process of interest: nanoseconds for local fluctuations and liquid properties, microseconds for loop motions and ligand binding events, and rarely milliseconds for folding without special hardware (Anton) or enhanced sampling. A single trajectory may not be representative, so several independent replicates are run.

Analysis and enhanced sampling

Typical analyses: root-mean-square deviation (RMSD) and fluctuation (RMSF), radius of gyration, hydrogen bonds, radial distribution function g(r), mean-squared displacement giving the diffusion coefficient by the Einstein relation D = limt→∞ ⟨|r(t) − r(0)|2⟩/(6t), time-correlation functions (Green–Kubo for viscosity and conductivity), clustering of conformations, free energies and contact maps. Statistical uncertainty is estimated by block averaging and replicates. Rare events happen too slowly for plain MD, so enhanced sampling methods are used: umbrella sampling and metadynamics (bias along collective variables), replica exchange (parallel tempering), steered MD, accelerated MD, and free-energy perturbation or thermodynamic integration for binding free energies. Markov state models turn many short simulations into kinetics. Software: GROMACS, AMBER, NAMD, OpenMM, LAMMPS (materials), CHARMM, DL_POLY and visualization with VMD, PyMOL and MDAnalysis or MDTraj for analysis. GPUs accelerate MD by an order of magnitude.

Typical applications and limits

Applications are drug-binding studies, membrane protein dynamics, polymer and electrolyte properties, thermal transport, radiation damage and nanoscale mechanics. Limits are force field accuracy, finite sampling (timescales far shorter than many biological processes), finite-size effects and the classical treatment of nuclei, which fails for light atoms at low temperature and for chemical reactions unless reactive or QM methods are used.

Basic operation

  1. Prepare the system. Obtain the structure, add missing atoms and set protonation states.
  2. Choose a force field and water model. Match them to the molecules and published validation.
  3. Build the box. Solvate, add ions to neutralize and set periodic boundaries.
  4. Minimize energy. Remove steric clashes.
  5. Equilibrate. Run NVT and then NPT until temperature, pressure and density are stable.
  6. Run production. Simulate long enough, with replicates, and save trajectories at intervals.
  7. Analyze the trajectory. Compute structural, dynamic and thermodynamic observables with error estimates.
  8. Collect the output. You obtain trajectories and property estimates; setting up systems and enhanced sampling are covered in the video.

Good practice

  • Validate the setup. Check density, energy conservation and known properties.
  • Equilibrate properly. Discard the equilibration phase from analysis.
  • Run replicates. One trajectory can be misleading.
  • Report uncertainties. Use block averages and independent runs.
  • Use consistent parameters. Do not mix force fields without checking compatibility.
  • Manage data and resources. Archive input files, software versions and random seeds, and avoid over-interpreting short simulations.

Key terms

  • Force field — a set of functions and parameters that give the potential energy of a system.
  • Trajectory — the record of atomic positions (and velocities) over simulation time.
  • Time step — the interval between successive integration steps, typically 1–2 fs.
  • Periodic boundary conditions — replicating the simulation box to mimic an infinite system.
  • Thermostat / barostat — algorithms that control temperature and pressure.
  • PME (particle-mesh Ewald) — an efficient method for long-range electrostatics.
  • Enhanced sampling — methods that accelerate exploration of rare events.

Video coming soon

About five minutes on Molecular dynamics: how it works in detail, how the data is acquired, and how it is analyzed.

Shopping cart

0
image/svg+xml

No products in the cart.

Continue Shopping