Newtonian and extended Lagrangian dynamics
Gianni Cardini and Riccardo Chelli Dipartimento di Chimica “Ugo Schiff” Università di Firenze, Via della Lastruccia 3, 50019 Sesto F.no, Firenze
[email protected],
[email protected]
SMART January 25-29, 2016
Introduction
Introduction
The model
The Molecular Dynamics Method
The simulation Integrators Velocity Verlet Multiple time step
NVT
. Numerical experiments on model systems . You need:
Nosé - Hoover
MTK Constant Pressure Andersen MTK
• to define a model
PR Nosé Klein
• equations of motion
Wentzcovitch
NPT
• numerical integration
MTK NPT
CP-MD
. • A COMPUTER
1.2
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
2 / 58
Introduction
It is useful!
The model The simulation Integrators Velocity Verlet Multiple time step
NVT
.
Molecular dynamics methods provide essentially exact results for a model
.
• Test of theories in controlled conditions • Test of a model
Constant Pressure Andersen MTK PR Nosé Klein
• MD can suggest new experiments
.
Nosé - Hoover
MTK
• Microscopic description
Wentzcovitch
NPT MTK NPT
CP-MD
1.3
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
3 / 58
Introduction
How to?
The model The simulation Integrators Velocity Verlet Multiple time step
. Model . .Stucture, conditions, potential
NVT Nosé - Hoover
MTK
. Rule to solve the equations of motions . .numerical integration alghorithm, time step {ri (t)} ∧ {vi (t)} . analysis .
Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
1.4
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
4 / 58
Introduction
Reminder
The model The simulation Integrators Velocity Verlet Multiple time step
NVT
. Molecular dynamics gives exact results on a model . • If the model is wrong the results are wrong! • If you ask a wrong question ...
.
you will receive a wrong answer!
Nosé - Hoover
MTK Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
1.5
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
5 / 58
Introduction
The model
The model The simulation Integrators Velocity Verlet
. Microscopic description of a chemical system . • Initial position and momentum of the particles .
• Interaction law
Multiple time step
NVT Nosé - Hoover
MTK Constant Pressure Andersen MTK
. No nuclear quantum effects . .Classical mechanics
PR Nosé Klein Wentzcovitch
NPT MTK NPT
. No electronic transition . Born Oppenheimer approximation .
CP-MD
1.6
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
6 / 58
Introduction
Interaction law, Analitical potential V =
∑
v1 (ri ) +
i
∑
∑
v2 (ri , rj ) +
The model
∑
ij
ijk
The simulation
v3 (ri , rj , rk )+
Integrators Velocity Verlet Multiple time step
NVT
v4 (ri , rj , rk , rl ) + · · ·
Nosé - Hoover
MTK
ijkl
Constant Pressure
. one body:v1 (ri ) . .external field
Andersen MTK PR Nosé Klein Wentzcovitch
. two bodies:v2 (ri , rj ) . atom-atom, electrostatics, stretching . . three bodies:v3 (ri , rj , rk ), bending .
NPT MTK NPT
CP-MD
. four bodies:v4 (ri , rj , rk , rl ), torsion . 1.7
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
7 / 58
Introduction
The simulation
The model
NE ensemble
The simulation Integrators
. Isolated system . C . lusters
Velocity Verlet Multiple time step
NVT Nosé - Hoover
. Newtonian mechanics . Equation of motion from II law: F = ma = −∇r V (r) .
MTK Constant Pressure Andersen MTK PR Nosé Klein
. Constraints . Holonomic constraints [f ({r}, t) = 0] .
Wentzcovitch
NPT MTK NPT
CP-MD
. Lagrangian mechanics . ˙ =K −V L({q}, {q}) . two scalars! 1.8
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
8 / 58
Introduction
Lagrangian N particles
The model
N 1 ∑ ˙ =K −V = L({q}, {q}) mi q˙ 2j − V ({q}) 2 j=1,N
The simulation Integrators Velocity Verlet Multiple time step
NVT
. Equations of motion .
Nosé - Hoover
MTK
d ∂L ∂L − =0 dt ∂ q˙ j ∂qj
. . M holonomic constraints: fk ({r}, t) = 0 . M ∑ Gj = − λk ∇j fk ({r}, t)
Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
k =1
λk Lagrange multipliers d ∂L ∂L − = Gj dt ∂ q˙ j ∂qj
.
1.9
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
9 / 58
Introduction
Hamiltonian
The model The simulation
. From Lagrangian .
Integrators Velocity Verlet Multiple time step
NVT
˙ ∂L(q, q) p= ∂ q˙ .
−→
dq H(q, p) = ·p=K +V dt
Nosé - Hoover
MTK Constant Pressure Andersen
. Equations of motion .
MTK PR Nosé Klein Wentzcovitch
NPT
dq ∂H = dt ∂p ∂H dp =− dt ∂q
.
MTK NPT
CP-MD
6N first order diff. eq. instead of 3N second order
1.10
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
10 / 58
Introduction
Condensed phase simulations
The model
NVE ensemble
Surface effects −→ Periodic Boundary Conditions Angular Momentum no more conserved . Spurious correlations . .minimum image
The simulation
. PBC & Electrostatics:Ewald . V (ϵ = 1) = Vd + Vr + Vs + Vshape
Constant Pressure
i=1 j=1
Nosé - Hoover
MTK
PR Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
R=0
∞
∑ 1 1 ∑∑ qi qj (4π/Λ) exp(−k 2 /4α2 ) cos(k · rij ) 2 k2 N
Vr =
NVT
MTK
∞ ′
N
Velocity Verlet Multiple time step
Andersen
∑ erfc(α∥rij + R∥) 1 ∑∑ Vd = qi qj 2 ∥rij + R∥ N
Integrators
N
i=1 j=1
Vs = − √απ .
∑N
2 i=1 qi
G. Cardini, R. Chelli (U.Firenze)
k̸=0
Vshape =
2π 3Λ MD
∑
2
N
i=1 qi ri
1.11
SMART January 25-29, 2016
11 / 58
Introduction
Other Ensembles
The model The simulation
. P=costant . HC.Andersen, J. Chem. Phys 72 (1980) 2384 (NPH) M. Parrinello, A. Rahaman, Phys. Rev. Lett. 45 (1980) 1196. .
Integrators Velocity Verlet Multiple time step
NVT Nosé - Hoover
MTK Constant Pressure
. T=costant . HC.Andersen, J. Chem. Phys 72 (1980) 2384 (MC/MD) S. . Nosé, Mol. Phys. (1984) 255 (NVT) . Extended Lagrangians . New dynamical variables are added .
Andersen MTK PR Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
L = L′ + K (new v) − V (new v)
1.12
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
12 / 58
Introduction
Numerical Integration
The model
Choice of the time step, ∆t
The simulation Integrators Velocity Verlet Multiple time step
NVT Nosé - Hoover
. Large as possible . to . sample the phase space with less steps as possible
MTK Constant Pressure Andersen MTK PR
. but sufficiently small . to sample the fastest motion and to obtain an acceptable conservation of the constants of the motion .
Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
1.13
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
13 / 58
Numerical integrators and Lioville operators
.
df = dt
n=1
The model The simulation
. Time evolution of f (x) . x ≡ ({q, p}) ∈ phase space 3N [ ∑
Introduction
Integrators Velocity Verlet Multiple time step
NVT
∂f ∂H ∂f ∂H − ∂qn ∂pn ∂pn ∂qn
]
Nosé - Hoover
MTK Constant Pressure Andersen MTK PR
. Liouville operator: L . ] 3N [ ∑ ∂H ∂ ∂H ∂ ıL = − ∂pn ∂qn ∂qn ∂pn n=1 . ıLf (x) =
Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
df (x) dt 1.14
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
14 / 58
Introduction
Numerical integrators and Lioville operators . formal solution . f (xt ) = eıLt f (x0 ) .
The model The simulation Integrators Velocity Verlet Multiple time step
classical propagator: eıLt ; qm propagator e−ıHt/ℏ Starting point for approximate solutions . ıL = ıL1 + ıL2 .
NVT Nosé - Hoover
MTK Constant Pressure Andersen MTK PR
ıL1 =
3N ∑
Nosé Klein
∂H ∂ ∂pn ∂qn
n=1 3N ∑
ıL2 = − . . do not commute .
n=1
Wentzcovitch
NPT MTK NPT
CP-MD
∂H ∂ ∂qn ∂pn
[ıL1 , ıL2 ] ̸= 0
.
1.15
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
15 / 58
Introduction
Numerical integrators and Lioville operators
The model The simulation
. ıLt e ̸= eıL1 t eıL2 t . often the action of eıL1 t and eıL2 t can be evaluated exactly . . symmetric Trotter theorem (1959) . given two operators such that [A, B] ̸= 0 then ( t )m t t e(A+B)t = lim eB 2m eA m eB 2m m→∞ . . Applying the symmetric Trotter theorem . )m ( t t t eıLt = lim eıL2 2m eıL1 m eıL2 2m m→∞ .
Integrators Velocity Verlet Multiple time step
NVT Nosé - Hoover
MTK Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
1.16
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
16 / 58
Introduction
Numerical integrators and Lioville operators
The model The simulation
.
Integrators
posing ∆t =
.
eıLt = .
Velocity Verlet
t m
Multiple time step
lim
m→∞,∆t→0
( ) ∆t ∆t m eıL2 2 eıL1 ∆t eıL2 2
NVT Nosé - Hoover
MTK Constant Pressure
. Hans de Raedt e Bart de Raedt: Approximate propagation . [ Phys. Rev. A28 ( 1983) 3575-3580 ]
Andersen MTK PR Nosé Klein Wentzcovitch
NPT ∆t
.
eıL∆t ≈ eıL2 2 eıL1 ∆t eıL2
∆t 2
+ O(∆t 3 )
MTK NPT
CP-MD
. Tuckerman et al. . reversible integrators .
1.17
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
17 / 58
Numerical integrators and Liouville operators . Example: one dimensional Hamiltonian . p2 H= + V (q) 2m .
Introduction The model The simulation Integrators Velocity Verlet Multiple time step
NVT Nosé - Hoover
MTK Constant Pressure ∆t ∂ ∂ F (q) ∂p ıL2 = F (q) −→ eıL2 ∆t/2 = e 2 ∂p p ∂ ∆t p ∂ ıL1 = −→ eıL1 ∆t = e m ∂q m ∂q
Andersen MTK PR Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
. Exponential of operators . e .
a∆t
=
∞ ∑ (a∆t)k k =0
k! 1.18
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
18 / 58
Introduction
Numerical integrators and Liouville operators
The model
. First operator . e
∆t ∂ F (q) ∂p 2
The simulation Integrators
( ) ∑ ( ) ( ) ∞ 1 ∆t ∂ k q(0) q(0) = F (q) p(0) p(0) k! 2 ∂p k=0 ( ) ( ) q(0) q(0) ( ) = = p(0) + ∆t p ∆t 2 F (q) 2
Velocity Verlet Multiple time step
NVT Nosé - Hoover
MTK Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
.momentun translation
NPT
. Second operator . ( ) ( ( ) p) p ∂ q(0) q(0) + ∆t m q(∆t) ∆t m ∂q e = = p( ∆t p( ∆t p( ∆t 2 ) 2 ) 2 )
MTK NPT
CP-MD
.position translation 1.19
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
19 / 58
Introduction
Numerical integrators and Lioville operators
The model
Position is changed then recompute the force . Third operator . ( ) ( ) ∆t ∂ q(∆t) q(∆t) F (q(∆t)) ∂p 2 e = ∆t p( ∆t p( ∆t 2 ) 2 ) + 2 F (q(∆t)) ) ( q(∆t) = p(∆t)
The simulation Integrators Velocity Verlet Multiple time step
NVT Nosé - Hoover
MTK Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
NPT
.momentum translation
MTK NPT
CP-MD
This is Velocity Verlet Warning When the system is subject to olonomic constraints (SHAKE, RATTLE ...) the Lagrange multipliers have to be determined to full convergence. 1.20
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
20 / 58
Introduction
Multiple time step
The model The simulation Integrators Velocity Verlet Multiple time step
Complex systems −→ different time scale Potential Energy
NVT Nosé - Hoover
MTK
U({ri }) = U intra + U inter
Constant Pressure Andersen MTK PR
Atomic Forces
Nosé Klein Wentzcovitch
∂ Fi = − U = −∇i U intra − ∇i U inter = Fintra + Finter i i ∂ri
NPT MTK NPT
CP-MD
Internal forces −→ fast motions Intermolecular forces −→ slow motions
1.21
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
21 / 58
Multiple time step . System characterized by fast and slow motions . Liouville operator
Introduction The model The simulation Integrators Velocity Verlet Multiple time step
ıL = ıLfast + ıLslow p ∂ ∂ ıLfast = + Ffast m ∂q ∂p ∂ ıLslow = Fslow ∂p
. . Reference Hamiltonian .
NVT Nosé - Hoover
MTK Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
p2 + U(q)fast 2m dU(q)fast Ffast (q) = − dq p q˙ = m Href =
G. Cardini, R. Chelli (U.Firenze)
fast
MD
1.22
SMART January 25-29, 2016
22 / 58
Introduction
Multiple time step
The model The simulation Integrators Velocity Verlet Multiple time step
. RESPA, reference system propagator alghorithm . Tuckerman et al. JCP 97(1992) 1990 Factorization of the full propagator
NVT Nosé - Hoover
MTK Constant Pressure Andersen MTK
e
.
ıL∆t
=e
ıLslow ∆t 2
e
ıLfast ∆t ıLslow ∆t 2
PR
e
Nosé Klein Wentzcovitch
.
Defining τ =
.
∆t n
fast ∆t
.
eıL
NPT MTK NPT
[ τ fast ∂ ]n p ∂ τ fast ∂ F (q) ∂p τ m F (q) ∂p = e2 e ∂q e 2
CP-MD
1.23
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
23 / 58
Introduction
Multiple time step
The model The simulation Integrators Velocity Verlet Multiple time step
NVT
. full RESPA propagator .
Nosé - Hoover
MTK Constant Pressure
e
ıL∆t
∆t slow ∂ F (q) ∂p 2
Andersen
=e [ τ fast ∂ ]n p ∂ τ fast ∂ F (q) ∂p τ m F (q) ∂p 2 ∂q 2 e e e
MTK PR Nosé Klein Wentzcovitch
NPT
.
e
∆t slow ∂ F (q) ∂p 2
MTK NPT
CP-MD
1.24
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
24 / 58
Introduction
Multiple time step
The model The simulation Integrators
. Pseudocode .
Velocity Verlet Multiple time step
NVT
p = p + 0.5 * dt * Fslow do j=1,n p = p + 0.5 * dt/n * Ffast q = q + dt/n * p/m ! modified coordinates call FastForce p = p + 0.5 * dt/n * Ffast enddo ! coordinates call SlowForce p = p + 0.5 * dt * Fslow ! momenta
Nosé - Hoover
MTK Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
1.25
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
25 / 58
Introduction
Canonical Ensemble
The model The simulation Integrators Velocity Verlet Multiple time step
NVT Nosé - Hoover
. NVT . System in contact with an infinite thermal bath. The H of the system is not conserved. The H follows a Boltzmann distribution e−βH .
MTK Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
1.26
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
26 / 58
Introduction
Canonical Ensemble
The model The simulation
. Nosé Lagrangian . S.Nosé, Mol.Phys. 52 (1984) 255 A new degree of freedom: s s describes the interaction with an external bath by a velocity scaling. .
Integrators Velocity Verlet Multiple time step
NVT Nosé - Hoover
MTK Constant Pressure Andersen MTK PR
. Extended Lagrangian .
.
Nosé Klein Wentzcovitch
NPT
( ) N ∑ mi s2 dri 2 LNose = − U({r}) 2 dt i ( ) Q ds 2 + − (3N + 1)kTeq ln(s) 2 dt
MTK NPT
CP-MD
1.27
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
27 / 58
Introduction
Canonical Ensemble
The model The simulation
. Nosé Hamiltonian . conjugate momenta from the Lagrangian
Integrators Velocity Verlet Multiple time step
NVT Nosé - Hoover
MTK
∂L = mi s2 r˙ i ∂ r˙ i ∂L ps ≡ = Q s˙ ∂ s˙
Constant Pressure
pi ≡
Andersen MTK PR Nosé Klein Wentzcovitch
NPT MTK NPT
Hamiltonian of the extended system (N particles + s) HNose = .
N ∑ i
CP-MD
p2i ps2 − (3N + 1)kTeq ln(s) − U({r}) + 2Q 2mi s2
1.28
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
28 / 58
Introduction
Canonical Ensemble
The model The simulation Integrators
. Nosé equations of motion . virtual variables:p, r, t
.
Velocity Verlet Multiple time step
NVT Nosé - Hoover
dri ∂H pi = = dt dpi mi s 2 dpi ∂H U({r}) = =− dt dri ∂ri ds ∂H ps = = dt dps Q ) ( N ∑ p2 dps ∂H 1 i = = − (3N + 1)kTeq 2 dt ds s mi s
MTK Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
i
1.29
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
29 / 58
Introduction
Canonical Ensemble
The model
. real variables . r and s correspond to the real variables, while ⃗π = p/s , ′ .ps = ps /s and τ = t/s
The simulation
. equations of motion .
MTK
Integrators Velocity Verlet Multiple time step
NVT Nosé - Hoover
Constant Pressure Andersen MTK
.
dri dri pi ⃗πi =s = = dτ dt mi s mi d⃗πi dpi /s dpi 1 ds =s = − pi dτ dt dt s dt ds ds sps′ =s = dτ dt Q ) ( N ′ ∑ ⃗π 2 1 dsps /Q s dps i − (3N + 1)kTeq = = dτ Q dt mi Q
PR Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
i
1.30
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
30 / 58
Introduction
Canonical Ensemble
The model The simulation
. Constant of the motion in real variables .
Integrators Velocity Verlet Multiple time step
NVT
HNose
N ∑ ⃗πi2 = + U({r}) 2mi
Nosé - Hoover
MTK Constant Pressure
i
.
Andersen
(sps′ )2 + + (3N + 1)kTeq ln s 2Q
MTK PR Nosé Klein Wentzcovitch
NPT
• transformation to real variables is not canonical
MTK NPT
CP-MD
• HNose It is not an Hamiltonian • implementation in real variables • eqm are not easy to be implemented in MD
1.31
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
31 / 58
Introduction
Canonical Ensemble
The model
. Nosé - Hoover equations . Hoover Phys.Rev.A31 (1985)1695: non canonical change of variables in Nosé eqm ds ⃗πi = psi ,dτ = dts , 1s dτ = dη dt and ps = pη and posing the number of dof to 3N
.
pi r˙i = m pη p˙ i = −∇i U({r}) − pi Q pη η˙ = Q N ∑ p2i p˙ η = − 3NkTeq mi
The simulation Integrators Velocity Verlet Multiple time step
NVT Nosé - Hoover
MTK Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
i
1.32
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
32 / 58
Canonical Ensemble . Nosé - Hoover . • η acts as a friction term • p˙ η twice the difference of kinetic energy and its canonical average
Introduction The model The simulation Integrators Velocity Verlet Multiple time step
NVT Nosé - Hoover
MTK
• It is a non Hamiltonian system
Constant Pressure Andersen
Conserved Energy
MTK PR Nosé Klein
pη2 H(r, p, η, pη ) = H(r, p) + + 3NkTeq 2Q
Wentzcovitch
NPT MTK NPT
The real ∑Hamiltonian is ηH(r, ∑Np). When N F = 0 also e i i i Fi is constant and the distribution function of the momenta is wrong
.
CP-MD
p2 1 f (p) ̸= √ e− 2mkT 2πmkT 1.33
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
33 / 58
Introduction
Canonical Ensemble
The model The simulation Integrators
. Nosé - Hoover . Martyna et al. J. Chem. Phys. 97 (1992) 2635 The wrong distribution function is due to the existence of two conservation laws. The eqm do not have a sufficient number of variables! .
Velocity Verlet Multiple time step
NVT Nosé - Hoover
MTK Constant Pressure Andersen MTK PR Nosé Klein
. Nosé - Hoover Chain . The f (pη ) must follow a Maxwell-Boltzmann distribution pη must be coupled to a thermostat. The chain of thermostats should be infinite The lenght is chosen finite (M thermostats) .
Wentzcovitch
NPT MTK NPT
CP-MD
1.34
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
34 / 58
Introduction
Canonical Ensemble . Nosé - Hoover Chain eqm .
.
The model The simulation Integrators
pi r˙ i = m pη p˙ i = Fi − 1 pi Q1 p ηj η˙j = j = 1, · · · · · · , M Qj N 2 ∑ pi pη p˙ η1 = − 3NkT − 2 pη1 mi Q2 i=1,N [ 2 ] pηj−1 pηj+1 j = 2, · · · · · · , M − 1 p˙ ηj = − kT − pη Qj−1 Qj+1 j [ 2 ] pηM−1 p˙ ηM = − kT QM−1
Velocity Verlet Multiple time step
NVT Nosé - Hoover
MTK Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
1.35
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
35 / 58
Introduction
Canonical Ensemble
The model The simulation Integrators
. Nosé - Hoover Chain . Previous equations cannot be transformed in an Hamiltonian system Optimal choice: Q1 = 3NkT τ 2 , Qj = NkT τ 2 j = 2, · · · , M τ. > 10∆t . Conserved Energy . H = H(r, p) +
NVT Nosé - Hoover
MTK Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
NPT MTK NPT
M p2 ∑ ηj j=1
.
Velocity Verlet Multiple time step
2Qj
+ 3NkT η1 + kT
M ∑
CP-MD
ηj
j=2
1.36
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
36 / 58
Introduction
Canonical Ensemble
The model The simulation Integrators Velocity Verlet Multiple time step
NVT
. Massive Nosé - Hoover Chain . add a separate chain to each atom of the system much more rapid equilibration some modes are often weakly coupled Tobias et al. J. Phys. Chem. 97 (1993) 12959 rapid thermalization of a protein in solution .
Nosé - Hoover
MTK Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
1.37
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
37 / 58
Introduction
Canonical Ensemble
The model The simulation Integrators Velocity Verlet Multiple time step
. Integration of Nosé - Hoover Chain eqm . The Liouville operator can be written as:
NVT Nosé - Hoover
MTK Constant Pressure
ıL = ıLNHC + ıL1 + ıL2
Andersen MTK PR
.e
ıL∆t
=e
ıLNHC ∆t/2 ıL2 ∆t/2 ıL1 ∆t ıL2 ∆t/2 ıLNHC ∆t/2
e
e
e
e
3
+O(∆t )
Nosé Klein Wentzcovitch
NPT
. Velocity Verlet . eıLH ∆t = eıL2 ∆t/2 eıL1 ∆t eıL2 ∆t/2 .
MTK NPT
CP-MD
1.38
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
38 / 58
Introduction
Canonical Ensemble . Thermostat forces .
The model The simulation Integrators
G1 =
Velocity Verlet Multiple time step
N ∑ pi2 − 3NkT mi
NVT Nosé - Hoover
MTK
i=1,N
Gj = .
pη2j−1 Qj−1
Constant Pressure Andersen
− kT
MTK PR Nosé Klein Wentzcovitch
.
NPT MTK NPT
ıLNHC = −
N ∑ pη i=1
+ .
∑ pηj ∂ ∂ + ∂pi Qj ∂ηj M
1
Q1
M−1 ∑(
pi ·
G j − p ηj
j=1
CP-MD
j=1
pηj+1 Qj+1
)
∂ ∂ + GM ∂pηj ∂pηM 1.39
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
39 / 58
Introduction
Canonical Ensemble
The model The simulation Integrators Velocity Verlet Multiple time step
NVT
Factorization of the propagator is not sufficient! The resulting integrator is not sufficiently robust. The application of RESPA alone require many cycles. An improvement has been obtained coupling RESPA with an higher order fatorization scheme: Suzuki-Yoshida [Phys. Lett. A150(1990)262,J. Math. Phys. 32(1991)400]
Nosé - Hoover
MTK Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
1.40
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
40 / 58
Introduction
Canonical Ensemble
The model
. Suzuki-Yoshida . Given a primitive factorization, S(λ), of an operator
The simulation Integrators Velocity Verlet Multiple time step
NVT
S(λ) = eλA2 /2 eλA2 eλA1 /2 = eλ(A1 +A2 )
Nosé - Hoover
MTK
chosen an even order of the error in the factorization 2s this gives nSY = 5s−1 weigths, wα , such that:
Constant Pressure Andersen MTK PR Nosé Klein
nSY ∑
Wentzcovitch
wα = 1
α=1
NPT MTK NPT
CP-MD
The factorization is eλ(A1 +A2 ) ≈ .
nSY ∏
S(wα λ)
α=1 1.41
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
41 / 58
Introduction
Canonical Ensemble
The model The simulation Integrators
. RESPA . Setting λ = ∆t/2
Velocity Verlet Multiple time step
NVT Nosé - Hoover
MTK
e
ıLNHC ∆t/2
≈
nSY ∏
Constant Pressure
S(wα ∆t/2)
Andersen MTK PR
α=1
Nosé Klein Wentzcovitch
the operator is to be applied n times with a time step wα ∆t 2n [n ( )]n SY ∏ ∆t ıLNHC ∆t/2 e ≈ S wα 2n α=1 .
NPT MTK NPT
CP-MD
1.42
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
42 / 58
Introduction
Canonical Ensemble
The model The simulation
. Factorization of eıLNHC ∆t/2 . The choice is not unique ∂ A new kind of operator ecx ∂x Given a function p, the action of the operator is [∞ ] ∑ c k ( ∂ )k ∂ cp ∂p e p p= p k! ∂p =p
k=0 ∞ ∑
k =0
Integrators Velocity Verlet Multiple time step
NVT Nosé - Hoover
MTK Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
NPT
ck = pec k!
MTK NPT
CP-MD
c .Given a function f (p), the results is f (pe )
Terms of this kind will act scaling the momentum of the thermal bath. 1.43
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
43 / 58
Isoenthalpic-Isobaric Ensemble . Andersen . H.C.Andersen, J.Chem. Phys. 72 (1980) 2384 First attempt to perform MD simulations at costant P The volume,V , is treated as a dynamical variable. Cartesian coordinates {ri } are replaced by scaled coordinates {⃗ ρi }: ρ ⃗i = ri V −1/3
Introduction The model The simulation Integrators Velocity Verlet Multiple time step
NVT Nosé - Hoover
MTK Constant Pressure Andersen MTK PR Nosé Klein
Postulated Lagrangian:
Wentzcovitch
NPT
N N ∑ ∑ ⃗˙ i · ρ ⃗˙ i − ⃗˙ V , V˙ ) = 1 mV 2/3 L({⃗ ρ}, {ρ}, ρ U(V 1/3 ρij ) 2 i=1
MTK NPT
CP-MD
ii
1 ⃗2 + Π + Pext V 2MP
NVT Nosé - Hoover
MTK Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
. Andersen real variables . Conserved Energy H = H0 (r, p) +
NPT MTK NPT
CP-MD
pV2 + Pext V 2MP
with pV = MP V˙ . 1.45
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
45 / 58
Introduction
Isoenthalpic-Isobaric Ensemble . MTK eqm . Martyna, Tobias, Klein J.Chem.Phys. 101(1994)4177 1 V˙ a . variable ϵ = 3 ln(V /V0 ) with momentum pϵ = MP 3V
The model The simulation Integrators Velocity Verlet Multiple time step
NVT Nosé - Hoover
MTK Constant Pressure
pi pϵ + ri mi MP ) ( pϵ 3 p˙ i = Fi − pi 1 + MP (3N − Nconstr ) 3Vpϵ V˙ = MP N 3 ∑ p2i p˙ ϵ = 3V (P int − Pext ) + Ndof mi
Andersen
r˙ i =
MTK PR Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
i=1
int ] and P int = with P int = 13 Tr [Pαβ αβ G. Cardini, R. Chelli (U.Firenze)
1 V
∑N [ piα piβ i=1 MD
mi
] + Fiα riβ 1.46
SMART January 25-29, 2016
46 / 58
Isoenthalpic-Isobaric Ensemble . Parrinello - Rahman . J.Appl.Phys. 52(1981)7182 Parrinello and Rahaman same estended Lagrangian of Andersen but with variable cell shape transformation matrix from scaled,s, to cartesian,r ax bx cx H = ay by cy az bz cz r = Hs real distances by metric matrix G = Ht H √
Introduction The model The simulation Integrators Velocity Verlet Multiple time step
NVT Nosé - Hoover
MTK Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
V = det H, cell sides a = ax2 + ay2 + az2 .... 9 elements of the matrix are used as dynamical variables. 3 sides and 3 angles of the cell. .3 Euler angles!! G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
1.47
47 / 58
Isoenthalpic-Isobaric Ensemble . Molecular case . Nosé and Klein Mol. Phys. 50 (1983) 1055 No rotating simulation box H11 H12 H13 H = 0 H22 H23 0 0 H33
Introduction The model The simulation Integrators Velocity Verlet Multiple time step
NVT Nosé - Hoover
MTK Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
H11 = a
NPT
H12 = b cos(γ)
CP-MD
MTK NPT
H13 = c cos(β)
.
H22 = b sin(γ) cos(α) − cos(β) cos(γ) H23 = c sin(γ) √ 2 − H2 H33 = c 2 − H13 23 G. Cardini, R. Chelli (U.Firenze)
MD
1.48
SMART January 25-29, 2016
48 / 58
Introduction
Isoenthalpic-Isobaric Ensemble
The model The simulation Integrators Velocity Verlet Multiple time step
. Molecular case . Center of mass scaling Small molecules center of mass variables: ⃗α Rα ; Pα ; F internal Pmolec
.
NVT Nosé - Hoover
MTK Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
] Molec [ 1 ∑ P2α ⃗ = + Rα · Fα 3V Mα
NPT MTK NPT
CP-MD
α=1
1.49
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
49 / 58
Introduction
Isobaric Ensemble
The model The simulation Integrators Velocity Verlet Multiple time step
NVT Nosé - Hoover
. Wentzcovitch . Phys. Rev. B44 (1991) 2358 Dynamical variable Stress Tensor Very useful to optimize crystal structure .
MTK Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
1.50
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
50 / 58
Introduction
NPT
The model The simulation Integrators
. es Molecules . L =
N ∑ α=1
Velocity Verlet Multiple time step
{
n ∑ i=1
miα ⃗ 2 s2 σ˙ iα 2
}
Mα 2 ⃗ t ⃗ s (H ρ˙ α ) (H ρ˙ α ) + 2
NVT Nosé - Hoover
MTK Constant Pressure Andersen
WP ˙ − U({⃗σiα + H⃗ ρα }) + Tr (H˙ t H) 2 Ws 2 s˙ − Pext det(H) − 3NkText ln s + 2
MTK PR Nosé Klein Wentzcovitch
NPT MTK NPT
CP-MD
.NPT Lagrangian with a simple Nosé Nosé-Hoover chain separated thermostats for atoms and barostat
1.51
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
51 / 58
Introduction
NPT . MTK factorization . Tuckerman et al. J. Phys. A39 (2006) 5629 factorization scheme for an atomic system
The model The simulation Integrators Velocity Verlet Multiple time step
NVT
e
ıL∆t
=
eıLNHC−baro ∆t/2 eıLNHC−part ∆t/2 eıLg,2 ∆t/2 eıL2 ∆t/2 eıLg,1 ∆t eıL1 ∆t eıL2 ∆t/2
Nosé - Hoover
MTK Constant Pressure Andersen
.
eıLg,2 ∆t/2 eıLNHC−part ∆t/2 eıLNHC−baro ∆t/2
MTK PR Nosé Klein Wentzcovitch
NPT
˙ −1 pg = Wp HH ] N [ ∑ pg pi ıL1 = + ri mi Wp i=1 ( ) ] N [ ∑ ∂ 1 Tr[pg ] ıL2 = Fi − pg Wp + I pi · N f WP ∂pi
MTK NPT
CP-MD
i=1
1.52
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
52 / 58
Introduction
NPT
The model The simulation Integrators
ıLg,1
pg H ∂ = Wp ∂H [
ıLg,1 = det[H](Pint
Velocity Verlet Multiple time step
]
N 1 ∑ p2i ∂ − IPext ) + I Nf mi ∂pg i=1
ıLNHC−part = −
N ∑ i=1
p η1 ∂ pi · + Q1 ∂pi
M ∑ j=1
NVT Nosé - Hoover
MTK Constant Pressure Andersen MTK PR
p ηj ∂ Qj ∂ηj
Nosé Klein Wentzcovitch
NPT
) M−1 ∑( pηj+1 ∂ ∂ Gj − pηj + GM Qj+1 ∂pηj ∂pηM
MTK NPT
CP-MD
j=1
ıLNHC−baro = same as ıLNHC−part with pg
1.53
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
53 / 58
Introduction
NPT
The model The simulation Integrators
. pseudo masses . For T of particles:
Velocity Verlet Multiple time step
NVT Nosé - Hoover
Q1 = 3kT τp2
Qj = kT τp2
MTK Constant Pressure Andersen MTK
For T of barostat
PR Nosé Klein Wentzcovitch
Q1 =
kT τb2
Qj =
kT τb2
NPT MTK NPT
CP-MD
For pressure WP = (3N + 3)kT τb2 Martyna 1992, 1996 .
1.54
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
54 / 58
Introduction
First Principles Molecular Dynamics: CP-MD
The model The simulation
Unified Approach for Molecular Dynamics and Density-Functional Theory R. Car and M. Parrinello Phys. Rev. Lett. 55 (1985) 2471 . CP-MD extended Lagrangian .
Integrators Velocity Verlet Multiple time step
NVT Nosé - Hoover
MTK Constant Pressure Andersen
L=
occ.orb. ∑ ∫ i
+ .
∑
(∫ λij
µi ∥ψ˙ i (r)∥2 dr + ψi∗ (r)ψi (r)dr
1∑ 2
MTK PR
˙ 2 − E[{ψi }, Rα ] Mα R α
Nosé Klein Wentzcovitch
NPT
α
)
MTK NPT
− δij
CP-MD
ij
An intertial factor µi , pseudomass (mass ∗ lenght 2 ), is associated to the electronic degree of freedom. 1.55
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
55 / 58
Introduction
First Principles Molecular Dynamics: CP-MD
The model The simulation Integrators
. CP-MD: equations of motion . Assumption: the system is on the BO surface µψ¨i = −
occ.orb. ∑ δE + λij ψj i = 1, ..., occ.orb δ ψ˙ i j=1
Velocity Verlet Multiple time step
NVT Nosé - Hoover
MTK
(1)
Constant Pressure Andersen MTK PR Nosé Klein Wentzcovitch
¨ I = −∇R E I = 1, .., Atoms MI R I
NPT
(2)
MTK NPT
CP-MD
Hellman-Feynman .
⟨ ⟩ −∇RI E({RI }) = − Ψ0 | ∇RI H | Ψ0
1.56
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
56 / 58
Introduction
First Principles Molecular Dynamics: CP-MD
The model The simulation Integrators Velocity Verlet
. CP-MD: trajectories . The trajectories generated by CP equations does not corresponds to the true ones unless
Multiple time step
NVT Nosé - Hoover
MTK Constant Pressure Andersen MTK
E[{ψi }, {RI }]
PR Nosé Klein Wentzcovitch
is . in the minimum respect {ψi } at each time step This is obtained by choosing the value of µ to obtain a decoupling between electronic and nuclear degree of freedom
NPT MTK NPT
CP-MD
1.57
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
57 / 58
Introduction
Rare events
The model
. Metadynamics . Laio, Parrinello PNAS 99(2002) 12562 Iannuzzi, Laio, Parrinello PRL 90(2003) 238302 .
The simulation
. Estended Lagrangian . collective variables sα
MTK
Integrators Velocity Verlet Multiple time step
NVT Nosé - Hoover
Constant Pressure Andersen MTK PR
L
MTD
=L+
∑1 α
2
Mα s˙ α2 −
∑1 α
2
Nosé Klein
kα [Sα − sα ] − V (t, s) 2
Wentzcovitch
NPT MTK NPT
CP-MD
kα is the force constant that couple the collective variables to the system V (t, s) is a time dependent potential arising from the accumulation of repulsive gaussian hills modified every .50-100 MD steps 1.58
G. Cardini, R. Chelli (U.Firenze)
MD
SMART January 25-29, 2016
58 / 58