MD 16 01 2020
MD 16 01 2020
MD 16 01 2020
and Techniques
Department
Department of Chemistry
of Chemistry
Indian Institute of Technology Delhi, India
Indian Institute of Technology Delhi, India
Atomistic MD (Classical)
• Uses Born-Oppenheimer Approximation
• Atoms are assumed in their ground electronic states
Born-Oppenheimer Approximation
Total wavefunction, (R i , r ) = (R i ) (r , R i ) as me
M →0
(R i ) : Nuclei wavefunction
(r , R i ) : Electron wavefunction parametrically depending on R i
Top View
J. Phys. Chem. B, 123, 9616 (2019) J. Chem. Phys., 151, 215103 (2019)
Science, 321, 5890, 798-800 (2008)
AA/CG MOLECULAR DYNAMICS SIMULATIONS
o Define Force-field (Intra- and Inter-molecular terms) for your
system
o Choose the Ensemble (NVE, NVT, NPT, …) to define the
thermodynamic or macro-state of the system
o Integrate Newton’s Equation of motion for each particle
(Leap-Frog, Velocity-Verlet etc); Advance micro-states
o Analyze the Equilibrium Trajectory [ri(t),vi(t), i=1,N]
o Structural Properties: Radial distribution function (g(r)),
Structure Function (S(q))…
o Dynamic Properties: Mean Square Displacement (<r2(t)>),
VACF, Diffusion Coefficients, Conductivity, Viscosity
7
Basic MD Algorithm
t =t+
dtt
ith
12 6
V (r ) = 4 −
r r
rcut V(r)
rcut r
Intermolecular Interactions and Potential Energy Surfaces
Stretching Energy
Bending Energy
Torsion Energy
Non-Bonded Energy
Polyatomic Molecular System
V ϕ,𝑚
𝑘𝑖𝑗𝑘𝑙 (1 + cos(ϕ𝑖𝑗𝑘𝑙 − 𝛾𝑚 )
𝑚
Examples: Simulation of
water, ionic liquids, protein,
DNA, lipid membrane etc
CHARMM Force-field
V =
OPLS Force-field
1 𝑟 2 1 𝜃 2
V= σ𝑏𝑜𝑛𝑑𝑠 𝑘𝑖𝑗 𝑟𝑖𝑗 − 𝑟𝑒𝑞 + σ𝑎𝑛𝑔𝑙𝑒𝑠 𝑘𝑖𝑗𝑘 𝜃𝑖𝑗𝑘 − 𝜃𝑒𝑞 +
2 2
1 𝜎 12 𝜎 6 𝑞𝑖 𝑞𝑗
ϕ,𝑚
𝑡𝑜𝑟𝑠𝑖𝑜𝑛 𝑘𝑖𝑗𝑘𝑙 (1 + cos(ϕ𝑖𝑗𝑘𝑙 − 𝛾𝑚 ) + 4𝜀 − +
2 𝑎𝑛𝑔𝑙𝑒𝑠 𝑚 𝑟 𝑟 4𝜋𝜀0 𝑟
17
Mostly used MD Engines and Force-field for Liquids, Materials and
Biological Systems
18
Periodic Boundary Conditions (PBC)
• Particle on the surface will experience quite different forces than those in the bulk
or middle of the box
central box
(0,0)
xi(t),yi(t) xi(t+dt),yi(t+dt)
Coordinates without PBC
(-L/2,-L/2) (L/2,-L/2) (Unwrapped coordinate)
OR
x`i(t+dt) = xi(t+dt) –nint(xi(t+dt)/L)
y`i(t+dt) = yi(t+dt) –nint(yi(t+dt)/L)
nint(a)=nearest integer to a
Minimum Image Convention (MIC) and its Implementation
rcut
xij’ = xij - L* nint(xij/L)
j’ i
j yij’= yij – L* nint(yij/L)
nint(a)=nearest integer to a
rcut < L/2
• Smallest distance between the ith particle and jth particle or its any image should
be considered for the calculation of force
MD in NVE Ensemble
System
NVE
1
𝑟𝑖 𝑡 + 𝑑𝑡 = 𝑟𝑖 𝑡 + 𝑣𝑖 𝑡 𝑑𝑡 + 𝑎𝑖 𝑡 𝑑𝑡 2 + 𝑂(𝑑𝑡 3 )
2
𝑣𝑖 𝑡 + 𝑑𝑡 = 𝑣𝑖 𝑡 + 𝑎𝑖 𝑡 𝑑𝑡 + 𝑂(𝑑𝑡 2 )
1
Recall, 𝑠 = 𝑢𝑡 + 𝑎𝑡2 𝑎𝑛𝑑 𝑣 = 𝑢 + 𝑎𝑡
2
Integration Algorithms: Essential Idea
r(t+dt)
r(t)
r(t+2dt)
f(t)dt2/2m
• The aim is to reproduce the phase-space trajectory of the
system as accurately as possible
• Sources of errors: Poor choice of the force-field, large dt,
inadequate integration algorithm
Phase-space Trajectory
Energy
p
r Simulation Time
31
Finite difference method
Integration of Equation of Motion (Taylor Expansion) :
1
𝑟𝑖 𝑡 + 𝑑𝑡 = 𝑟𝑖 𝑡 + 𝑣𝑖 𝑡 𝑑𝑡 + 𝑎𝑖 𝑡 𝑑𝑡 2 + 𝑂(𝑑𝑡 3 )
2
𝑣𝑖 𝑡 + 𝑑𝑡 = 𝑣𝑖 𝑡 + 𝑎𝑖 𝑡 𝑑𝑡 + 𝑂(𝑑𝑡 2 )
1
Recall, 𝑣 = 𝑢 + 𝑎𝑡 𝑎𝑛𝑑 𝑠 = 𝑢𝑡 + 𝑎𝑡2
2
MD Time Step
33
Integration Algorithms
(1) Predictor-corrector algorithm
Predictor step: Simple Taylor’s expansion
1
𝑟𝑖 𝑃 𝑡 + 𝑑𝑡 = 𝑟𝑖 𝑡 + 𝑣𝑖 𝑡 𝑑𝑡 + 𝑎𝑖 𝑡 𝑑𝑡 2 + 𝑂(𝑑𝑡 3 )
2
𝑣𝑖 𝑃 𝑡 + 𝑑𝑡 = 𝑣𝑖 𝑡 + 𝑎𝑖 𝑡 𝑑𝑡 + 𝑂(𝑑𝑡 2 )
𝑟𝑖 C 𝑡 + 𝑑𝑡 = 𝑟𝑖 𝑃 𝑡 + 𝑑𝑡 + 𝐶0∆𝑎𝑖 𝑡 + 𝑑𝑡
𝑣𝑖 C 𝑡 + 𝑑𝑡 = 𝑣𝑖 𝑃 𝑡 + 𝑑𝑡 + 𝐶1∆𝑎𝑖 𝑡 + 𝑑𝑡
𝑎𝑖 C 𝑡 + 𝑑𝑡 = 𝑎𝑖 𝑃 𝑡 + 𝑑𝑡 + 𝐶2∆𝑎𝑖 𝑡 + 𝑑𝑡
𝐶0, 𝐶1 and 𝐶2 are the constants. Usually, 𝐶0 = 0, 𝐶1 =0 and 𝐶2 =1 are used in one of the Gear
scheme and hence called as Gear predictor-corrector algorithm.
34
Integration Algorithms
(2) Verlet Algorithm and Its Variants: (i) Leap-frog and (ii) Velocity-Verlet
1
𝑟𝑖 𝑡 + 𝑑𝑡 = 𝑟𝑖 𝑡 + 𝑣𝑖 𝑡 𝑑𝑡 + 𝑎𝑖 𝑡 𝑑𝑡 2 + 𝑂(𝑑𝑡 3 )
2
1
𝑟𝑖 𝑡 − 𝑑𝑡 = 𝑟𝑖 𝑡 − 𝑣𝑖 𝑡 𝑑𝑡 + 𝑎𝑖 𝑡 𝑑𝑡 2 − 𝑂(𝑑𝑡 3 )
2
Position by adding
𝑟𝑖 𝑡 + 𝑑𝑡 = 2𝑟𝑖 𝑡 − 𝑟𝑖 𝑡 − 𝑑𝑡 + 𝑎𝑖 𝑡 𝑑𝑡 2 + 𝑂(𝑑𝑡 4 )
𝑟𝑖 𝑡 + 𝑑𝑡 − 𝑟𝑖 𝑡 − 𝑑𝑡
𝑣𝑖 𝑡 = + 𝑂(𝑑𝑡 2 )
2𝑑𝑡
35
(i) Leap-frog: Velocities are explicitly calculated and slightly faster
Calculation for the advancement of velocity leaps over that for position
𝑑𝑡 𝑑𝑡
𝑣𝑖 𝑡 + = 𝑣𝑖 𝑡 − + 𝑎𝑖 𝑡 𝑑𝑡 + 𝑂(𝑑𝑡 2 )
2 2
𝑑𝑡
𝑟𝑖 𝑡 + 𝑑𝑡 = 𝑟𝑖 𝑡 + 𝑣𝑖 𝑡 + 𝑑𝑡 + 𝑂(𝑑𝑡 2 )
2
1 𝑑𝑡 𝑑𝑡
𝑣𝑖 𝑡 = 𝑣𝑖 𝑡 + + 𝑣𝑖 𝑡 −
2 2 2
System
time
… System …
time
System
time
…
NVT NVT NVT
System …
time System …
time
System time
…
NPT NPT NPT
Maxwell-Boltzmann distribution
Ensure that
• Rescaling of velocities
• Weak coupling with heat bath
• Stochastic coupling
• Nose-Hoover method or Extended System Method
Rescaling of velocities
Define an instantaneous temperature T(t)
Weak coupling with heat bath
• Temperature may also be controlled using the method of weak
coupling to a thermal bath proposed by Berendsen (J. Chem. Phys. 81,
3684 (1984)).
• The velocities are scaled at each step so that the rate of temperature
change is given by
𝑑𝑇 (𝑇0 −𝑇)
= where T0 is the target temperature.
𝑑𝑡 𝜏
𝑡
−ln(𝑇0 − 𝑇) = +𝐶
𝜏
𝑡
(𝑇0 − 𝑇(𝑡)) = 𝑒 −𝐶 𝑒 −𝜏
𝑡
−
(𝑇0 − 𝑇(𝑡)) = 𝐴𝑒 𝜏
𝑡
−
𝑇0 − 𝑇 𝑡 = [𝑇0 − 𝑇 𝑡 = 0 ]𝑒 𝜏
𝑡
−
𝛥𝑇 𝑡 = 𝛥𝑇 𝑡 = 0 𝑒 𝜏
kin
which gives the relation between scaling factor λ, the time step Δt
and the coupling constant (the time interval between heat exchanges
with the bath) τ.
Stochastic Coupling (Andersen thermostat)
• A simple method for temperature control was proposed by
Andersen (J. Chem. Phys. 72, 2384 (1980)).
• In this method, each atom at each integration step is subject to small probability
to experience collision with heat bath.
Let us denote the frequency of collisions as ν. If collisions are uncorrelated, then the
probability of next collision event is given by a Poisson distribution
P(t)=νexp(-νt)
In the limit of small time steps Δt (i.e., << 1/ν) the probability of collision is νΔt. If an
atom collides with the heat bath, its velocity is drawn from a MB distribution.
Importantly, the velocities of other atoms are not affected.
time
System
NVT
… System
NVT
…
time
Thermostat Thermostat
Extended Extended
System; NVE System; NVE
Ensemble Ensemble
Nose-Hoover Thermostat
• Nose and Hoover proposed a method that generates a canonical
ensemble (J. Chem. Phys. 81, 511 (1984); Mol. Phys. 52, 255 (1984); Phys. Rev.
A 31, 1695 (1985)).
• Let us add to the energy function a fictitious degree of freedom
(coordinate) s, which represents a heat bath.
• The potential energy associated with s is gkBT ln s, where g=(3N+1)
is the total number of degrees of freedom.
• The kinetic energy related to s is Q(ds/dt)2/2, where Q plays the role
of fictitious mass.
• Consider an extended system, which includes a real system and a
heat bath represented by s, and assume that the extended system is
microcanonical.
Nosé-Hoover Thermostat (Extended system )
Lagrangian
( )
N
1 2 2 1 2 g
L Nose = ms ri − U r −
N
+ Qs − ln s
i =1 2 2
Hamiltonian Extended system 3N+1 variables
N
HNose = ri pi + sps − L ( x, xr) ṙ Associated mass
i =1
pi2 ps2
( )
N
g
HNose = + + U r + ln s
N
i =1 2ms
2
2Q
L L
pi = = ms 2 ri ps = = Qs
ri s
Conjugate
momentum
• The coupling between actual system and thermostat is controlled by Q.
• Small Q leads to high frequency oscillations of energy coupled with s and frequent
collisions with the real system.
• In the limit of large Q, microcanonical ensemble of real system is retained.