Skip to content

Molecular Dynamics

General workflow of molecular dynamics (MD) is shown below.

flowchart TD
    id1[Initial structure]
    id2[Force Field]
    id25[Setting initial velocity]
    id3[Compute forces and energy]
    id4[Solve equation of motion]
    id45[Update velocity and position]
    id46[Update thermostat or barostat]
    id5{Reached<br>maximum steps?}
    id6[Finished: trajectory]
    id1 --> id25
    id2 --> id3
    id25 --> id3
    id3 --> id4
    id4 --> id45
    id45-->id46
    id46 -->id5 
    id5 -->|yes|id6
    id5 -->|no|id3

Statistical Mechanics

Statistical mechanics bridges macroscopic properties (temperature, pressure, and heat capacity) with microscopic parameters (position, velocity, and ordering). There is a nice online course for this topic.

Partition Function

Partition function is the key of the statistical mechanics, which is defined as \(Z=\sum_i e^{-\beta E_i}\) where \(\beta=\frac{1}{k_BT}\) and \(i\) is a microstate. It is basically a sum over all microstates of a system. You can get all thermodynamical properties of a system once you know its partition function exactly.

In order to compute partition function, you need to sample microstates of your system. There are two ways: Molecular Dynamics (MD) and Monte Carlo (MC). MD and MC should both yield to the same results if microstates are fully sampled, i.e. ergodicity requirement is met. In MC, you're sampling the system randomly whereas in MD you're sampling the system using Newtonian mechanics.

Why MD?

  • Ergodic Hypothesis Compliance: Systems that comply with the ergodic hypothesis allow the use of molecular dynamics (MD) simulations to determine macroscopic thermodynamic properties.
  • Time and Ensemble Averages: In ergodic systems, time averages from a single MD simulation correspond to microcanonical ensemble averages.
  • Terminology and Concept: MD is often referred to as "statistical mechanics by numbers" and "Laplace's vision of Newtonian mechanics."
  • Purpose and Insight: MD simulations animate natural forces, predicting future behaviors and providing insights into molecular motion at the atomic scale.

Constraints

An ensemble is a collection of systems sharing one or more macroscopic characteristics but each being in a unique microstate. Depends on the property you're interested in, you can run MD at different constraints.

Ensemble Name Constraints Comments
NVE microcanonical ensemble number of particles, lattice, and energy kinetic energy and potential energy are conserved
NVT canonical ensemble number of particles, lattice, and temperature temperature is controlled by a thermostat
NPT isothermal-isobaric ensemble number of particles, pressure, and temperature temperature is controlled by a thermostat, pressure is controlled by a barostat
\(\rm{\mu}\)VT grand canonical ensemble chemical potential, lattice, and temperature useful for exploring single phase (phase diagram) because you only get a single phase when you have a constant \(\rm{\mu}\)

Thermostat and barostat are the algorithms to control temperature and pressure of the system.

Force Fields

Force field is a model to compute interatomic force and total energy. Different force fields are summarized below:

Classical force fields Ab initio methods Machine learning potentials
Model complexity Simple analytical model Quantum mechanical model Machine learning model
Model building Hard, need to understand deeply for each material Very easy, no need to build force field Medium, need to collect data and train the model
Speed and cost Very fast and very cheap to compute (\(10^6\) to \(10^7\) atoms in nano-seconds) Slow and expensive: \(10^2\) to \(10^3\) atoms in \(10^2\) pico-seconds Fast and cheap: \(10^3\) to \(10^4\) atoms in nano-seconds
Transferability Poor, need to build potential for each system Good, can be used for most systems, even for unknown system Depends on your dataset

Machine learning potential (MLP) stays between classical force fields and ab initio methods.