Novel stochastic thermostats for rigid body dynamics

advertisement
Novel stochastic thermostats for rigid body
dynamics
M.V. Tretyakov
School of Mathematical Sciences, University of Nottingham, UK
Talk at Warwick Centre for Predictive Modelling , 08 December 2015
Davidchack, Ouldridge & T. J Chem Phys 142 (2015), 144114
Plan of the talk
Introduction
Langevin thermostat for rigid body dynamics
Stochastic Hamiltonian systems and sympletic integrators
Quasi-symplectic integrators for Langevin equation
Geometric integrators for Langevin thermostat for rigid body
dynamics
Gradient thermostat for rigid body dynamics
Geometric integrator for the gradient thermostat
Numerical experiments
Introduction
Introduction
Hamiltonian H(r ; p)
Introduction
Hamiltonian H(r ; p)
microcanonical ensemble (NVE )
Introduction
Hamiltonian H(r ; p)
microcanonical ensemble (NVE )
P_
=
R_
=
@H
; P(0) = p;
@r
@H
; R(0) = r
@p
Introduction
Hamiltonian H(r ; p)
microcanonical ensemble (NVE )
P_
=
R_
=
@H
; P(0) = p;
@r
@H
; R(0) = r
@p
The map (p; r ) ! (P(t; p; r ); R(t; p; r )) preserves symplectic structure:
dP ^ dR = dp ^ dr ;
where
! 2 = dp ^ dr = dp 1 ^ dr 1 +
is the di¤erential 2-form.
+ dp n ^ dr n
(1)
Introduction
Hamiltonian H(r ; p)
microcanonical ensemble (NVE )
P_
=
R_
=
@H
; P(0) = p;
@r
@H
; R(0) = r
@p
The map (p; r ) ! (P(t; p; r ); R(t; p; r )) preserves symplectic structure:
dP ^ dR = dp ^ dr ;
where
! 2 = dp ^ dr = dp 1 ^ dr 1 +
+ dp n ^ dr n
(1)
is the di¤erential 2-form.
The sum of the oriented areas of projections of a two-dimensional surface
onto the coordinate planes (p 1 ; r 1 ); : : :, (p n ; r n ) is an integral invariant.
Introduction
Hamiltonian H(r ; p)
microcanonical ensemble (NVE )
P_
=
R_
=
@H
; P(0) = p;
@r
@H
; R(0) = r
@p
The map (p; r ) ! (P(t; p; r ); R(t; p; r )) preserves symplectic structure:
dP ^ dR = dp ^ dr ;
where
! 2 = dp ^ dr = dp 1 ^ dr 1 +
+ dp n ^ dr n
(1)
is the di¤erential 2-form.
The sum of the oriented areas of projections of a two-dimensional surface
onto the coordinate planes (p 1 ; r 1 ); : : :, (p n ; r n ) is an integral invariant.
A method for (16) based on the one-step approximation
P = P(t + h; t; p; r ); R = R(t + h; t; p; r )
preserves symplectic structure if d P ^ d R = dp ^ dr :
Introduction
microcanonical ensemble (NVE )
Introduction
microcanonical ensemble (NVE )
canonical ensemble (NVT )
Introduction
microcanonical ensemble (NVE )
canonical ensemble (NVT )
(r ; p) _ exp(
where
H(r ; p));
= 1=(kB T ) > 0 is an inverse temperature.
Introduction
microcanonical ensemble (NVE )
canonical ensemble (NVT )
(r ; p) _ exp(
where
H(r ; p));
= 1=(kB T ) > 0 is an inverse temperature.
Two computational tasks
nondynamic quantities
dynamic quantities
Milstein&T. Physica D 2007
Rigid Body Dynamics
Consider a system of n rigid three-dimensional molecules described by the
T
T
center-of-mass coordinates r = (r 1 ; : : : ; r n )T 2 R3n ;
r j = (r1j ; r2j ; r3j )T 2 R3 ; and the rotational coordinates in the quaternion
T
T
representation q = (q 1 ; : : : ; q n )T 2 R4n , q j = (q0j ; q1j ; q2j ; q3j )T 2 R4 ;
such that jq j j = 1.
Rigid Body Dynamics
Consider a system of n rigid three-dimensional molecules described by the
T
T
center-of-mass coordinates r = (r 1 ; : : : ; r n )T 2 R3n ;
r j = (r1j ; r2j ; r3j )T 2 R3 ; and the rotational coordinates in the quaternion
T
T
representation q = (q 1 ; : : : ; q n )T 2 R4n , q j = (q0j ; q1j ; q2j ; q3j )T 2 R4 ;
such that jq j j = 1. Following [Miller III et al J. Chem. Phys., 2002]
n
H(r; p; q; ) =
3
pT p X X
+
Vk (q j ;
2m
j
) + U(r; q);
j =1 k =1
T
T
where p =(p 1 ; : : : ; p n )T 2 R3n , p j = (p1j ; p2j ; p3j )T 2 R3 ; are the
T
T
center-of-mass momenta conjugate to r; = ( 1 ; : : : ; n )T 2 R4n ,
j
= ( j0 ; j1 ; j2 ; j3 )T 2 R4 ; are the angular momenta conjugate to q;
(2)
Rigid Body Dynamics
Consider a system of n rigid three-dimensional molecules described by the
T
T
center-of-mass coordinates r = (r 1 ; : : : ; r n )T 2 R3n ;
r j = (r1j ; r2j ; r3j )T 2 R3 ; and the rotational coordinates in the quaternion
T
T
representation q = (q 1 ; : : : ; q n )T 2 R4n , q j = (q0j ; q1j ; q2j ; q3j )T 2 R4 ;
such that jq j j = 1. Following [Miller III et al J. Chem. Phys., 2002]
n
H(r; p; q; ) =
3
pT p X X
+
Vk (q j ;
2m
j
) + U(r; q);
(2)
j =1 k =1
T
T
where p =(p 1 ; : : : ; p n )T 2 R3n , p j = (p1j ; p2j ; p3j )T 2 R3 ; are the
T
T
center-of-mass momenta conjugate to r; = ( 1 ; : : : ; n )T 2 R4n ,
j
= ( j0 ; j1 ; j2 ; j3 )T 2 R4 ; are the angular momenta conjugate to q;
Vl (q; ) =
1
8Il
T
Sl q
2
; q;
2 R4 ; l = 1; 2; 3;
(3)
Il – the principal moments of inertia and the constant 4-by-4 matrices Sl :
S1 q
=
( q1 ; q0 ; q3 ; q2 )T ; S2 q = ( q2 ; q3 ; q0 ; q1 )T ;
S3 q
=
( q3 ; q2 ; q1 ; q0 )T :
Rigid Body Dynamics
S1
S3
2
0
6 1
6
= 4
0
0
2
0
6 0
6
= 4
0
1
1
0
0
0
0
0
1
0
0
0
0
1
0
1
0
0
3
2
0
0 0
6
0 7
7 ; S2 = 6 0 0
4 1 0
1 5
0
0 1
3
1
0 7
7;
0 5
0
1
0
0
0
3
0
1 7
7;
0 5
0
Rigid Body Dynamics
S1
S3
2
0
6 1
6
= 4
0
0
2
0
6 0
6
= 4
0
1
1
0
0
0
0
0
1
0
0
0
0
1
0
1
0
0
3
2
0
0 0
6
0 7
7 ; S2 = 6 0 0
4 1 0
1 5
0
0 1
3
1
0 7
7;
0 5
0
1
0
0
0
3
0
1 7
7;
0 5
0
Also introduce S0 = diag(1; 1; 1; 1); D = diag(0; 1=I1 ; 1=I2 ; 1=I3 ), and
2
3
q0
q1
q2
q3
6 q1 q0
q3 q 2 7
7:
S(q) = [S0 q; S1 q; S2 q; S3 q] = 6
4 q2 q3
q0
q1 5
q3
q2 q1
q0
Rigid Body Dynamics
S1
S3
2
0
6 1
6
= 4
0
0
2
0
6 0
6
= 4
0
1
1
0
0
0
0
0
1
0
0
0
0
1
0
1
0
0
3
2
0
0 0
6
0 7
7 ; S2 = 6 0 0
4 1 0
1 5
0
0 1
3
1
0 7
7;
0 5
0
1
0
0
0
3
0
1 7
7;
0 5
0
Also introduce S0 = diag(1; 1; 1; 1); D = diag(0; 1=I1 ; 1=I2 ; 1=I3 ), and
2
3
q0
q1
q2
q3
6 q1 q0
q3 q 2 7
7:
S(q) = [S0 q; S1 q; S2 q; S3 q] = 6
4 q2 q3
q0
q1 5
q3
q2 q1
q0
The rotational kinetic energy of a molecule:
3
X
l =1
Vl (q; ) =
1
8
T
S(q)DS T (q) :
Rigid Body Dynamics
We assume that U(r; q) is a su¢ ciently smooth function. Let
f j (r; q) = rr j U(r; q) 2 R3 , the net force acting on molecule j, and
~ q j U(r; q) 2 Tq j S3 ; which is the rotational force. Note that,
F j (r; q) = r
~ q j is the
while rr j is the gradient in the Cartesian coordinates in R3 , r
directional derivative tangent to the three dimensional sphere S3 implying
that
~ q j U(r; q) = 0:
qT r
(4)
Rigid Body Dynamics
We assume that U(r; q) is a su¢ ciently smooth function. Let
f j (r; q) = rr j U(r; q) 2 R3 , the net force acting on molecule j, and
~ q j U(r; q) 2 Tq j S3 ; which is the rotational force. Note that,
F j (r; q) = r
~ q j is the
while rr j is the gradient in the Cartesian coordinates in R3 , r
directional derivative tangent to the three dimensional sphere S3 implying
that
~ q j U(r; q) = 0:
qT r
(4)
We note
3
X
l =1
3
r Vl (q; )
=
l =1
=
3
X
l =1
rq Vl (q; )
1X1
T
Sl q [Sl q]
4
Il
=
1
S(q)DS T (q) ;
4
3
1X1 T
Sl q Sl :
4
Il
l =1
(5)
Rigid Body Dynamics
The Hamilton equations of motion are
dR j
dt
dP j
dt
dQ j
dt
d j
dt
j
=
Pj
; R j (0) = r j ;
m
(6)
= f j (R; Q)dt; P j (0) = p j ;
=
=
1
S(Q j )DS T (Q j ) j ; Q j (0) = q j ; jq j j = 1;
4
3
1 X 1 jT
Sl Q j Sl j + F j (R; Q); j (0) =
4
Il
l =1
= 1; : : : ; n
j
; qj T
j
= 0;
Rigid Body Dynamics
The Hamilton equations of motion are
dR j
dt
dP j
dt
dQ j
dt
d j
dt
j
=
Pj
; R j (0) = r j ;
m
(6)
= f j (R; Q)dt; P j (0) = p j ;
=
=
1
S(Q j )DS T (Q j ) j ; Q j (0) = q j ; jq j j = 1;
4
3
1 X 1 jT
Sl Q j Sl j + F j (R; Q); j (0) =
4
Il
j
; qj T
j
= 0;
l =1
= 1; : : : ; n
We have
jQ j (t)j = 1 ; j = 1; : : : ; n ; for t
0:
(7)
Rigid Body Dynamics
The Hamilton equations of motion are
dR j
dt
dP j
dt
dQ j
dt
d j
dt
j
=
Pj
; R j (0) = r j ;
m
(6)
= f j (R; Q)dt; P j (0) = p j ;
=
=
1
S(Q j )DS T (Q j ) j ; Q j (0) = q j ; jq j j = 1;
4
3
1 X 1 jT
Sl Q j Sl j + F j (R; Q); j (0) =
4
Il
j
; qj T
j
= 0;
l =1
= 1; : : : ; n
We have
jQ j (t)j = 1 ; j = 1; : : : ; n ; for t
Q j T (t)
j
(t) = 0 ; j = 1; : : : ; n ; for t
0:
(7)
0
(8)
Rigid Body Dynamics
The Hamilton equations of motion are
dR j
dt
dP j
dt
dQ j
dt
=
Pj
; R j (0) = r j ;
m
(6)
= f j (R; Q)dt; P j (0) = p j ;
=
d j
dt
=
1
S(Q j )DS T (Q j ) j ; Q j (0) = q j ; jq j j = 1;
4
3
1 X 1 jT
Sl Q j Sl j + F j (R; Q); j (0) =
4
Il
j
; qj T
j
= 0;
l =1
j
= 1; : : : ; n
We have
jQ j (t)j = 1 ; j = 1; : : : ; n ; for t
Q j T (t)
i.e.
j
j
(t) = 0 ; j = 1; : : : ; n ; for t
0:
(7)
0
(t) 2 Tq j S3
Symplectic integrator for (6) in [Miller III et al J. Chem. Phys., 2002]
(8)
Thermostats
Thermostats
Deterministic
Stochastic
Thermostats
Deterministic
Stochastic
Now we derive stochastic thermostats for the molecular system (6),
which preserve jQ j (t)j = 1 and Q j T (t) j (t) = 0. They take the form of
ergodic stochastic di¤erential equations (SDEs) with the Gibbsian
(canonical ensemble) invariant measure possessing the density
(r; p; q; ) _ exp(
where
H(r; p; q; ));
= 1=(kB T ) > 0 is an inverse temperature.
Davidchack, Ouldridge&T. J Chem Phys 2015
(9)
Langevin thermostat for Rigid Body Dynamics
dR j
Pj
dt; R j (0) = r j ;
m
=
2m
dw j (t); P j (0) = p j ;
dP j
= f j (R; Q)dt
dQ j
1
S(Q j )DS T (Q j ) j dt; Q j (0) = q j ; jq j j = 1;
(11)
4
3
1 X 1 jT
=
Sl Q j Sl j dt + F j (R; Q)dt
J(Q j ) j dt
4
Il
l =1
s
3
2M X
j
(0) = j ; q j T j = 0; j = 1; : : : ; n;
+
Sl Q j dWlj (t);
d
j
P j dt +
(10)
r
=
l =1
T
T T
where (w ; W ) = (w 1 T ; : : : ; w n T ; W 1 T ; : : : ; W n T )T is a
(3n + 3n)-dimensional standard Wiener process with w j = (w1j ; w2j ; w3j )T
and W j = (W1j ; W2j ; W3j )T ;
0 and
0 are the friction coe¢ cients
for the translational and rotational motions, = 1=(kB T ) > 0 and
J(q) =
M
4
S(q)DS T (q); M = P3
4
l =1
1
Il
:
(12)
Langevin thermostat for Rigid Body Dynamics
The Ito interpretation of the SDEs (10)–(11) coincides with its
Stratonovich interpretation.
The solution of (10)–(11) preserves the quaternion length
jQ j (t)j = 1; j = 1; : : : ; n ; for all t
0:
(13)
The solution of (10)–(11) automatically preserves the constraint:
Q j T (t)
j
(t) = 0 ; j = 1; : : : ; n ; for t
0
Assume that the solution X (t) = (RT (t); PT (t); QT (t);
(10)–(11) is an ergodic process on
D =
fx = (rT ; pT ; qT ;
jq j j = 1; q j T
(14)
T
(t))T of
T T
j
) 2 R14n :
= 0; j = 1; : : : ; ng:
Then it can be shown that the invariant measure of X (t) is Gibbsian
with the density (r; p; q; ) on D:
(r; p; q; ) _ exp(
H(r; p; q; ))
(15)
Stochastic Hamiltonian systems
Stochastic Hamiltonian system:
dP = f (t; P; R)dt +
m
X
l (t; P; R)
? dwl (t); P(t0 ) = p;
(16)
l =1
dR = g (t; P; R)dt +
m
X
l (t; P; R)
? dwl (t); R(t0 ) = r ;
r =1
fi =
i
l
=
i
@Hl =@r ;
i
l
@H=@r i ; g i = @H=@p i ;
(17)
i
= @Hl =@p ; i = 1; : : : ; n; l = 1; : : : ; m:
The phase ‡ow (p; r ) 7! (P; R) of (16) preserves symplectic structure:
dP ^ dR = dp ^ dr
Bismut 1981; Milstein, Repin&T. SINUM 2002
(18)
Stochastic Hamiltonian systems
Stochastic Hamiltonian system:
dP = f (t; P; R)dt +
m
X
l (t; P; R)
? dwl (t); P(t0 ) = p;
(16)
l =1
dR = g (t; P; R)dt +
m
X
l (t; P; R)
? dwl (t); R(t0 ) = r ;
r =1
fi =
i
l
=
i
@Hl =@r ;
i
l
@H=@r i ; g i = @H=@p i ;
(17)
i
= @Hl =@p ; i = 1; : : : ; n; l = 1; : : : ; m:
The phase ‡ow (p; r ) 7! (P; R) of (16) preserves symplectic structure:
dP ^ dR = dp ^ dr
(18)
Bismut 1981; Milstein, Repin&T. SINUM 2002
A method for (16) based on the one-step approximation
P = P(t + h; t; p; r ); R = R(t + h; t; p; r )
preserves symplectic structure if
d P ^ d R = dp ^ dr :
Milstein, Repin&T. SINUM 2002; Milstein&T, Springer 2004
(19)
Langevin equations and quasi-symplectic integrators
dR j
=
Pj
dt; R j (0) = r j ;
m
2m
dP j
= f j (R; Q)dt
dQ j
1
S(Q j )DS T (Q j ) j dt; Q j (0) = q j ; jq j j = 1;
(10)
4
3
1 X 1 jT
Sl Q j Sl j dt + F j (R; Q)dt
J(Q j ) j dt
=
4
Il
l =1
s
3
2M X
j
+
(0) = j ; q j T j = 0; j = 1; : : : ; n;
Sl Q j dWlj (t);
d
j
=
l =1
P j dt +
(9)
r
dw j (t); P j (0) = p j ;
Langevin equations and quasi-symplectic integrators
dR j
=
Pj
dt; R j (0) = r j ;
m
2m
dP j
= f j (R; Q)dt
dQ j
1
S(Q j )DS T (Q j ) j dt; Q j (0) = q j ; jq j j = 1;
(10)
4
3
1 X 1 jT
Sl Q j Sl j dt + F j (R; Q)dt
J(Q j ) j dt
=
4
Il
l =1
s
3
2M X
j
+
(0) = j ; q j T j = 0; j = 1; : : : ; n;
Sl Q j dWlj (t);
d
j
P j dt +
(9)
r
dw j (t); P j (0) = p j ;
=
l =1
Let D0 2 Rd ; d = 14n; be a domain with …nite volume. The
transformation
x = (r; p; q; ) 7! X (t) = X (t; x) = (R(t; x); P(t; x); Q(t; x); (t; x))
maps D0 into the domain Dt :
Langevin equations and quasi-symplectic integrators
Vt
=
Z
dX 1 : : : dX d
(20)
Dt
=
Z
D(X 1 ; : : : ; X d )
dx 1 : : : dx d :
D(x 1 ; : : : ; x d )
D0
The Jacobian J is equal to
J=
D(X 1 ; : : : ; X d )
= exp ( n(3 + ) t) :
D(x 1 ; : : : ; x d )
(21)
Quasi-symplectic integrators
It is natural to expect that making use of numerical methods, which are
close, in a sense, to symplectic ones, has advantages when applying to
stochastic systems close to Hamiltonian ones. In [Milstein&T. IMA J.
Numer. Anal. 2003 (also Springer 2004)] numerical methods (they are
called quasi-symplectic) for Langevin equations were proposed, which
satisfy the two structural conditions:
Quasi-symplectic integrators
It is natural to expect that making use of numerical methods, which are
close, in a sense, to symplectic ones, has advantages when applying to
stochastic systems close to Hamiltonian ones. In [Milstein&T. IMA J.
Numer. Anal. 2003 (also Springer 2004)] numerical methods (they are
called quasi-symplectic) for Langevin equations were proposed, which
satisfy the two structural conditions:
RL1. The method applied to Langevin equations degenerates to a
symplectic method when the Langevin system degenerates to a
Hamiltonian one.
RL2. The Jacobian J = D X =Dx does not depend on x:
Quasi-symplectic integrators
It is natural to expect that making use of numerical methods, which are
close, in a sense, to symplectic ones, has advantages when applying to
stochastic systems close to Hamiltonian ones. In [Milstein&T. IMA J.
Numer. Anal. 2003 (also Springer 2004)] numerical methods (they are
called quasi-symplectic) for Langevin equations were proposed, which
satisfy the two structural conditions:
RL1. The method applied to Langevin equations degenerates to a
symplectic method when the Langevin system degenerates to a
Hamiltonian one.
RL2. The Jacobian J = D X =Dx does not depend on x:
The requirement RL2 is natural since the Jacobian J of the original
system (10)–(11) does not depend on x: RL2 re‡ects the structural
properties of the system which are connected with the law of phase
volume contractivity. It is often possible to reach a stronger property
consisting in the equality J = J:
Weak-sense numerical integration
We usually consider two types of numerical methods for SDEs:
mean-square and weak [Milstein&T. Springer 2004]. Mean-square
methods are useful for direct simulation of stochastic trajectories while
weak methods are su¢ cient for evaluation of averages and are simpler
than mean-square ones.
A method X is weakly convergent with order p > 0 if
jE '(X (T ))
E '(X (T ))j
Chp ;
(22)
where h is a time discretization step and ' is a su¢ ciently smooth
function with growth at in…nity not faster than polynomial. The constant
C does not depend on h; it depends on the coe¢ cients of a simulated
stochastic system, on '; and T :
Langevin integrators
Davidchack, Ouldridge&T. J Chem Phys 2015
For simplicity we use a uniform time discretization of a time interval
[0; T ] with the step h = T =N:
Langevin integrators
Davidchack, Ouldridge&T. J Chem Phys 2015
For simplicity we use a uniform time discretization of a time interval
[0; T ] with the step h = T =N:
Goal: to construct integrators
quasi-symplectic
preserve jQ j (tk )j = 1; j = 1; : : : ; n ; for all t
preserve Q
jT
(tk )
j
(tk ) = 0 ; j = 1; : : : ; n ; for t
0 automatically
0 automatically
of weak order 2
To this end:
stochastic numerics+splitting techniques [see e.g. Milstein&T,
Springer 2004]
the deterministic symplectic integrator from [Miller III et al J. Chem.
Phys., 2002]
Langevin integrators
We use the mapping
t;l (q;
) : (q; ) 7! (Q; ) de…ned by
Q = cos( l t)q + sin( l t)Sl q ;
(23)
= cos( l t) + sin( l t)Sl ;
where
l
=
1
4Il
T
Sl q :
We also introduce a composite map
t
=
t=2;3
t=2;2
t;1
t=2;2
where “ ” denotes function composition, i.e., (g
t=2;3
;
f )(x) = g (f (x)).
(24)
‘Langevin A’integrator
The …rst integrator is based on splitting the Langevin system in
dR j
dP j
dQ j
d
j
Pj
dt; R j (0) = r j ;
m
r
2m
j
dw j (t);
= f (R; Q)dt +
=
1
S(Q j )DS T (Q j ) j dt;
4
3
1 X 1 jT
=
Sl Q j Sl j dt + F j (R; Q)dt
4
Il
l =1
s
3
2M X
+
Sl Q j dWlj (t); j = 1; : : : ; n;
=
l =1
(25)
(26)
‘Langevin A’integrator
The …rst integrator is based on splitting the Langevin system in
dR j
dP j
dQ j
d
j
Pj
dt; R j (0) = r j ;
m
r
2m
j
dw j (t);
= f (R; Q)dt +
=
1
S(Q j )DS T (Q j ) j dt;
4
3
1 X 1 jT
=
Sl Q j Sl j dt + F j (R; Q)dt
4
Il
l =1
s
3
2M X
+
Sl Q j dWlj (t); j = 1; : : : ; n;
=
(25)
(26)
l =1
and the deterministic system of linear di¤erential equations
p_ =
p; _ j =
J(q j ) j ; j = 1; : : : ; n :
(27)
‘Langevin A’integrator
P0
=
0
=
P1;k
=
P2;k
=
j
2;k
=
Rk +1
=
j
j
3;k )
=
j
4;k
=
j
3;k
(Q k +1 ;
j
p; R0 = r; Q0 = q with jq j = 1; j = 1; : : : ; n;
T
with q
h
2
e
Pk ;
= 0;
j
1;k
=e
j
J (Q ) h
k 2
j
k;
p s
h
2m
h
f(Rk ; Qk ) +
2
2
p s
h
2M
h j
+ F (Rk ; Qk ) +
2
2
P1;k +
j
1;k
Rk +
j
2;k );
p s
h
2M
h j
F (Rk +1 ; Qk +1 ) +
2
2
p s
h
h
2m
+ f(Rk +1 ; Qk +1 ) +
2
2
=
P2;k
Pk +1
=
e
k
=
0; : : : ; N
h
2
3
X
j
k +1
P3;k ;
1;
=e
S l Qk
j ;l
k ;
j = 1; : : : ; n;
l =1
j = 1; : : : ; n;
+
P3;k
k
h
P2;k ;
m
j
h (Q k ;
j = 1; : : : ; n;
J (Q
j
)h
k +1 2
j
4;k ;
3
X
S l Qk +1
j ;l
k ;
l =1
k;
j = 1; : : : ; n;
j = 1; : : : ; n;
(28)
‘Langevin A’integrator
= ( 1;k ; : : : ; 3n;k )T and jk = ( j1;k ; : : : ; j3;k )T ; j = 1; : : : ; n; with
their components being i.i.d. with the same law
p
P( = 0) = 2=3; P( =
3) = 1=6:
(29)
k
‘Langevin A’integrator
= ( 1;k ; : : : ; 3n;k )T and jk = ( j1;k ; : : : ; j3;k )T ; j = 1; : : : ; n; with
their components being i.i.d. with the same law
p
P( = 0) = 2=3; P( =
3) = 1=6:
(29)
k
Proposition 1. The numerical scheme (28)–(29) for (10)–(11) is
quasi-symplectic, it preserves the structural properties (13) and (14) and
it is of weak order two.
‘Langevin B’integrator
dPI =
d
dRII
=
j
II
=
d
j
I
=
PI dt +
J(q)
r
j
I dt
2m
+
s
dw(t);
3
2M X
(30)
Sl qdWlj (t);
l =1
1
PII
dt; dPII = f(RII ; QII )dt; dQIIj = S(QIIj )DS T (QIIj ) jII dt ; (31)
m
4
3
h
i
X
1
1
F j (RII ; QII )dt +
( jII )T Sl QIIj Sl jII dt ; j = 1; : : : ; n:
4
Il
l =1
‘Langevin B’integrator
dPI =
d
dRII
=
j
II
=
d
j
I
=
PI dt +
J(q)
r
j
I dt
2m
+
s
dw(t);
3
2M X
(30)
Sl qdWlj (t);
l =1
1
PII
dt; dPII = f(RII ; QII )dt; dQIIj = S(QIIj )DS T (QIIj ) jII dt ; (31)
m
4
3
h
i
X
1
1
F j (RII ; QII )dt +
( jII )T Sl QIIj Sl jII dt ; j = 1; : : : ; n:
4
Il
l =1
The SDEs (30) have the exact solution:
r
Z t
2m
PI (t) = PI (0) exp( t) +
exp( (t s))dw(s);
s 0
3 Z
2M X t
j
j
J(q)t) I (0) +
exp( J(q)(t
I (t) = exp(
l =1
0
(32)
s))dWlj (s):
To construct the method: half a step of (32) + one step of a symplectic
method for (31) + half a step of (32).
‘Langevin B’integrator
Rt
The vectors 0 e J (q)(t s ) Sl qdWlj (s) in (32) are Gaussian with zero
Rt
mean and covariance Cl (t; q) = 0 e J (q)(t s ) Sl q(Sl q)T e J (q)(t s ) ds:
‘Langevin B’integrator
Rt
The vectors 0 e J (q)(t s ) Sl qdWlj (s) in (32) are Gaussian with zero
Rt
mean and covariance Cl (t; q) = 0 e J (q)(t s ) Sl q(Sl q)T e J (q)(t s ) ds:
C (t; q) =
3
X
l =1
Cl (t; q) =
2
S(q)
M
C (t;
)S T (q);
where
C (t;
) =diag(0; I1 (1
I3 (1
exp( M t=(2I1 ))); I2 (1
exp( M t=(2I3 )))):
exp( M t=(2I2 )));
‘Langevin B’integrator
Rt
The vectors 0 e J (q)(t s ) Sl qdWlj (s) in (32) are Gaussian with zero
Rt
mean and covariance Cl (t; q) = 0 e J (q)(t s ) Sl q(Sl q)T e J (q)(t s ) ds:
C (t; q) =
3
X
l =1
Cl (t; q) =
2
S(q)
M
C (t;
)S T (q);
where
C (t;
) =diag(0; I1 (1
I3 (1
Let (t; q)
T
exp( M t=(2I1 ))); I2 (1
exp( M t=(2I2 )));
exp( M t=(2I3 )))):
(t; q) = C (t; q); e.g., (t; q) with the columns
s
2
M t
Il 1 exp(
) Sl q; l = 1; 2; 3;
l (t; q) =
M
2Il
‘Langevin B’integrator
Rt
The vectors 0 e J (q)(t s ) Sl qdWlj (s) in (32) are Gaussian with zero
Rt
mean and covariance Cl (t; q) = 0 e J (q)(t s ) Sl q(Sl q)T e J (q)(t s ) ds:
C (t; q) =
3
X
l =1
Cl (t; q) =
2
S(q)
M
)S T (q);
C (t;
where
C (t;
) =diag(0; I1 (1
I3 (1
Let (t; q)
then
exp( M t=(2I1 ))); I2 (1
exp( M t=(2I2 )));
exp( M t=(2I3 )))):
T
(t; q) = C (t; q); e.g., (t; q) with the columns
s
2
M t
Il 1 exp(
) Sl q; l = 1; 2; 3;
l (t; q) =
M
2Il
j
I (t)
in (32) can be written as
s
3
2M X
j
j
J (q)t
I (t) = e
I (0) +
l =1
j
l (t; q) l ;
j
l
are i.i.d. N (0; 1):
‘Langevin B’integrator
j
P0 = p; R0 = r; Q0 = q; jq j = 1; j = 1; : : : ; n;
r
m
h=2
P1;k = Pk e
+
(1 e h )
j
1;k
j
(Q k +1 ;
=e
j
J (Q ) h
k 2
P2;k
=
j
2;k
=
Rk +1
=
j
3;k )
=
P3;k
=
Pk +1
=
j
k +1
=
j
=
s
j
k+
3
4 X
l =1
s
Il
1
M h
4Il
e
0
=
T
; q
= 0;
k;
j
Sl Q k
j ;l
k ;
j = 1; : : : ; n;
h
f(Rk ; Qk );
2
h
j
j
F (Rk ; Qk ); j = 1; : : : ; n;
1;k +
2
h
Rk + P2;k ;
m
h j
j
j
j
j
F (Rk +1 ; Qk +1 ); j = 1; : : : ; n;
h (Q k ; 2;k );
4;k =
3;k +
2
h
P2;k + f(Rk +1 ; Qk +1 );
2
r
m
h=2
P3;k e
+
(1 e h ) k ;
P1;k +
e
J (Q
j
)h
k +1 2
s
j
4;k +
3
4 X
1; : : : ; n; k = 0; : : : ; N
l =1
s
1;
Il
1
e
M h
4Il
j
j ;l
S l Q k +1 & k ;
(33)
‘Langevin B’integrator
= ( 1;k ; : : : ; 3n;k )T ; k = ( 1;k ; : : : ; 3n;k )T ; jk = ( j1;k ; : : : ; j3;k )T ;
j = 1; : : : ; n; with their components being i.i.d. with the same law (29):
p
P( = 0) = 2=3; P( =
3) = 1=6:
k
Proposition 2. The numerical scheme (33), (29) for (10)–(11) is
quasi-symplectic, it preserves (13) and (14) and it is of weak order two.
‘Langevin C’integrator
Based on the same spliting (30) and (31) as Langevin B, i.e., the
determinisitic Hamiltonian system + OU.
To construct the method: half a step of a symplectic method for (31) +
step of (32) + half a step of a symplectic method for (31).
‘Langevin C’integrator
Based on the same spliting (30) and (31) as Langevin B, i.e., the
determinisitic Hamiltonian system + OU.
To construct the method: half a step of a symplectic method for (31) +
step of (32) + half a step of a symplectic method for (31).
Various splittings are compared for a translational Langevin thermostat in
[Leimkuhler&Matthews 2013]
‘Langevin C’integrator
j
P0 = p; R0 = r; Q0 = q; jq j = 1; j = 1; : : : ; n;
j
1;k
j
(Q1;k ;
j
3;k
=e
j
(Q k +1 ;
j
2;k
=
T
; q
= 0;
h
P1;k = Pk + f(Rk ; Qk );
2
h j
j
= k + F (Rk ; Qk ); j = 1; : : : ; n;
2
h
R 1;k = Rk +
P1;k ;
2m
j
2;k )
j
h=2 (Q k ;
=
h
P2;k = P1;k e
j
J (Q
)h
1;k
0
+
Rk +1
=
j
4;k )
=
s
3
4 X
l =1
+
s
R 1;k +
r
Il
=
P2;k
j
k +1
=
j
4;k
m
(1
1
e
j = 1; : : : ; n;
e
M h
2Il
2 h)
k
j
S l Q1;k
j ;l
k ;j
= 1; : : : ; n;
h
P2;k ;
2m
j
h=2 (Q1;k ;
Pk +1
j
1;k );
j
3;k );
j = 1; : : : ; n;
h
+ f(Rk +1 ; Qk +1 );
2
h j
+ F (Rk +1 ; Qk +1 ); j = 1; : : : ; n;
2
(34)
‘Langevin C’integrator
where k = ( 1;k ; : : : ; 3n;k )T and jk = ( j1;k ; : : : ; j3;k )T ; j = 1; : : : ; n;
with their components being i.i.d. random variables with the same law
(29).
Proposition 3. The numerical scheme (34), (29) for (10)–(11) is
quasi-symplectic, it preserves (13) and (14) and it is of weak order two.
The gradient thermostat for rigid body dynamics
It is easy to verify that
Z
exp
Dm o m
(
_
H(r; p; q; ))dpd
exp(
(35)
U(r; q)) =: ~(r; q);
where (rT ; qT )T 2 D0 = f(rT ; qT )T 2 R7n : jq j j = 1g and the domain of
T
conjugate momenta Dm om = f(pT ; )T 2 R7n : qT = 0g:
The gradient thermostat for rigid body dynamics
It is easy to verify that
Z
exp
Dm o m
(
_
H(r; p; q; ))dpd
exp(
(35)
U(r; q)) =: ~(r; q);
where (rT ; qT )T 2 D0 = f(rT ; qT )T 2 R7n : jq j j = 1g and the domain of
T
conjugate momenta Dm om = f(pT ; )T 2 R7n : qT = 0g:
We introduce the gradient system in the form of Stratonovich SDEs:
r
2
dR = f(R; Q)dt +
dw(t); R(0) = r;
(36)
m
m
s
3
2 X
dQ j = F j (R; Q)dt +
Sl Q j ? dWlj (t);
(37)
M
M
l =1
Q j (0) = q j ; jq j j = 1; j = 1; : : : ; n;
where “?” indicates the Stratonovich form of the SDEs, parameters
> 0 and > 0 control the speed of evolution of the gradient system
(36)–(37), f = (f 1 T ; : : : ; f n T )T and the rest of the notation is as in
(10)–(11). [Davidchack, Ouldridge&T. J Chem Phys 2015]
The gradient thermostat for rigid body dynamics
This new gradient thermostat possesses the following properties.
As in the case of (10)–(11), the solution of (36)–(37) preserves the
quaternion length (13).
Assume that the solution X (t) = (RT (t); QT (t))T 2 D0 of (36)–(37)
is an ergodic process. Then, by the usual means of the stationary
Fokker-Planck equation, one can show that its invariant measure is
Gibbsian with the density ~(r; q) from (35).
Geometric integrator for the gradient thermostat
The main idea is to rewrite the components Q j of the solution to
(36)–(37) in the form Q j (t) = exp(Y j (t))Q j (0) and then solve
numerically the SDEs for the 4 4-matrices Y j (t). To this end, we
introduce the 4 4 skew-symmetric matrices:
Fj (r; q) = F j (r; q)q j T
q j (F j (r; q))T ; j = 1; : : : ; n:
Geometric integrator for the gradient thermostat
The main idea is to rewrite the components Q j of the solution to
(36)–(37) in the form Q j (t) = exp(Y j (t))Q j (0) and then solve
numerically the SDEs for the 4 4-matrices Y j (t). To this end, we
introduce the 4 4 skew-symmetric matrices:
Fj (r; q) = F j (r; q)q j T
q j (F j (r; q))T ; j = 1; : : : ; n:
Note that Fj (r; q)q j = F j (r; q) under jq j j = 1 and the equations (37) can
be written as
s
3
2 X
j
j
dQ = Fj (R; Q)Q dt +
Sl Q j ?dWlj (t); Q j (0) = q j ; jq j j = 1:
M
M
l =1
(38)
Geometric integrator for the gradient thermostat
The main idea is to rewrite the components Q j of the solution to
(36)–(37) in the form Q j (t) = exp(Y j (t))Q j (0) and then solve
numerically the SDEs for the 4 4-matrices Y j (t). To this end, we
introduce the 4 4 skew-symmetric matrices:
Fj (r; q) = F j (r; q)q j T
q j (F j (r; q))T ; j = 1; : : : ; n:
Note that Fj (r; q)q j = F j (r; q) under jq j j = 1 and the equations (37) can
be written as
s
3
2 X
j
j
dQ = Fj (R; Q)Q dt +
Sl Q j ?dWlj (t); Q j (0) = q j ; jq j j = 1:
M
M
l =1
(38)
One can show that
s
3
2 X
j
Y (t + h) = h Fj (R(t); Q(t)) +
Wlj (t + h) Wlj (t) Sl
M
M
l =1
+ terms of higher order.
Geometric integrator for the gradient thermostat
R0 = r; Q0 = q; jq j j = 1; j = 1; : : : ; n;
r
p
2
Rk +1 = Rk + h f(Rk ; Qk ) + h
;
m
m k
s
3
p
2 X j ;l
Ykj = h Fj (Rk ; Qk ) + h
k Sl ;
M
M
(39)
l =1
Qkj +1
=
exp(Ykj )Qkj ;
j = 1; : : : ; n;
where k = ( 1;k ; : : : ; 3n;k )T and i ;k , i = 1; : : : ; 3n; jk;l ; l = 1; 2; 3;
j = 1; : : : ; n; are i.i.d. random variables with the same law
P( =
1) = 1=2:
(40)
Geometric integrator for the gradient thermostat
R0 = r; Q0 = q; jq j j = 1; j = 1; : : : ; n;
r
p
2
Rk +1 = Rk + h f(Rk ; Qk ) + h
;
m
m k
s
3
p
2 X j ;l
Ykj = h Fj (Rk ; Qk ) + h
k Sl ;
M
M
(39)
l =1
Qkj +1
=
exp(Ykj )Qkj ;
j = 1; : : : ; n;
where k = ( 1;k ; : : : ; 3n;k )T and i ;k , i = 1; : : : ; 3n; jk;l ; l = 1; 2; 3;
j = 1; : : : ; n; are i.i.d. random variables with the same law
P( =
1) = 1=2:
(40)
Proposition 4. The numerical scheme (39)–(40) for (36)–(37) preserves
the length of quaternions, i.e., jQkj j = 1; j = 1; : : : ; n ; for all k, and it is
of weak order one.
Davidchack, Ouldridge&T. J Chem Phys 2015
Numerical experiments
Davidchack, Handel&T. J Chem Phys 2009
and Davidchack, Ouldridge&T. J Chem Phys 2015
Two objectives for the experiments:
the dependence of the thermostat properties on the choice of
parameters and for the Langevin thermostat
errors of the numerical schemes.
TIP4P rigid model of water (Jorgensen et. al J. Chem. Phys. 1983)
The quantities we measure include the translational temperature
Ttr =
pT p
;
3nkB m
rotational temperature
Trot =
n
3
2 XX
Vl (q j ;
3nkB
j =1 l =1
and potential energy per molecule
U=
1
U(r; q) :
n
j
);
Figure: Langevin thermostat:
= 4 ps
1
,
= 0.
Figure: Langevin thermostat:
Tt r
= 0:28 ps,
Tr o t
= 0:26 ps, and
U
= 4 ps
= 2:0 ps
1
,
= 10 ps
1
.
Parameters of the Langevin thermostat
Figure: Langevin thermostat. Dependence of relaxation time of the
translational temperature on and :
Parameters of the Langevin thermostat
Figure: Langevin thermostat. Dependence of relaxation time of the rotational
temperature on and :
Parameters of the Langevin thermostat
Figure: Langevin thermostat. Dependence of relaxation time of the potential
energy on and :
=2
8 ps
1
and
=3
40 ps
1
Accuracy of integrators
Translational kinetic temperature
hTtk ih =
hpT pih
;
3mkB n
Rotational kinetic temperature
DP P
3
n
j
2
l =1 Vl (q ;
j =1
hTrk ih =
3kB n
j
E
)
h
;
Translational con…gurational temperature
DP
E
n
2
j
jr
Uj
r
j =1
DP
Eh ;
hTtc ih =
n
2
kB
j =1 rr j U
h
Rotational con…gurational temperature
DP
E
n
2
j Uj
jr
!
j =1
DP
Eh ;
hTrc ih =
n
2
kB
r
U
j
!
j =1
h
where r!j is the angular gradient operator for molecule j;
Accuracy of integrators
Potential energy per molecule
hUih =
Excess pressure
hPex ih =
1
hUih ;
n
DP
n
j =1
r j Tf j
3V
E
h
;
where V is the system volume;
Radial distribution functions (RDFs) between oxygen (O) and
hydrogen (H) interaction sites
hg
where
(r )ih ;
= OO, OH, and HH.
Angle brackets with subscript h represent the average over a simulation
run with time step h.
Accuracy of integrators
EA(X ) = EA(X ) + CA hp + O(hp+1 )
p = 2 for Langevin integrators and p = 1 for the gradient thermostat
integrator
Talay&Tubaro Stoch.Anal.Appl. 1990
Accuracy of integrators
Langevin A (left), Langevin B (centre), and Langevin C (right) with
= 5 ps 1 and = 10 ps 1 . Error bars denote estimated 95% con…dence
intervals.
Gradient thermostat
Figure: Gradient thermostat with = 4 fs and = 1 fs. Error bars denote
estimated 95% con…dence intervals in the measured quantities. The bottom
plot illustrates numerical integration error in the evaluation of the RDFs near
the …rst maximum.
Accuracy of integrators
Results for Langevin A, B, and C thermostats with = 5 ps 1 and
= 10 ps 1 and gradient thermostat with = 4 fs and = 1 fs.
A, unit
Ttk , K
Trk , K
Ttc , K
Trc , K
U, kcal/mol
Pex , MPa
gOO (rOO )
gOH (rOH )
gHH (rHH )
Langevin A
hAi0
EA
300:0(2)
0:136(8)
299:9(2)
0:808(8)
300:1(3)
0:022(13)
299:8(3)
0:158(11)
9:068(4)
0:0004(2)
117:4(1:3)
0:02(5)
3:007(4)
0:0006(2)
1:490(3)
0:0003(2)
1:283(2)
0:00012(7)
Langevin B
hAi0
EA
299:9(2)
0:100(13)
299:8(3)
0:092(13)
299:9(4)
0:45(2)
299:6(4)
0:99(2)
9:071(4)
0:0059(2)
117:4(1:6)
0:27(9)
3:009(4)
0:0027(2)
1:492(2)
0:0024(2)
1:284(2)
0:00082(6)
Langevin C
hAi0
EA
300:0(2)
0:135(7)
300:1(2)
0:803(8)
300:1(3)
0:021(13)
299:9(3)
0:152(11)
9:066(3)
0:0005(2)
117:5(1:4)
0:01(5)
3:009(4)
0:0004(2)
1:490(2)
0:00028(9)
1:282(2)
0:00018(7)
Gradient
hAi0
EA
299:6(1:0)
298:6(1:6)
9:075(11)
118(11)
3:012(9)
1:491(7)
1:284(4)
3:6(5)
9:9(4)
0:033(4)
1:7(2:8)
0:011(4)
0:011(2)
0:004(2)
Values of hAi0 and EA were obtained by linear regression from hAih for
h 6 fs for Langevin integrators and for h 4 fs for the gradient
integrator. Quantities EA are measured in the units of the corresponding
quantity A per fsp , where p = 2 for Langevin integrators and p = 1 for
the gradient integrator.
Conclusions
Two new thermostats, one of Langevin type and one of gradient
(Brownian) type, for rigid body dynamics are introduced.
As in the deterministic case, it is important to preserve structural
properties of stochastic systems for accurate long term simulations.
Geometric integrators for the stochastic thermostats were
constructed.
Testing of thermostats and numerical integrators were done.
Conclusions
Two new thermostats, one of Langevin type and one of gradient
(Brownian) type, for rigid body dynamics are introduced.
As in the deterministic case, it is important to preserve structural
properties of stochastic systems for accurate long term simulations.
Geometric integrators for the stochastic thermostats were
constructed.
Testing of thermostats and numerical integrators were done.
THANK YOU!
Download