molecular dynamics (1) principles and algorithms
TRANSCRIPT
Molecular dynamics (1)
Principles and algorithms
Equations of motion
2
00
00
2
2
2
2
)(2
1)()(
,,2,1),(
,,2,1,)(1)(
)(
ttttttt
tt
nitdt
dx
V
dt
xdm
nitVmm
tt
dt
d
dt
d
ii
i
i
ii
ii
iii
avrr
vvrr
vr
rrF
avr
r
Solving the equations of motions results in a microcanonical ensemble (energy is conserved).
Lyapunov instability of trajectoriesFor 3- and more body systems interacting via central forces, an infinitesimably small perturbations of the initial conditions results in FINITE trajectory change after sufficiently long time
Simplistic (Euler) algorithm
2
3
0
0
2
)()(
00
)(1)(
)(
)(
)(2
1)()(
ttEtte
tt
tVmm
tt
ttttt
ttttttt
ii
ii
ii
ii
iii
iiii
i
OO
vvrr
rrF
a
avv
avrr
r
The Verlet algorithm: derivation:
)()()(
...2
)()()(
...)()()(2)(
...)()(2)()(
...)(2
1)()()(
...)(2
1)()()(
3
4
2
2
2
2
ttEtte
t
ttttt
ttttttt
ttttttt
ttttttt
ttttttt
OO
rrv
arrr
arrr
avrr
avrr
The velocity-Verlet algorithmStep 1:
tttt
t
ttttttt
)(2
1)(
2
)(2
1)()( 2
avv
avrr
Step 2:
tttt
ttt
ttUm
tti
ii
)(2
1
2)(
)(1
)(
avv
ra r
Relation to the Verlet algorithm
2
22
)(2
1)(2
)(2
1)()()(
2
1)()(
ttt
tttttttttt
tttt
ar
avravr
rr
The leapfrog algorithm
tt
tttt
ttt
tt
t
2)()(
)(22
vrr
avv
Relation to the Verlet scheme
ttt
tt
tttt
tt
tttt
)()(22
)(2
)(
)()(
ar
vrvr
rr
The three algorithms discussed are variants of the same algorithm.
All three algorithms are reversible in time; if run backward for the same time they restore the starting point.
All these three algorithms have the symplectic property: the total energy oscillates about a value close to the initial total energy (the shadow Hamiltonian). Higher-order algorithms (e.g., the Gear algorithm don’t have this property.
Kinetic energy
Potential energy
Total energy
Total energy
0.0 1.0 2.0 3.0 4.0 5.0
Ene
rgy
[kca
l/mol
]
time [ns]
Time dependence of the potential, kinetic, and total energy of the Ac-Ala10-NHMe (Khalili et al., J. Phys. Chem. B, 2005, 109, 13785-13797)
3,2,1,0 n
dt
trdtrtrtr
n
n
n
The Gear predictor-corrector algorithm (4th order)
c0=3/8, c1=1, c2=3/4, c3=1/6: correction coefficients;
Verlet
Gear4th order
Gear5th order
Gear6th order
Energy error for various integration algorithms
MD simulation procedure
1.Generate a low-energy initial configuration (minimize the potential energy of the system).
2.Generate initial velocities of the atoms.
3.Run simulation; monitor the properties that need to be (approximately) conserved.
zyxa
NiN
m
RTv
iia
,,
,...,2,1,1,0
2
10-15
femto10-12
pico10-9
nano10-6
micro10-3
milli100
secondsbond vibration
loopclosure
helixformation
folding of-hairpins
proteinfolding
all atom MD step
sidechainrotation
MD Package
Explicit Solvent
Implicit Solvent
AMBERa 1 fs(20 fs on ANTON; good symplectic
algorithms)
2 fs
CHARMMb
3 fs 4-5 fs
TINKERc
1 fs 2 fs
Time step t for some standard MD packages
a http://amber.scripps.edu/b http://www.charmm.org/c http:// dasher.wustl.edu/tinker/
Why are the Verlet-like algorithms symplectic?
ttf NN rp ,
We consider an arbitrary function that depends on coordinates and momenta.
p
pr
rrprp
ff
ttfttfdt
d NNNN ,,
pp
rr
Li ˆ
We define the Liouville operator:
Its time derivative is
Fvp
pvr
mm
Thus f(t) can formally be written as:
0,0ˆexp, NNNN ftLittf rprp
If we consider only the first part:
NNNN
p
NN
n
NN
rr
r
tftftf
Li
tm
f
tfft
ftLi
tfLiftf
Li
00,000,0
0ˆ
00,0
00,000exp
...0!2
ˆ0ˆ0
0ˆ
0
2
Fprpprp
p
prp
rrpr
r
rr
For the second part:
However, the two parts of the Liouville operator don’t commute and, consequently
prpr LiLiLiLi ˆexpˆexpˆˆexpexp
pp
rr
n
tt
Lt
iLtiLt
i
LitLitn
prpn
pr
ˆ
2expˆexpˆ
2explim
ˆˆexp
However, we have (the Trotter identity):
prpprr
nn
n
pr
prp
LiLiLiLiLiLic
ct
LitLit
Lt
iLtiLt
i
ˆˆ,ˆ12
1ˆˆ,ˆ24
1
ˆˆexp
ˆ2
expˆexpˆ2
exp
,,3
112
12
Now we apply the approximate Liouville operator to positions and momenta:
ttt
tf
ttt
tfttfLt
i
ttfLt
iLtiLt
i
ttfLitLit
NN
N
NN
NNp
NNprp
NNpr
rrFp
rpprp
rp
rp
,2
,2
,ˆ2
exp
,ˆ2
expˆexpˆ2
exp
,ˆˆexp
Step 1:
Step 2:
N
NN
NN
NN
r
tttt
mtt
ttf
tt
tttt
tf
ttt
tfLti
2
1,
2
2,
2
,2
ˆexp
2
rFprpp
rrpp
rpp
Step 3:
N
N
NNN
N
N
N
N
N
N
N
p
tttt
mt
tttt
t
f
tttt
mt
tttt
t
f
tttt
mt
tt
fLt
i
2
1
,2
2
1
,22
2
1
,2ˆ
2exp
2
2
2
rFpr
rFrFp
rFpr
rFp
rFpr
p
This is exactly the velocity-Verlet algorithm
22
222
t
m
tttttt
ttttttt
t
m
tt
tt
NNN
NNNN
NNN
rFvv
rFvrr
rFvv
By splitting the exponent of the Liouville operator another way we obtain the leapfrog algorithm
ttfL
tiLtiL
ti
ttfLitLit
NNrpr
NNpr
rp
rp
,ˆ2
expˆexpˆ2
exp
,ˆˆexp
Establishing the time step
safe = very small = very small progress
large = flying blind=risk
French Alps „Col de Braus-small” author Ericd. License CC BY-SA 3.0
Crude solution:
In a given time step, we reduce Dt until the change acceleration is sufficiently small
DISADVANTAGE: time reversibility is lost
Refined solution: time-split algorithms
Identify the forces FL that vary „slowly” (e.g., electrostatic forces) and FS that vary „fast” (e.g., the sort-range repulsive forces). Then write the Liouville operator as follows:
SL ppr
SL
LiLiLi
Li
ˆˆˆ
ˆ
p
pp
pr
r
Then we split the Liouville operator in the following way:
forces varying-slow using
t/2at tvelocities
calculate
ˆ2
exp
forcesvarying-fast and t/2mstep with time
stepsVerlet - velocityeconsecutiv
ˆ2
expˆexpˆ2
exp
forces varying-slow using
tat tvelocitiescalculate
ˆ2
exp
ˆexp
LSSL p
m
prpp Lt
i
m
Lm
tiL
m
tiL
m
tiL
ti
Lti
This algorithm is time-reversible if the splitting number m is not changed during the course of the simulation.
References to integration algorithms1. Frenkel, D.; Smit, B. Understanding molecular simulations,
Academic Press, 1996, chapter 4.
2. D.C. Rapaport. The art of molecular dynamics simulation, Cambridge University Press, 1995.
3. Calvo, M. P.; Sanz-Serna, J. M. Numerical Hamiltonian Problems; Chapman & Hall: London, U. K., 1994.
4. Verlet, L. Phys. Rev. 1967, 159, 98.
5. Swope, W. C.; Andersen, H. C.; Berens, P. H.; Wilson, K. R. J. Chem. Phys. 1982, 76, 637.
6. Tuckerman, M.; Berne, B. J.; Martyna, G. J. J. Chem. Phys. 1992, 97, 1990.
7. Ciccotti, G.; Kalibaeva, G. Philos. Trans. R. Soc. London, Ser. A 2004, 362, 1583.
Temperature control (Berendsen thermostat)
n
iziyixiik
k
vvvmE
E
fkTtvv
1
222
2
1
11
f – #degrees of freedom (3n)
t – coupling parameter
Dt – time step
Ek – kinetic energy
: velocities reset to maintain the desired temperature
: microcanonical run
1
Pressure control (Berendsen barostat)
n
i
n
ijijiij
ext
Vp
ppt
vL
1 1
3
1
3
1
1
vrrF
L – the length of the system (e.g., box sizes)
b – isothermal compressibility coefficient
t – coupling parameter
Dt – time step
pext – external pressure