Download presentation
Presentation is loading. Please wait.
1
Topics in Molecular Modeling: II
Topics in Molecular Modeling: II. Numerical Methods for the Time-integration Xiantao Li Department of Mathematics, Pennsylvania State University
2
Outline Hamiltonian system (NVE ensemble) Operator-splitting methods
Energy conservation properties Stochastic models Strong and weak convergence
3
Hamiltonian systems Hamiltonβs principle π = ππ» ππ π =β ππ» ππ
Examples: mass spring model, many-body problems, pendulum model, Lotka-Volterra model etc. The mapping π 0 , π 0 β(π π‘ ,π π‘ ) is symplectic A numerical method is symplectic if it defines a symplectic mapping
4
Many-Particle Systems
Coordinate and Momentum π π π‘ , π π π‘ , π=1,2,β―,π. The equations: π π = π π π π π π =β πβ π π»π( π π β π π ) Linear momentum:π= π π π Angular momentum: πΏ= π π π Γ π π Total energy: π» π,π = π π π 2 2 π π πβ π π( π π β π π ) Conservation: π ππ‘ π=0, π ππ‘ πΏ=0, π ππ‘ π»=0. (q_i, p_i), i=1, 2, \cdots, N. \dot{q}_i=\frac{p_i}{m_i} \dot{p}_i= -\sum_{j\ne i}V'(|q_i-q_j|)\frac{q_i-q_j}{|q_i-q_j|} L=\sum_i q_i \times p_i H= \sum_i \frac{p_i^2}{2m_i} + \frac12\sum_{i\ne j}V(|q_i - q_j|)
5
First Integrals (Invariants)
In general, for an ODE system, π₯ =π π₯ , π π₯ is a first integral (or invariants) if π ππ‘ π π₯ π‘ =0. Most numerical methods preserve linear invariant Only some methods preserve quadratic invariants
6
Symmetry If πβπ=βπβπ, the function is symmetric wrt π.
The solutions of the corresponding ODEs will be Ο- reversible πβΞ¦= β Ξ¦ β1 βπ. For example, π π,π = π,βπ . A numerical method is Ο- reversible if the solution satisfies the same properties. Explicit RK methods are not symmetric.
7
Symplectic Structure Let π½= 0 πΌ βπΌ 0 . If y=(π,π), then the Hamiltonian ODEs can be written as π¦ =π½βπ»(π¦). A linear mapping A is symplectic if π΄ π π½π΄=π½. A nonlinear mapping g(x) is symplectic if βπ= ππ ππ₯ is symplectic matrix. For Hamiltonian system, the Jacobian matrix π(π π‘ ,π π‘ ) π( π 0 , π 0 ) is symplectic. Therefore, the mapping π 0 , π 0 β(π π‘ ,π π‘ ) is symplectic
8
Symmetric and symplectic methods
Symmetric methods Order of accuracy is always even Very convenient for an extrapolation procedure Symplectic methods Very good energy conservation properties Promising accuracy over long time integration Provide good statistics. Explicit RK methods are not symplectic.
9
A special class of symplectic methods
Nonlinear dynamical system: π₯ =π π₯ ,π₯ 0 = π₯ 0 . dim π₯ =π. Wronskian: π π‘ = ππ₯(π‘) π π₯ 0 . Variational equation: π π‘ =π΄ π‘ π π‘ , π΄ π‘ :=βπ π₯ π‘ , π 0 =πΌ. Fundamental solution: π¦ =π΄ π‘ π¦, π¦ 0 = π¦ 0 ο¨π¦ π‘ =π π‘ π¦ 0 . In particular, If π¦ π‘ =π π₯ π‘ , then π¦ =π΄ π‘ π¦, π¦ 0 =π π₯ 0 . Therefore, π π₯ π‘ =π π‘ π π₯ 0 = ππ₯ π‘ π π₯ 0 π( π₯ 0 ).
10
Semi-group notation For any quantity of interest: π΄ π‘, π₯ 0 βπ π₯ π‘; π₯ 0 . Time derivative: π΄ =π π₯ π‘ π βπ π₯ π‘ =π π₯ 0 β
β π₯ 0 π΄=:πΏπ΄. L is a differential operator w.r.t. π₯ 0 Time evolution: π΄ =πΏπ΄ο¨ π΄ π‘ = π π‘πΏ π΄ 0 . This is the foundation for operator-splitting methods.
11
Newtonian dynamics Equations of motion: π₯ =π(π₯)
Operator:πΏ= π£ 0 β
π π₯ 0 +π π₯ 0 β
π π£ 0 Operator splitting: πΏ= πΏ 1 + πΏ 2 corresponds to x'=v, \quad v'=f(x)
12
Operator splitting Both equations are solvable Do we have No, unless
13
BCH (Baker-Campbell-Hausdorff) formulas
Commutator: BCH formula I: First-order splitting: Implementation: Symplectic Euler:
14
Symmetric Splitting BCH formula II: Symmetric splitting:
Implementation:
15
Properties of the second splitting method
Second order accuracy in time Symplectic Symmetric Energy conservation: π» π Ξπ‘ π‘ , π Ξπ‘ π‘ βπ» π π‘ ,π π‘ =π(Ξ π‘ 2 ) Conserve the linear and angular momentum
16
General splitting methods
Introduce multiple fractional steps The coefficients are determined by maximizing the order of accuracy. Formulas are available up to eighth order.
17
Extended Hamiltonian systems
In practice, the Hamiltonian system is often connected a heat bath or pressure bath, modeled by additional equations. Nose-Hoover thermostat π π = π π π π π π =β β π π πβπ π π π = π π [ 1 dN π π π 2 π π βπ] Symmetric splitting: πΏ= πΏ π₯ + πΏ π + πΏ ππ» π Ξπ‘πΏ β π πΏ ππ» Ξπ‘ π πΏ π£ Ξπ‘ 2 π πΏ π₯ Ξπ‘ π πΏ π£ Ξπ‘ 2 π πΏ ππ» Ξπ‘ 2
18
Problem with multiple scales
Hamiltonian system driven by two forces π₯ = 1 π 2 π π₯ +π(π₯) π π₯ : short-range fast force π π₯ : long-range slow force; More difficult to compute. Multiple time-stepping: evaluate π π₯ on the fast time scale with step size πΏπ‘, and evaluate g π₯ on the slow time scale with step size Ξπ‘: Ξπ‘β«πΏπ‘.
19
Multiple time-stepping
Let π π‘ πΏ 1 be the evolution operator for the fast dynamics: π₯ =π£, π£ = 1 π 2 π π₯ Let π π‘ πΏ 2 be the evolution operator for the slow dynamics π₯ =0 π£ =π π₯ Overall algorithm: π Ξπ‘πΏ β π Ξπ‘ 2 πΏ 2 π Ξπ‘ πΏ 1 π Ξπ‘ 2 πΏ It is symplectic. Operations: Kick + Evolve + Kick. Local accuracy: π Ξ π‘ 3 π 2 .
20
More accurate splitting
To eliminate the leading term in the error, we constructed the following splitting method π Ξπ‘πΏ β π Ξπ‘ 4 πΏ 2 π 2Ξπ‘ 3 πΏ 1 π 3Ξπ‘ 4 πΏ 2 π Ξπ‘ 3 πΏ 1 This method also have better energy conservation property.
21
Example: dynamics of butane molecule
22
ππ₯=π£ππ‘ ππ£= π π₯ βπΎπ£ ππ‘+πππ(π‘)
Langevin dynamics Langevin stochastic differential equation: ππ₯=π£ππ‘ ππ£= π π₯ βπΎπ£ ππ‘+πππ(π‘) π₯,π£β π
π : position, velocity π=π π₯ : π
π β π
π : non-linear conservative potential, π π₯ = β β π₯ π(π₯) πΎβ π
πΓπ ,πβ π
πΓπ : friction matrix constant and diffusion matrix constant, related by the fluctuation dissipation formula π π π =2 π π΅ ππΎ π=( π 1 , π 2 ,β¦, π π )={π π‘ :π‘β₯0}: standard π-dimensional Wiener process / Brownian motion Assume additive noise: π is constant
23
Strong convergence Definition: A one-step method π= π Ξπ‘ with step size Ξπ‘>0 is said to converge in the strong sense to a stochastic process π= π π‘ at time π=πΞπ‘, π=π Ξπ‘ β {1,2,β¦} provided πΈ π π β π Ξπ‘ π β0 as Ξπ‘β0. Further, we say the convergence is of order πΎβ{0.5,1,1.5,2,β¦} provided there exists constants πΆ=πΆ π ,Ξ>0 such that πΈ π π β π Ξπ‘ π <πΆΞ π‘ πΎ for all 0<Ξπ‘<Ξ. Reduces to usual def. of convergence when π=0 To test convergence rates numerically, we take M many samples (M>>1) of X and Y and approximate the error: πΈ π π β π Ξπ‘ π β 1 π π=1 π π π π π β π Ξπ‘ π, π π =:πΈ Ξπ‘ .
24
Strong ItΓ΄-Taylor expansion
Analysis will involve comparison with the ItΓ΄-Taylor formula. Notation: step size Ξπ‘>0, independent Brownian increments Ξ π π β π π Ξπ‘ , πΈ Ξ π π Ξ π π =Ξπ‘ πΏ ππ , and independent stochastic integrals πΌ π,0 β 0 Ξπ‘ π π π‘ ππ‘ , πΈ πΌ π,0 πΌ π,0 = Ξ π‘ πΏ ππ Order 1 and : π₯ Ξπ‘ π£ Ξπ‘ = π₯ π£ + π£ π π₯ βπΎπ£ Ξt+ π=1 π 0 π π Ξ π π +π».π.π π₯ Ξπ‘ π£ Ξπ‘ = π₯ π£ + π£ π π₯ βπΎπ£ Ξπ‘+ π=1 π 0 π π Ξ π π + π π₯ βπΎπ£ β π₯ π π₯ π£βπΎπ π₯ + πΎ 2 π£ Ξ π‘ π=1 π π π βπΎ π π πΌ π,0 +π».π.π. We derived an order 3. Higher order stochastic integrals are involved: 0 Ξπ‘ 0 π‘ ππ π π π (π‘) , 0 Ξπ‘ 0 π‘ 0 π π π π π’ ππ ππ‘
25
π₯ π+1 π£ π+1 = π₯ π π£ π + π£ π π π₯ π βπΎ π£ π Ξt+ π=1 π 0 π π Ξ π π π
Existing methods References: for example, (1) Leimkuhler & Matthews, Molecular Dynamics (2014) and (2) Kloeden & Platen, Num. Sol. Of SDEβs (1991) Euler Maruyama (order 1): π₯ π+1 π£ π+1 = π₯ π π£ π π£ π π π₯ π βπΎ π£ π Ξt+ π=1 π 0 π π Ξ π π π Milstein (order 1) and ItΓ΄-Taylor method (order 1): reduce to the same method as Euler Maruyama for Langevin dynamics with additive noise (i.e. constant diffusion π) ItΓ΄-Taylor method (order 2): requires computing β π₯ π(π₯) Stochastic velocity Verlet (SVV): no β π₯ π(π₯) and only one π evaluation. No clear generalization to a third order method. Refer to Swope, Anderson, Berens & Wilson (1982). Theorem: (Telatovich and Li) SVV has strong order 2. ItΓ΄-Taylor method (order 3): requires computing β π₯ π(π₯) and β π₯ 2 π(π₯)
26
Existing methods (continued)
Direct splitting methods: split ππ₯=π£ππ‘ ππ£= π π₯ βπΎπ£ ππ‘+πππ(π‘) into ππ₯=π£ππ‘ ππ£= and ππ₯= ππ£= π π₯ βπΎπ£ ππ‘+πππ(π‘) Solve these simpler linear systems exactly, back-to-back Solution expansion involves Lie brackets High order convergence only in the weak sense Can do more sophisticated direct splittings Direct splitting methods lack stochastic integrals necessary for higher order convergence in strong sense Theorem: (Telatovich & Li) The splitting methods have strong order at most 1. Challenge: Higher order schemes require not only more smoothness but also more information about W!
27
Higher order operator-splitting methods
Starting point: Kunitaβs solution operator π π‘ (Kunita, 1980). π π‘ = exp π π‘ π 0 , π 0 = π₯,π£ π π π‘ is given by: π π‘ =π‘ π 0 + π=1 π π π π‘ π π π=1 π π‘, π π π‘ [ π 0 , π π ] π=1 π π‘, π π π‘ ,π‘ π 0 , π π , π 0 +π».π.π. Vector fields π 0 βπ£ π π₯ + π π₯ βπΎπ£ π π£ , π π β π π π π£ , Lie bracket π 0 , π π β π 0 π π β π π π 0 , stochastic integrals π‘, π π π‘ β 0 π‘ π π π π π β 0 π‘ π π π ππ Third order brackets and integrals defined similarly ODE special case (no noise π=0): π π‘ =π‘ π 0 is a simple finite sum (comprehensive exam) We can make truncations of π π‘
28
Truncations of the operator π π‘
Truncation I: π π‘ β π π‘ πΌ =π‘ π 0 + π=1 π π π π‘ π π Truncation II: π π‘ β π π‘ πΌπΌ =π‘ π 0 + π=1 π π π π‘ π π π=1 π π‘, π π π‘ [ π 0 , π π ] Truncation III: π π‘ β π π‘ πΌπΌπΌ =π‘ π 0 + π=1 π π π π‘ π π π=1 π π‘, π π π‘ [ π 0 , π π ] π=1 π π‘, π π π‘ ,π‘ π 0 , π π , π 0
29
Multiple stochastic integrals
For truncations I, II, and III (Misawa, 2000): Ξ π π = π π Ξπ‘ =β«1π π π (π‘), Ξ π π β 1 2 Ξπ‘,Ξ π π = ππ π π π π‘ β 1π π π π ππ‘ , Ξ π π β Ξπ‘,Ξ π π ,Ξπ‘ = ππ’π π π π ππ‘ β2 1π π π π’ ππ ππ‘ +Ξπ‘Ξ π π Joint symmetric covariances (T.): πΈ Ξ π π Ξ π π πΈ Ξ π π Ξ π π πΈ Ξ π π Ξ π π πΈ Ξ π π Ξ π π πΈ Ξ π π Ξ π π πΈ Ξ π π Ξ π π 3πΓ3π = Ξπ‘πΌ Ξ π‘ πΌ β Ξ π‘ πΌ Ξ π‘ πΌ Computed using ItΓ΄βs isometry πΈ 0 Ξπ‘ π π‘ π π π π‘ =πΈ 0 Ξπ‘ π 2 π‘ ππ‘ and πΈ π π‘ π π = min (π‘,π )
30
Reduced Differential Equations
π Ξπ‘ β π Ξπ‘ πΌ β π₯ =π£Ξπ‘ π£ = π π₯ βπΎπ£ Ξπ‘+πΞπ π Ξπ‘ β π Ξπ‘ πΌπΌ β π₯ =π£π₯π‘βππ₯π π£ = π π₯ βπΎπ£ π₯π‘+ππ₯π+πΎππ₯π π Ξπ‘ β π Ξπ‘ πΌπΌπΌ β π₯ =π£Ξπ‘βπΞπ+πΎπΞπ π£ = π π₯ βπΎπ£ Ξπ‘+πΞπ+πΎπΞπβ π» π₯ π π₯ π+ πΎ 2 π π₯π Once sampled, we can treat Ξπ,Ξπ,Ξπ as constants Rescale π‘βπ‘Ξπ‘ and solve from 0 to πΞπ‘ instead of 0 to π Approximate π Ξπ‘ = exp π Ξπ‘ π(0)β π πΌ,πΌπΌ,πΌπΌπΌ Ξπ‘ β exp π Ξπ‘ I,II,III π 0 , still non-linear due to f Approximate π πΌ,πΌπΌ,πΌπΌπΌ π₯π‘ numerically by standard splitting techniques
31
Operator-splitting methods
Useful integration method for ODEs. Order 1 naΓ―ve splitting: exp π΄+π΅ β exp π΄ exp π΅ Order 2 symmetric/Strang splitting: exp π΄+π΅ β exp π΄ 2 exp π΅ exp π΄ 2 Order 4 Neri splitting: exp π΄+π΅ β exp π 1 π΄ exp π 1 π΅ exp π 2 π΄ exp π 2 π΅ exp π 3 π΄ exp π 3 π΅ exp π 4 π΄ where π 1 = 1 2 2β , π 2 = 1 2 β π 1 , π 3 = π 2 , π 4 = π 1 and π 1 = 1 2β 3 2 , π 2 =1β2 π 1 , π 3 = π 1
32
Baker-Campbell-Hausdorff (BCH) formula
Useful for obtaining a βlocalβ time estimate for the strong error. Theorem: If A and B are (non-commuting) matrices and π΄,π΅ βπ΄π΅β π΅π΄β 0, then exp π‘π΄ exp π‘π΅ = exp (π‘ πΆ 1 + π‘ 2 πΆ 2 + π‘ 3 πΆ 3 +π( π‘ 4 )) , where exp π΄ β π=0 β π΄ π π! is the matrix exponential, and the coefficients are given by, πΆ 1 =π΄+π΅, πΆ 2 = 1 2 π΄,π΅ , and πΆ 3 = π΄, π΄,π΅ π΅, π΅,π΄ . Proof: Follow the definitions above. For the formula in full generality, with a description of every coefficient, see Hairer, Lubich & Wanner (2005).
33
Doobβs inequality (special case)
Useful for obtaining a uniform βglobalβ time estimate on the strong error. Theorem (Doob): If π π‘ is a martingale then πΈ sup π π‘ 2 :0β€π‘β€π β€4πΈ π π
34
Truncation I Recall: π Ξπ‘ πΌ β π₯ =π£Ξπ‘ π£ = π π₯ βπΎπ£ Ξπ‘+πΞπ
Split π Ξπ‘ πΌ =π΄+π΅ where π΄={π£Ξπ‘} π π₯ π΅={ π π₯ βπΎπ£ Ξπ‘+πΞπ} π π£ Notice: π΄β π₯ =π£Ξπ‘ π£ = and π΅β π₯ = π£ = π π₯ βπΎπ£ Ξπ‘+πΞπ These equations can be solved exactly. Theorem: The naΓ―ve, symmetric, and Neri splittings give consistent methods with order 1 convergence. Proof (sketch): Use BCH formula, compare with ItΓ΄-Taylor expansions, and use Doob.
35
Truncation II Recall: π Ξπ‘ πΌπΌ β π₯ =π£Ξπ‘βπΞπ π£ = π π₯ βπΎπ£ Ξπ‘+πΞπ+πΎπΞπ
Split π Ξπ‘ πΌπΌ =π΄+π΅ where π΄={π£Ξπ‘βπΞπ} π π₯ π΅={ π π₯ βπΎπ£ Ξπ‘+πΞπ+πΎπΞπ} π π£ Notice: π΄β π₯ =π£Ξπ‘βπΞπ π£ = and π΅β π₯ = π£ = π π₯ βπΎπ£ Ξπ‘+πΞπ+πΎπΞπ These equations can be solved exactly. Theorem: (T. & Li) The naΓ―ve, symmetric, and Neri splittings give consistent methods with convergence orders 1, 2, and 2, respectively. Proof (sketch): Use the same strategy as for truncation I.
36
Truncation III Recall:
π Ξπ‘ πΌπΌπΌ β π₯ =π£Ξπ‘βπΞπ+πΎπΞπ π£ = π π₯ βπΎπ£ Ξπ‘+πΞπ+πΎπΞπβ β π₯ π π₯ π+ πΎ 2 π Ξπ Split π Ξπ‘ πΌπΌπΌ =π΄+π΅ where π΄={π£Ξπ‘βπΞπ+πΎπΞπ} π π₯ π΅={ π π₯ βπΎπ£ Ξπ‘+πΞπ+πΎπΞπβ β π₯ π π₯ π+ πΎ 2 π Ξπ} π π£ Notice: π΄β π₯ =π£Ξπ‘βπΞπ+πΎπΞπ π£ = and π΅β π₯ = π£ = π π₯ βπΎπ£ Ξπ‘+πΞπ+πΎπΞπβ β π₯ π π₯ π+ πΎ 2 π Ξπ Numerical evidence: truncation III with the Neri splitting gives strong order 3 Analysis is complicated
37
Numerical tests One dimensional pendulum: π π₯ =β sin π₯ β π
1 , πΎ=π=2, π₯ 0 = π£ 0 =1 Lennard-Jones cluster (LJ7), function of distance: π π π₯ = πβ π,π= π₯ ππ β π₯ ππ π₯ ππ / π₯ ππ β β 3 π₯ ππ = π₯ π β π₯ π β β 3 , Euclidean distance |π₯ ππ |:= π₯ ππ 2 π₯= π₯ 1 , π₯ 2 ,β¦, π₯ 7 β β 21 , π= π 1 , π 2 ,β¦, π 7 : β 21 β β 21 πΎ=10 πΌ 21Γ21 β β 21Γ21 , π= 2 π π΅ π πΎ = 2Γ0.3 πΎ β β 21Γ21
38
Trajectory comparison
One trajectory using three different operator splitting methods. Constants πΎ=π=2; initial conditions π₯ 0 = π£ 0 =1. Same driving Wiener process with small πΏπ‘= 2 β10 . Exact solution: Euler Maruyama with step size πΏπ‘. Approximate solutions: use larger step size Ξπ‘= 2 β2 .
39
Numerical tests
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.