THE JOURNAL OF CHEMICAL PHYSICS 122, 224114 共2005兲
Time reversible and symplectic integrators for molecular dynamics simulations of rigid molecules H. Kamberaja兲 Faculty of Science and Engineering, Manchester Metropolitan University, John Dalton Building, Chester Street, Manchester, M1 5GD, United Kingdom
R. J. Low School of Mathematical and Information Sciences, Coventry University, Priory Street, Coventry, CV1 5FB, United Kingdom
M. P. Neal Faculty of Science and Engineering, Manchester Metropolitan University, John Dalton Building, Chester Street, Manchester, M1 5GD, United Kingdom
共Received 2 February 2004; accepted 18 March 2005; published online 15 June 2005兲 Molecular dynamics integrators are presented for translational and rotational motion of rigid molecules in microcanonical, canonical, and isothermal-isobaric ensembles. The integrators are all time reversible and are also, in some approaches, symplectic for the microcanonical ensembles. They are developed utilizing the quaternion representation on the basis of the Trotter factorization scheme using a Hamiltonian formalism. The structure is similar to that of the velocity Verlet algorithm. Comparison is made with standard integrators in terms of stability and it is found that a larger time step is stable with the new integrators. The canonical and isothermal-isobaric molecular dynamics simulations are defined by using a chain thermostat approach according to generalized Nosé–Hoover and Andersen methods. © 2005 American Institute of Physics. 关DOI: 10.1063/1.1906216兴 I. INTRODUCTION
Molecular dynamics 共MD兲 is a technique which determines the time evolution of a system of the molecules by integrating classical equations of motion. Recently, nonHamiltonian dynamical systems have been widely used in MD simulations, see, e.g., Refs. 1–10 for more details, which describe systems connected to thermostats and/or mechanical pistons. In MD simulations non-Hamiltonian systems can be used to generate statistical ensembles such as the canonical 共NVT兲 and isothermal isobaric 共NPT兲. It is worthy of note that Monte Carlo techniques11 are often used as the methods to generate NVT or NPT ensembles, however, these methods alone cannot provide direct information about time dependence of the properties of the system and therefore cannot be used to study the dynamical quantities and time correlation functions. The importance of using the NVT and NPT ensembles instead of the standard microcanonical ensemble 共NVE兲 generated by Hamiltonian systems is that the experiments are usually performed in conditions of constant temperature and/or pressure. We refer to the Anderson,2 Parrinello–Rahman,3 and Nosé–Hoover1,4,5 methods to modify equations of motion to sample ensembles other than the NVE. In particular, in this paper, we will focus on the Hoover form of the Nosé, Andersen, and Parrinello–Rahman methods1–5 as proposed by Martyna and co-workers.6,8 The orientational degrees of freedom of a rigid body can be parametrized explicitly12 or implicitly2,13 and is the former that a兲
Author to whom correspondence should be addressed; Electronic mail:
[email protected]
0021-9606/2005/122共22兲/224114/30/$22.50
we consider here. The quaternion formulation is used to represent a molecular orientation as it avoids the singularities in the equations of motion employing the Euler angles.14,15 In the current work we will discuss two different approaches to describe rotation motion. The first approach is based on the equations of motion proposed by Matubayasi and Nakahara16 which produce reversible phase-space volume preserving, but nonsymplectic integrator, and the second one is based on the novel symplectic quaternion scheme yielding a symplectic and time reversible integrator 共in the microcanonical ensemble兲 proposed by Miller et al.17 The numerical integrators used to solve the equations of motion are fundamental tools in MD simulations. Choosing a numerical integrator in a particular application of MD simulations is a crucial issue. Depending on the application different requirements can be considered for a numerical integrator, for example, to be as simple and as accurate as possible. Simplicity of the integrator is required because of the limitation of computational power, particularly in largescale simulations. On the other hand, the accuracy is very important for long-time energy conservation of the integrator. Many of the earliest integrators, such as Runge–Kutta and predictor-corrector integrators,11 are still in common use, however, there have been recent advances in development of methods that provide greater stability in large-scale and long-time MD simulations.16–22 Recently, time-reversible algorithms have been proposed for a chain of Nosé–Hoover thermostats applied to MD simulations of the atomistic systems.18 These algorithms represent the explicit and
122, 224114-1
© 2005 American Institute of Physics
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-2
J. Chem. Phys. 122, 224114 共2005兲
Kamberaj, Low, and Neal
long-term integration of non-Hamiltonian dynamical systems. In applications to Hamiltonian systems, symplectic and time-reversible integrators have been proposed for the rotation motion of rigid bodies,17,19,23 which have the property of satisfying Liouville’s theorem, which possesses favorable properties such as phase-space volume preservation, approximate energy conservation, and time reversibility.24 In the case of the non-Hamiltonian systems, also called extended systems, the equations of motion possess the fundamental symmetry of time reversibility and therefore it is possible to reconstruct time-reversible numerical integration schemes.18 Tuckerman et al.25,26 have developed a consistent classical statistical theory of certain non-Hamiltonian dynamical systems. Numerical integration schemes for the rotational motion of the rigid bodies in the NVE ensemble generated by Hamiltonian dynamics in quaternion representation were described using the Liouville formalism as proposed by Miller et al.17 The symplectic integrator is compared with the timereversible and nonsymplectic integrator proposed by Matubayasi and Nakahara16 and with the Fincham integrator,27 which is neither time reversible nor sympletic. It is interesting to note that the time-reversible algorithm of Matubayasi and Nakahara has been found to provide a good long-time energy conservation in comparison to standard algorithms16,28 although it is not symplectic. However, Miller et al.17 have shown that their symplectic algorithm was superior to the time-reversible and nonsymplectic algorithm of the Matubayasi and Nakahara.16 In this work we are not investigating whether the symplectic and time-reversible methods such as the algorithm in Ref. 17 or time reversible and nonsymplectic but area preserving methods such as the algorithm in Ref. 16 are in general more stable. We are interested in suitable methods which would provide a longtime stable integrator in terms of the energy conservation for the system under investigation. Therefore, these two methods are compared with each other and with standard integrators such as Fincham integrator.27 The integration schemes were extended by constructing time-reversible algorithms for the rigid bodies using extended dynamical systems to generate the canonical and isothermal-isobaric statistical ensembles. The equations have been solved by employing the Trotter factorization scheme.29,30 Here we consider the case of a system of rigid bodies subject to Nosé-type chain of thermostats. In particular, we are interested in applications such as molecular liquids where rigid bodies are coupled only through the potential energy function. We have seen this problem treated with a separate chain of thermostats for translational and rotation motion. Here we will use a generalized form of the symmetric Trotter factorization scheme or Strang splitting.31 In this paper we consider the problem of efficient simulation of systems of increasing complexity at constant pressure such as fixed and variable box aspect ratio and angle.
Our main motivation is to develop numerical integrators for both translational and rotational motion which are stable in long-time MD simulations, and to examine constant pressure and/or temperature simulation of the system of model molecules by allowing the simulation box to change its size and shape. In particular, we are interested in the effect of the boundary conditions in packing of the smectic phases.32,33 Thus we examine and compare two different approaches to MD simulation at constant pressure and temperature. The paper is organized as follows. In Sec. II we present a review of equations of motion in some relevant statistical ensembles for a system of rigid body molecules. In Sec. III we describe the proposed numerical integrators. The performance and the application of the integrators to model Gay–Berne34 molecular systems are discussed in Sec. IV, and finally in Sec. V some concluding remarks are presented.
II. REVIEW OF EQUATIONS OF MOTION IN RELEVANT ENSEMBLES
In this section we will briefly review the equations of motion for the rigid body systems in different statistical ensembles of our interest. First we will describe the equations of motion in the microcanonical ensemble, then in the following, we introduce equations of motion for the rigid body system in canonical and isothermal-isobaric ensembles using the chain thermostat approach as proposed in literature by Martyna and co-workers.6,8
A. Microcanonical ensemble
We consider systems of rigid bodies moving and rotating in three dimensions, with conservative forces acting on and between them. The orientation of each body is specified by the rotation which it has undergone from a fixed reference configuration, defined using the standard quaternion model as described in Refs. 11 and 12. The quaternion Q of each individual body is given by a vector of four real components Q = 共Q0 , Q1 , Q2 , Q3兲T, that determine the Euler angles 共 , , 兲, and satisfy the constraint QTQ = 1.11 The total energy of the system is given by the sum of the translational and rotational kinetic energy of each body and the potential energy U共q1 , ¯ , qN , Q1 , ¯ , QN兲, which depends on the positions q = 共q1 , q2 , q3兲T and quaternion Q of each body of a system of N rigid bodies. In this work we will consider an anisotropic Gay–Berne34 pair potential as described in Appendix A. The total energy of the system is N
E=
兺 j=1
STj I−1S j + 2
N
p Tp
j j + U共q1, ¯ ,qN,Q1, ¯ ,QN兲, 兺 2m j j=1
共1兲 where p = 共p1 , p2 , p3兲T is the translational momentum, S = 共S1 , S2 , S3兲T is the angular momentum in principal frame
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-3
J. Chem. Phys. 122, 224114 共2005兲
Molecular dynamics simulation of rigid molecules
and I is the inertia tensor which in the principal frame is a diagonal matrix with diagonal elements given by 共I1 , I2 , I3兲. The angular momentum is related to the angular velocity in the fixed body frame by S = I. Following Evans, Evans, and Murad,14,15 the relation of the quaternion with the description of the dynamics of the rigid body is through the matrix equation that connects the time derivatives of the quaternion with the angular velocities in principal frame, which is written here in matrix form as:
˙ = 1 A共兲Q, Q 2
A=
冢
0
− x − y − z
x 0 z − y y − z 0 x z y − x 0
冣
共4兲
These equations are so-called Newton’s equations of motion and control a dynamic system generating microcanonically distributed positions q and momenta p. The equations of motion for the rigid body described above conserve the total energy of the rotation motion but they are not Hamiltonian 共see Ref. 17 for more details兲. Recently, Miller et al.17 have described the problem of how to construct a symplectic integrator for rotation motion in the NVE ensemble based on the equations of motion generated from the Hamiltonian system. The basics of their algorithm consists of introducing a four components angular momentum vector S共4兲 = 共S0 , S兲 关equivalently angular velocity 共4兲 = 共0 , 兲兴, which is related to the derivative of the quaternion as17 ˙ = 1 M共Q兲共4兲 , Q 2
where H共t兲共p , q兲 is the translational kinetic energy part of the Hamiltonian and hk共P , Q兲 are given by17 hk共P,Q兲 =
1 T 共P DkQ兲2 , 8Ik
D0Q = 共Q0,Q1,Q2,Q3兲,
共3兲
p˙ j = − q jV = F j .
hk共P,Q兲 + U共q,Q兲, 兺 k=0
共2兲
where T is the torque in the principal frame, and equations of translational motion are given by11 q˙ j = p j/m j,
HNVE共p,q,P,Q兲 = H 共p,q兲 +
where .
For the rotational motion about a fixed point or the center of mass, the direct Newtonian approach leads to a set of equations known as Euler’s equations of motion.12 Equations for the rotational motion with respect to the principal frame can be written as S˙ j = T j + S j ⫻ I−1S j ,
3
共t兲
D1Q = 共− Q1,Q0,Q3,− Q2兲, D2Q = 共− Q2,− Q3,Q0,Q1兲, D3Q = 共− Q3,Q2,− Q1,Q0兲, and P is the conjugate momentum of the quaternion which is related to the angular momentum according to P = 2MS共4兲 .
共6兲
The equations of motion for Q and P are found using Hamiltonian formalism 3
P˙ = − ⵜQHNVE = F共4兲 − 3
˙ =ⵜ H Q P NVE =
兺 k=0
1
共PTDkQ兲DkP, 兺 k=0 4Ik 共7兲
1 T 共P DkQ兲DkQ, 4Ik
where F共4兲 = 2MT共4兲 and T共4兲 = 共0 , T兲, T is the torque. Following Miller et al.,17 if 0共t = 0兲 = 0, then h0共P , Q兲 = 0, and it is zero for all time t. These equations are combined with the equations for translational motion, Eq. 共4兲, to describe the motion of rigid bodies system.
共5兲
where B. Canonical ensemble
M共Q兲 =
冢
Q0 − Q1 − Q2 − Q3 Q1
Q0
− Q3
Q2
Q2
Q3
Q0
− Q1
Q1
Q0
Q3 − Q2
冣
Then the Hamiltonian of the system is
.
Here the equations of motion of Martyna and co-workers,6,8 which describe a system of atoms, are extended to the equations of motion for a system of rigid bodies. In the following discussion we have considered these equations for rigid body motion in the canonical ensemble in the case of Matubayasi and Nakahara’s16 description of rotation motion,
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-4
J. Chem. Phys. 122, 224114 共2005兲
Kamberaj, Low, and Neal
q˙ i,␣ =
Extending the method of Miller et al.,17 the equations of rotation motion in canonical ensemble are written as
pi,␣ , mi,␣
3
P˙ ␣ = F␣共4兲 −
˙ = 1 AQ , Q i,␣ i,␣ 2 ␣兲 p˙ i,␣ = Fi,␣ − 共t, 1 pi,␣ ,
The conserved quantity of the above equations of motion 共8兲 is the total energy of the extended system, HNVT given by
␣兲 ␣兲 = 共t, , s˙共t, k k
共8兲
共k = 1, ¯ ,M兲,
HNVT = HNVE + kBT0 ⫻
␣兲 ␣兲 共t,␣兲 共t,␣兲 共t,␣兲 ˙ 共t, = G共t, − k+1 k , k k /Q p k
冋
=
␣兲 共r,␣兲 G共r, /Q p k k
−
共r,␣兲 共r,␣兲 k+1 k
+
共k = 1, ¯ ,M − 1兲,
M
␣兲 共r,␣兲 共r,␣兲 ˙ 共r, M = G M /Q p M ,
where M is the length of the Nosé–Hoover chain of thermostats and 共t兲 and 共r兲 are the thermostat velocities 共k k k = 1 , ¯ , M兲 associated with the thermostat variables s共t兲 k and for the translational and rotation motion, respectively. s共r兲 k ␣兲 The thermostat forces G共t共r兲, are given by k N␣
兺 i=1
pi,2 ␣ ␣兲 − g共t, k BT 0 , f mi,␣
␣兲 Si,T␣I−1Si,␣ − g共r, k BT 0 , 兺 f i=1
␣兲 G共t, k
␣兲 共t,␣兲 2 Q共r, pk−1 共k−1 兲
k
2
+
␣兲 ␣兲 共s共t, + s共r, 兲 兺 k k k=2
␣兲 共r,␣兲 2 Q共r, 兲 p 共k k
+
2
M
册
.
共12兲
共k = 2, ¯ ,M兲. In these equations the index ␣ corresponds to a set of particles 共N␣兲, which, for example, can be all molecules of a ␣兲 particular species of a mixture system, corresponding to g共t, f 共r,␣兲 and g f degrees of freedom, respectively, for the translational and rotation motion. kB is the Boltzmann’s constant ␣兴 and T0 is the target temperature. Q关t共r兲, are the thermostat pk mass parameters. It is found4,6 that an optimal choice for these parameters is
共r兲 共s共t兲 兺 k + sk 兲 k=2
册
,
冕 冕 冕 冕 冕 冕冕 d Np
d Nq
d M p
d NQ
d NP
ds1dsc exp共dNs1 + sc兲
where for simplicity in notation we have assumed that the translational and rotation degrees of freedom are coupled to M sk and s1 are the same thermostat chain, furthermore sc = 兺k=2 considered the only independently coupled thermostat variables to dynamics. p = Q p is the momentum of the thermostat variable and H0 is a constant. Integration over the variables s1 and sc using the ␦ function yields ⌬T共N,V,H0兲 =
冕 冕 冕 冕 冕
exp共dNH0/g f kBT0兲 g f k BT 0 ⫻
d NQ
d NP
d Np
d Nq
dp
⫻exp共− dNp2/2Q pkBT0兲 ⫻exp共− dNHNVE/g f kBT0兲 ⬀ Q共N,V,T兲,
␣兴 ␣兴 = g关t共r兲, kBT0/2p , Q关t共r兲, p f 1
共k = 2, ¯ ,M兲,
+
⫻ ␦共HNVT − H0兲,
共9兲 − k BT 0 ,
+
s共r兲 1 兲
where d is the dimension of the system. In the case of the rigid body system, the partition function ⌬ 共see Ref. 26 in the case of atomic systems兲 can be straight forward extended as
⫻
k−1
␣兴 = kBT0/2p Q关t共r兲, p
␣兲 共t,␣兲 2 Q共t, p 共k 兲
dN共s共t兲 1
⌬T共N,V,H0兲 =
␣兲 ␣兲 共r,␣兲 2 = Q共r, G共r, k p 共k−1 兲 − kBT0 ,
k
冋
冑g = exp
N␣
␣兲 = G共r, 1
=
兺␣ 兺 k=1
+
␣兲 共r,␣兲 g共r, s1 f
In the following discussion of this part we have omitted the index ␣ for simplicity. If there is an external force such as N 兺i=1 Fi ⫽ 0, then the total extended energy is the only conserved quantity,26 and the invariant volume factor is
共t,␣兲 ␣兲 共t,␣兲 ˙ 共t, M = G M /Q p M ,
␣兲 G共t, = 1
兺␣
␣兲 共t,␣兲 g共t, s1 f M
␣兲 ˙ 共r, k
共11兲
˙ = 1 M共Q 兲共4兲 . Q ␣ 2 ␣ ␣
␣兲 S˙ i,␣ = Ti,␣ + Si,␣ ⫻ I−1Si,␣ − 共r, Si,␣ , 1
␣兲 ␣兲 s˙共r, = 共r, k k
1
␣兲 共P␣T DkQ␣兲DkP␣ − 共r, P␣ , 兺 1 4I k k=0
共10兲
where p is the frequency parameter at which the particle thermostats fluctuate.
which shows that proper 共N , V , T兲 ensemble is generated 共for g f = dN, modulo constant prefactors兲 by Eqs. 共8兲. In the case when other conservation laws exist, the phase space is further restricted. More information about such cases is described in detail by Tuckerman et al. in Ref. 26.
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-5
J. Chem. Phys. 122, 224114 共2005兲
Molecular dynamics simulation of rigid molecules
C. Isothermal-isobaric ensemble
␣兲 共t,␣兲 共t,␣兲 ˙ 共t, M = G M /Q p M ,
1. Isotropic cell fluctuations
The equations of motion for the translational motion are similar to the equations proposed by Martyna and co-workers.6,8 We discuss briefly the equations of rotation motion in the NPT ensemble. First we recall Eq. 共3兲 and using the relation,12
冋 册 冋 册 dA
dA
=
dt
dt
L
+ ⫻ 关A兴B , B
冋 册
dS S˙ − S ⫻ I−1S = dt
共13兲
, L
where the index B is omitted for consistency with previous notations. The right-hand side of Eq. 共13兲 can be evaluated further, dS dt
⬅ L
d S˙ − S ⫻ I−1S = T − ⑀S − 共t兲 1 S. gf
共14兲
˙ = 1 AQ , Q i,␣ i,␣ 2
冉 冊
p˙ i,␣ = Fi,␣ − 1 +
GM QbM
,
where g f is the total number of degrees of freedom of the ␣兲 ␣兲 + g共r, . In addition to thermostat varisystem, g f = 兺␣g共t, f f ables introduced in the preceding section, we have introduced the barostat variables: the barostat momentum ⑀ and the barostat “position” ⑀, which is related to the volume V of the system as
G⑀ = dV共Pint − P0兲 +
d gf
冉兺 N
j=1
p2j + mj
N
STj I−1S j 兺 j=1
冊
,
共16兲
and the barostat mass is simply defined as4,7 W = 共g f + d兲kBT0/2b ,
共17兲
where b is a frequency parameter which in practice depends on the system. Here, the barostat degrees of freedom are coupled to different chain thermostat, characterized by the velocities k associated to the thermostat variables k, k = 1 , ¯ , M. The set of parameters Gk 共k = 1 , ¯ , M兲 determines the thermostat forces of the chain coupled to barostat and are given by
Gk = Qbk2
k−1
− k BT 0
共k = 2, ¯ ,M兲,
共18兲
where Qbk, k = 1 , ¯ , M are the mass parameters that determine the time scale evolution of the chain thermostat coupled to barostat, and are defined according to8
⑀˙ = ⑀ ,
Qb1 = d2kBT0/2b,
G⑀ − 1 ⑀ , ˙ ⑀ = W
Qbk = kBT0/2b
共k = 2, ¯ ,M兲.
共19兲
Extending the method of Miller et al.,17 in the case of the isothermal-isobaric ensemble the equations of rotation motion are written as
␣兲 ␣兲 s˙共t, = 共t, , k k
共15兲
共k = 1, ¯ ,M兲,
共t,␣兲 共t,␣兲 ␣兲 ␣兲 共t,␣兲 ˙ 共t, = G共t, , k k /Q pk − k+1 k 共r,␣兲 共r,␣兲 ␣兲 ␣兲 共r,␣兲 ˙ 共r, = G共r, /Q p − k+1 k k k k
共k = 1, ¯ ,M − 1兲,
− k+1k,
G1 = W⑀2 − kBT0 ,
d ␣兲 ⑀pi,␣ − 共t, 1 pi,␣ , gf
d ␣兲 Si,␣ , S˙ i,␣ = Ti,␣ + Si,␣ ⫻ I−1Si,␣ − ⑀Si,␣ − 共r, 1 gf
␣兲 ␣兲 s˙共r, = 共r, k k
Q bk
The barostat force is given by
As one can see, this equation shows that the orientation motion is coupled to the barostat velocity ⑀. Thus the equations of motion for a system of rigid bodies, following Matubayasi and Nakahara16 equations of rotation motion, can be written as pi,␣ + ⑀qi,␣, mi,␣
˙ M =
G k
共k = 1, ¯ ,M兲,
⑀ = ln共V兲/d.
d共q ⫻ p兲 = q˙ ⫻ p + q ⫻ p˙ . dt
Substituting in this equation the expressions of q˙ and p˙ as given in Eq. 共15兲 which follows, we finally found that
q˙ i,␣ =
˙ k = k, ˙ k =
where indices L and B stand for fixed laboratory and fixed body frames, respectively, and A can be, for example, the angular momentum S, then it can easily be shown that
冋 册
共r,␣兲 ␣兲 共r,␣兲 ˙ 共r, M = G M /Q p M ,
3
P˙ ␣ = F␣共4兲 −
1
˙ = 1 M共Q 兲共4兲 . Q ␣ 2 ␣ ␣ 共k = 1, ¯ ,M − 1兲,
d
␣兲 共P␣T DkQ␣兲DkP␣ − ⑀P␣ − 共r, P␣ , 兺 1 gf k=0 4Ik
共20兲
In Eq. 共16兲, Pint is the internal pressure of the system, which is given by
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-6
J. Chem. Phys. 122, 224114 共2005兲
Kamberaj, Low, and Neal
1 Pint = dV
冉兺 N
i=1
冊
p2i + STi I−1Si + qi · Fi , mi
共21兲
if it is assumed that the potential U does not depend on the volume. Equations 共15兲 have a conserved quantity given by HNPT = HNVT +
W⑀2 2
M
+ P 0V +
k BT 0 k + 兺 k=1
Qbk2 2
k
,
冕 冕 冕 冕 冕 d Np
d Nq
d NQ
⫻exp共− p2 /2kBT0Qb兲
dV exp共− P0V兲
冕
The variations of the shape of the simulation cell are especially useful in solid-state simulations. In contrast, in liquid state simulations where there are no elastic restoring forces the box may become elongated which may cause a problem in the simulation. Parrinello and Rahman35 have extended the constant pressure method36 to allow the simulation box to change the shape as well as size. Following Parrinello and Rahman,35 we replaced the internal hydrostatic pressure by the pressure tensor Pint and the variable ⑀ by the tensor ⑀. Hence, the diagonal elements of the ⑀ adjust the internal pressure to the external hydrostatic value of P0, while the off-diagonal elements tend to reduce nonzero fluctuations of the off-diagonal elements of the pressure tensor. The pressure tensor Pint is defined as a sum of two terms, the kinetic and the virial terms, as
冋兺
册
m j共v j兲共v j兲 + 共 j兲共S j兲 + 共F j兲共r j兲 .
j
共24兲 The instantaneous pressure is determined as Pint = 31 Tr共Pint兲,
d Np
共25兲
where the volume is given by V = det共H兲, Tr is the trace of Pint and H is the simulation cell matrix, H = 共h1 , h2 , h3兲, where h1, h2, and h3 are the basis vectors of the cell. Now, Eqs. 共15兲 can be written as
d Nq
d NQ
d 1d c
d NP
d M p
dc
d M p dV
dp⑀
⫻exp共dN1 + c + c兲␦共HNPT − H0兲,
共23兲
M where c = 兺k=1 k, and p , p⑀ are the momentum of the parameters and ⑀, respectively. The integration over the 1 using the ␦ function yields the partition function as
冕
d M pexp共− p2/2kBT0Q p兲
冕
d M p
dp⑀exp共− p2 /2kBT0W兲 ⬀ Q共N, P,T兲. ⑀
q˙ i,␣ =
pi,␣ + ⑀qi,␣, mi,␣
p˙ i,␣ = Fi,␣ −
2. Shape-varying cell
1 V
冕 冕 冕 冕 冕 冕冕 冕 冕 冕 冕
⫻
dNP exp共− HNVE/kBT0兲
This equation shows that Eqs. 共15兲 generate the isotropic NPT ensemble distribution function. Similar to the NVT case, if there are any additional conservation laws, more attention should be paid 共see, e.g., Ref. 26 for more details兲.
共Pint兲 =
⌬T0P0共N,H0兲 =
共22兲
which is a straightforward extension in the case of a rigid body system of the expression for the atomic system given in Refs. 6 and 8.
⌬T0P0共N,H0兲 ⬀
Following the same procedure as above, the partition function of the extended system is given by
˙ = 1 AQ , Q i,␣ i,␣ 2
Tr关⑀兴 ␣兲 pi,␣ − ⑀pi,␣ − 共t, 1 pi,␣ , gf
Tr关⑀兴 ␣兲 Si,␣ − 共r, Si,␣ , S˙ i,␣ = Ti,␣ + Si,␣ ⫻ I−1Si,␣ − 1 gf ˙ = H, H ⑀ G⑀ ˙ ⑀ = − 1 ⑀ , Wg ␣兲 ␣兲 = 共t, , s˙共t, k k ␣兲 ␣兲 = 共r, s˙共r, k k
共k = 1, ¯ ,M兲,
共26兲
共t,␣兲 共t,␣兲 ␣兲 ␣兲 共t,␣兲 ˙ 共t, = G共t, , k k /Q pk − k+1 k
␣兲 ␣兲 共r,␣兲 共r,␣兲 共r,␣兲 ˙ 共r, = G共r, /Q p − k+1 k k k k
共k = 1, ¯ ,M − 1兲,
共t,␣兲 ␣兲 共t,␣兲 ˙ 共t, M = G M /Q p M ,
␣兲 共r,␣兲 共r,␣兲 ˙ 共r, M = G M /Q p M ,
˙ k = k 共k = 1, ¯ ,M兲,
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-7
˙ k =
˙ M =
J. Chem. Phys. 122, 224114 共2005兲
Molecular dynamics simulation of rigid molecules
G k Q bk
GM QbM
where similar to the isotropic case, p = Q p is the conjugate momentum of the thermostat coupled to particles, p⑀ = W⑀ is the barostat tensor momentum, p = Qb is the momentum of the thermostat coupled to barostat, and H0 is a constant. The partition function can be integrated over the variables p⑀, s, p , , and p and it becomes
共k = 1, ¯ ,M − 1兲,
− k+1k
,
where Tr关⑀兴 is the trace of the tensor ⑀ , Wg is the mass of the cell parameters which is defined as4,7 Wg =
共g f + d兲kBT0 d2b
共27兲
,
and G p is the barostat force tensor given by 1 G p = V共Pint − 13 P0兲 + gf
冉兺 N
冊
where 13 is a 3 ⫻ 3 unit matrix. Now, the set of parameters Gk 共k = 1 , ¯ , M兲 which will be the thermostat forces of the chain coupled to barostat tensor are given by G1 = WgTr共⑀T⑀兲 − d2kBT0 , Gk = Qbk2
k−1
− k BT 0
共28兲
共k = 2, ¯ ,M兲.
Using the Miller et al.17 description of the rotation, the equations of rotational motion in isothermal-isobaric ensemble are written as 3
P˙ ␣ = F␣共4兲 −
1
共P␣T DkQ␣兲DkP␣ − 兺 k=0 4Ik
Tr关⑀兴 ␣兲 P␣ − 共r, P␣ , 1 gf 共29兲
˙ = 1 M共Q 兲共4兲 . Q ␣ 2 ␣ ␣
The conserved quantity for the chain thermostat Nosé– Hoover and barostat system 共the extended total energy of the system兲 in the case of the shape-varying cell is given by HNPT = HNVT + P0det关H兴 + M
+
兺 k BT 0 k +
k=1
Wg Tr共T⑀ ⑀兲 2
Qbk2
k
2
共30兲
.
The invariant volume factor is6,8
冑g = 关det H兴1−dexp关共g f + d2兲s1 + sc兴, where s1 and sc retain the same definition as in the isotropic NPT and NVT ensemble case. If there is an external force, N Fi ⫽ 0, the total extended energy is the only coni.e., 兺i=1 served quantity. The partition function of the system of rigid body can be written as ⌬T0,P0共N,H0兲 ⬀
冕 冕 冕 冕 冕 冕 冕冕 冕冕 dH
⫻
d Nq
d NQ
1−d
exp关共g f + d 兲s1 + sc兴
⫻ ␦共HNPT − H0兲,
dV H0
冕 冕 冕 冕 d Nq
d Np
d NQ
d NP
⫻ ␦共det H0 − 1兲exp共− HNVE − P0V兲,
3. Constrained H matrix
Nosé and Klein1 describe and address the problem of the whole simulation cell rotating during the course of the NPT with shape-varying cell simulations. This is because angular momentum is not conserved in a periodic system which lacks the spherical symmetry, and because the H matrix has nine degrees of freedom, three more than needed to specify the position and orientation of the simulation cell. Martyna and co-workers8 observed that if the pressure tensor is not symmetric, then a torque acts on the cell, giving rise to rotational motion. They have applied two different constraints to remove this contribution to the rotation. The first is to work T with the symmetrized pressure tensor Ps = 21 共Pint + Pint 兲, where T Pint is the transpose matrix of Pint. In this case, if the total angular momentum of the cell is initially set to zero, the cell should not rotate. The second method is to work with a restricted set of cell parameters that only respond to the upper triangle of the tensor. In this method, the three subdiagonal elements of the H matrix are constrained to zero, hence, the cell vector h1 is constrained to lie along the x axis and h2 is constrained to lie in the xy plane. This constraint technique allows restrictions to be imposed to eliminate redundant degrees of freedom, and can also be used, for example, to permit uniaxial expansion only. In the case where H is triangular it has been demonstrated elsewhere7 that the ensemble is isothermal isobaric. The results for the symmetric case are presented here following an initial verification that both were stable. This case proved to be handled easier, in particular, in analytical diagonalization of 3 ⫻ 3 matrices, as it will be shown in the following section.
III. SYMPLECTIC AND TIME-REVERSIBLE INTEGRATORS
d NP
d M d M p
d M sd M p
dp⑀
⫻ 关det H兴
d Np
冕
where the relation H = V1/3H0 was used. This equation ensures that Eqs. 共26兲 correctly reproduce the NPT ensemble. This derivation is a straightforward implementation of the derivation of Martyna and co-workers6,8 for the atomic system to the rigid body system.
p2i + STi I−1Si 13 , mi
i=1
⌬T0,P0共N,H0兲 ⬀
2
共31兲
A. The Liouville formalism and Trotter formula
For the systems of rigid bodies under investigation, we can apply the Liouville formalism of the Hamiltonian dynamics to find the time derivative of a set f ⬅ 共p , q兲 of configuration and momentum variables along the trajectory11
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-8
df = dt
J. Chem. Phys. 122, 224114 共2005兲
Kamberaj, Low, and Neal
f
f
兺j q˙ j q j + p˙ j p j ,
共32兲
where the sum is extended to all degrees of freedom in the system and q˙ j = H / p j, p˙ j = −H / q j are the Hamiltonian equations of motion.11,12 The Liouvillean operator iL is defined as11 iL = 兺 jq˙ j / q j + p˙ j / p j. It can be seen that the exponential operator O共t兲 ⬅ eiLt is the classical propagator, which evolves the system phase-space point from the initial state 关q共0兲 , p共0兲兴 to the state 关q共t兲 , p共t兲兴 by acting on f as11 f共t兲 = O共t兲f共0兲. It satisfies the time-symmetry property O共⌬t兲O共−⌬t兲 = 1, therefore the flow map is time reversible. This formalism is completely general and it can also be applied to non-Hamiltonian systems sometimes leading to time-reversible numerical integrators as described by Martyna et al.18 In this case, the function f can be the t共r兲 state vector 关st共r兲 k , k , p , q , S共P兲 , Q兴 for the NVT or t共r兲 t共r兲 关sk , k , , ⑀ , p , q , S共P兲 , Q兴 共k = 1 , ¯ , M兲 for NPT ensembles as presented here. In general, the action of the evolution operator O共t兲 on the state vector cannot be solved exactly. Therefore, a short time approximation to the true operator, accurate at time ⌬t = t / n, is applied n times in succession to evolve the system considering small time steps ⌬t used in MD simulations. Thus, if the Hamiltonian of the system can be written as H = 兺kHk, then using the Trotter formula,29,30 we can write, O共t兲 =
冉兿 冊 eiLk⌬t
n
+ O共⌬t p+1/n p兲,
low order integrators. This scheme is easy to implement and with low computation cost, furthermore it resulted in the integrators with long-time stability in terms of energy conservation. The explicit integration schemes can be straightforwardly obtained by using the exponential expansion 共36兲
eax f共x兲 = f共x + a兲,
where a does not depend on x. For extended systems two additional analytical forms for the exponential operators are obtained with a being a scalar or a matrix, a containing x. In these cases the following expressions are applied:18 eax·x f共x兲 = f共eax兲,
e关ax兴·x f共x兲 = f共eax兲.
共37兲
The exponential matrix ea is obtained by diagonalization of a as 共38兲
ea = CDC−1 ,
where C is the associated matrix of eigenvectors of the matrix a and D is a diagonal matrix with diagonal element equal to exponential of the eigenvalues of the matrix a. Here, for a 3 ⫻ 3 matrix the eigenvalues and eigenvectors are determined analytically in order to maintain the second-order accuracy of the overall integration scheme and to decrease the computational time needed.
共33兲
k
which has an overall accuracy of order ⌬t p+1 / n p for a pth order factorization where iLk is the Liouville operator of the associated variables with the Hamiltonian function Hk. For example, for p = 2 we can write H = H1 + H2 关the Poisson bracket 兵H1 , H2其 = 共H1 / q兲共H2 / p兲 − 共H1 / p兲共H2 / q兲 ⫽ 0兴, and the propagator operator can be written as eiL⌬t = eiL1⌬t/2eiL2⌬teiL1⌬t/2 + O共⌬t3兲,
共34兲
which is known as symmetric Trotter factorization or Strang splitting31 and it is correct to the second order. The Strang splitting scheme can be applied for each set of two operators, in order to obtain time-reversible and explicit integrators, in the case of the dynamical systems where the Hamiltonian can be split into terms with a nonvanishing Poisson bracket, Hk 共k = 1 , 2 ¯ p兲. Then the time evolution operator can be written e
iL⌬t
=e
i共⌬t/2兲L1
¯
ei共⌬t/2兲Lp−1ei⌬tLpei共⌬t/2兲Lp−1
+ O共⌬t3兲 ⬅ ⌬t + O共⌬t3兲,
¯e
i共⌬t/2兲L1
B. Microcanonical ensemble
In the NVE ensemble we will describe two algorithms for the rotation motion. The first algorithm is based on the equations of motion of rigid body as described elsewhere16 that are not Hamiltonian,17 but they conserve the total energy of the system. The second algorithm is based on the equations of motion, recently introduced by Miller et al.,17 which arises from a Hamiltonian formalism. It is interesting to note that the Liouville formalism can be used for both cases. First we will discuss the NVE ensemble described by Eq. 共1兲 is written as 共4兲 and the Liouville operator iLNVE 共1兲 = iLt + iLr , iLNVE
共39兲
where iLt = iL1,t + iL2,t, iLr = iL1,r + iL2,r, and
兺冉 冊 N
iL1,t =
j=1
Fj · ⵜv j, mj
N
iL2,t =
v j · ⵜq , 兺 j=1 j
共35兲
which is considered as a Strang splitting of the pth order of factorization. We see that this splitting is also correct to the second order since the factorization of each set of two operators is correct to the second order 关see Eq. 共34兲兴. As we will see in the following section the limited accuracy in the numerical integration will not destroy the time reversibility property of the flow map 共⌬t−⌬t = 1兲. It is worth noting that similar factorization schemes have also been proposed, e.g., see Martyna et al.18 Higher order integrators can also be generated using Yoshida–Suzuki integration37,38 from
N
iL1,r =
关T j + S j ⫻ I−1S j兴 · ⵜS , 兺 j=1 j
共40兲
N
iL2,r = 共1/2兲
关AQ j兴 · ⵜQ , 兺 j=1 j
where v j is the velocity of the jth particle 共=p j / m j兲 and N is the number of particles of the system. In the limit of the short time step ⌬t, the Strang splitting scheme31 can be used in the
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-9
J. Chem. Phys. 122, 224114 共2005兲
Molecular dynamics simulation of rigid molecules
form presented here by Eq. 共35兲, to generate the classical propagator, 共1兲
eiLNVE⌬t = ei⌬tL1,t/2ei⌬tL2,tei⌬tL1,r/2ei⌬tL2,r ⫻ei⌬tL1,r/2ei⌬tL1,t/2 + O共⌬t3兲 ⬅ ⌬t + O共⌬t3兲.
共41兲
Using this equation, the time-reversible numerical integrator can be derived since the flow map ⌬t has the time symmetry property ⌬t−⌬t = 1. Acting with the operator ⌬t onto the
冊册 冊 冋 冉 冊册 冉 冊 冋 冉 冊册 冋 冉 冋 冉 冉 冊
冉 冊 冉
exp i
state vector at time t = 0 we can update coordinate and momenta at a later time ⌬t. Since the forces F j depend only on the positions q, the operator exp共iL1,t⌬t / 2兲 becomes a translation operator on the momenta. Similarly, exp共iL2,t⌬t兲 is a translation operator on the positions. The resulting algorithm for translation motion is completely equivalent to the well-known velocity Verlet.11 The integration of the rotational motion is split up, using the Trotter factorization scheme, into free rotational motion and rotation due to the torque T in the body frame, as
⌬t ⌬t ⌬t Lr = exp T · ⵜs exp 2 S3 − S1 2 2 2 S1 S3 ⫻exp 1
⌬t S2 − S3 2 S3 S2
exp
⫻exp 1
⌬t S2 − S3 2 S3 S2
exp 2
⫻exp
⌬t 关AQ兴 · ⵜQ 2
⌬t S3 − S1 2 S1 S3
⌬t T · ⵜs + O共⌬t3兲, 2
where the sum over all particles is omitted for simplicity, 1 = 共1 / I3 − 1 / I1兲S1 and 2 = 共1 / I3 − 1 / I2兲S2. The update of the angular momentum due to the torque is simply a translation operator on the angular momentum S in the body frame. The action of operator exp关i共S j / Sk − Sk / S j兲兴 is equivalent to the rotation in the 共S j , Sk兲 plane with angle i around the axis Si. The quaternion is advanced by the operator exp共⌬t / 2关AQ兴 · ⵜQ兲, after advancing the angular momenta a half time step, according to the equation
冉
Q共t + ⌬t兲 = exp
冊
⌬t A关共t + ⌬t/2兲兴 Q共t兲, 2
共43兲
where 共t + ⌬t / 2兲 is the angular velocity in body frame at the midstep. As described in Ref. 16, A is an element of the four-dimensional representation of su共2兲 Lie algebra, its exponential can be calculated exactly by means of the wellknown Euler–Rodriguez formula39
冉
e⌬tA关共t+⌬t/2兲兴 = cos
+
冊
共42兲
the exponential of ⌬tA is calculated exactly, hence, the normalization condition for the quaternion is automatically satisfied and does not have to be imposed separately. Application of a separate procedure of normalization may lead to violation of the time reversibility.16 Equations 共43兲 and 共44兲 update the quaternion exactly a full time step. The full integration procedure of the translation and rotation motion is summarized in the following: Step 1:
冉
冊
⌬t 共t + ⌬t/2兲 2 A关共t + ⌬t/2兲兴 共t + ⌬t/2兲
⬅ E关共t + ⌬t/2兲兴,
共44兲
where = 冑21 + 22 + 23, 14 is a 4 ⫻ 4 unit matrix, and E is a 4 ⫻ 4 matrix, which depends on the midstep angular velocity 共t + ⌬ / 2兲. Furthermore, since the matrix A is antisymmetric, Eq. 共43兲 is an orthogonal transformation of Q because
冉 冊
⌬t ⌬t F共t兲 , = v共t兲 + 2 2 m
共1兲
v t+
共2兲
q共t + ⌬t兲 = q共t兲 + ⌬tv t +
共3兲
˜S共t兲 = S共t兲 + ⌬t T共t兲, 2
共4兲
˜S t + ⌬t = R ⌬t 1 − 1 ˜S 共t兲 ˜S共t兲, y 2 2 2 I3 I2
共5兲
S t+
⌬t 共t + ⌬t/2兲 14 2
sin
冊册
冉 冊
⌬t , 2
冉 冊 冉 冋 册 冊
共45兲
冉 冊 冋 冋 册 冉 冊册 冉 冊 ⌬t 1 1 ˜ ⌬t ⌬t = Rx − S1 t + 2 2 I3 I1 2 ˜ t + ⌬t , ⫻S 2
共6兲
Q共t + ⌬t兲 = E关共t + ⌬t/2兲兴Q共t兲,
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-10
J. Chem. Phys. 122, 224114 共2005兲
Kamberaj, Low, and Neal
Step 2: Calculate F共t + ⌬t兲 and T共t + ⌬t兲
共4兲
冉 冊
v共t + ⌬t兲 = v t +
共2兲
˜S t + ⌬t = R ⌬t 1 − 1 S t + ⌬t x 1 2 2 I3 I1 2
冉 冊 冋 冋 册 冉 冊册 冉 冊 ⫻S t +
共3兲
where R j共兲 is the rotation matrix around the S j axis with angle . Steps one and two represent the algorithm for both translational and rotational motion in a velocity-Verlet scheme derived here using the Liouville formalism. The integration scheme is time reversible, since the flow map has the property ⌬t−⌬t = 1, explicit, and it is implemented in two steps. The integration is correct to the second order as the Trotter factorization scheme is correct to the second order, see Eq. 共41兲. Higher order integrators can be constructed for rotation motion based on the second-order methods described above. Yoshida37 has described a general method for transforming an n-order explicit method into 共n + 2兲-order explicit method, although with an increase in computational cost. Here, we will discuss the case when n = 2, thus the second-order integrator is transformed into a fourth-order one. The rotation operator corresponding to a fourth-order accurate integrator is written as
⌬t ⌬t F共t + ⌬t兲 , + 2 2 m
共1兲
⌬t , 2
冋 冋 册 冉 冊册
˜S共t + ⌬t兲 = R ⌬t 1 − 1 ˜S t + ⌬t y 2 2 I3 I2 2
冉 冊
˜ t + ⌬t , ⫻S 2
冉 冊 冉
exp i
冊 冋
冉
⌬t ⌬t w0⌬t Lr = exp T · ⵜs exp 2 S3 − S1 2 2 2 S1 S3
冉
⫻exp
冋 冋 冋
冊 冋
冊册 冋 exp
w1⌬t 1 S2 − S3 2 S3 S2
⫻exp
共w0 + w1兲⌬t 2 S3 − S1 2 S1 S3
⫻exp
w0⌬t 1 S2 − S3 2 S3 S2
冉
冊册 冉
冉 冊册 冋 冊册 冊册 冉 冊册 冊 冋 冉 冊册 冋 冉 冊册 冉 冊 冊册 冋 冉 冊册 冉 冊
⫻exp
冉
冉
w0⌬t 1 S2 − S3 2 S3 S2
w0⌬t w0⌬t 关AQ兴 · ⵜQ exp 1 S2 − S3 2 2 S3 S2
冉
⌬t S共t + ⌬t兲 = ˜S共t + ⌬t兲 + T共t + ⌬t兲, 2
exp
exp
exp
共w0 + w1兲⌬t 2 S3 − S1 2 S1 S3
w1⌬t w1⌬t 关AQ兴 · ⵜQ exp 1 S2 − S3 2 2 S3 S2 exp
w0⌬t 1 S2 − S3 2 S3 S2
w0⌬t 2 S3 − S1 2 S1 S3
where w0 = 1 / 共2 − 21/3兲 and w1 = 1 − 2w0.37,38 The action of this operator is straightforward and similar to the action of the operator given by Eq. 共42兲. It is worth noting that the algorithm for translational motion, derived here using Liouville formalism, is equivalent to velocity-Verlet algorithm and therefore it is symplectic. In contrast, the integrator for rotation motion is not symplectic, but it is only time reversible as recently discussed by Miller et al.17 Since the rotation motion integrator is not symplectic when combined with translational motion integrator, the whole integrator is no longer symplectic, but still time reversible. In order to construct symplectic and time reversible for both translational and rotational motion we have discussed the equations of motion proposed by Miller et al.17 关see Eqs. 共7兲兴. The Liouville operator is similarly written as 共2兲 = iLt + iLr , iLNVE
where iLt retains its previous definition and iLr is given by
exp
exp
w0⌬t 关AQ兴 · ⵜQ 2
⌬t T · ⵜs + O共⌬t5兲, 2
共46兲
4
iLr =
iLk , 兺 k=0
where iLk = k共DkQⵜP − DkPⵜQ兲, k = 1, 2, 3 and iL4 = F共4兲. As described by Miller et al.,17 h0 ⬅ 0, therefore, iL0 ⬅ 0, and furthermore if 0共t = 0兲 = 0 and 兩Q共0兲兩2 = 1 then the approximate evolution precisely conserves 0共t兲 ⬅ 0 and 兩Q共t兲兩2 ⬅ 1. The time evolution operator for rotation motion can then be written as ei共⌬t/2兲Lr = ei共⌬t/2兲L4ei共⌬t/2兲L3ei共⌬t/2兲L2ei⌬tL1 ⫻ ei共⌬t/2兲L2ei共⌬t/2兲L3ei共⌬t/2兲L4 + O共⌬t3兲,
共47兲
where k = 共1 / 4Ik兲PTDkQ. Similarly to the previous algorithm, higher order integrators can be constructed based on the scheme shown in Eq. 共47兲. In the following we present a fourth-order accurate algorithm based on the Yoshida–Suzuki method.37,38 The fourth-order accurate splitting scheme is given by
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-11
J. Chem. Phys. 122, 224114 共2005兲
Molecular dynamics simulation of rigid molecules
冉 冊 冉 冊 冉
exp i
冊 冉 冊 冊 冉 冉 冊 冉 冊 冉 冉 冊 冉 冉 冊 冉 冊 冉 冊
⌬t ⌬t w0⌬t w0⌬t Lr = exp i L4 exp i L3 exp i L2 2 2 2 2
冊 冊
⫻exp共iw0⌬tL1兲exp i
共w0 + w1兲⌬t w0⌬t w1⌬t L2 exp i L3 exp i L2 2 2 2
⫻exp共iw1⌬tL1兲exp i
共w0 + w1兲⌬t w1⌬t w0⌬t L2 exp i L3 exp i L2 2 2 2
⫻exp共iw0⌬tL1兲exp i
w0⌬t w0⌬t ⌬t L2 exp i L3 exp i L4 + O共⌬t5兲, 2 2 2
where w0 and w1 are given above. The action of each of these operators is summarized as following:
共48兲
冉 冊
⌬t ˜ + sin共⌬t /2兲D ˜P , = cos共⌬t3/2兲P 3 3 2
共12兲
P t+
共13兲
˜ + sin共⌬t /2兲D Q ˜ Q共t + ⌬t兲 = cos共⌬t3/2兲Q 3 3 ,
ei␦tLkQ = cos共␦tk兲Q + sin共␦tk兲DkQ, ei␦tLkP = cos共␦tk兲P + sin共␦tk兲DkP
共k = 1,2,3兲,
共49兲
ei␦tL4P = P + 2␦tMT共4兲 , where ␦t = ⌬t / 2, w0⌬t / 2, w0⌬t, w1⌬t / 2, w0⌬t, or 共w0 + w1兲⌬t / 2. Combining these equations with those for the translational motion, one obtains the full integrator for the rigid body motion. In the following we will write only the second-order integration scheme, as the fourth-order one can be straightforwardly implemented, Step 1:
冉 冊
⌬t ⌬t F共t兲 , = v共t兲 + 2 2 m
Step 2: Calculate F共t + ⌬t兲 and T共t + ⌬t兲
冉 冊
⌬t ⌬t F共t + ⌬t兲 , + 2 2 m
共1兲
v共t + ⌬t兲 = v t +
共2兲
⌬t P共t + ⌬t兲 = ˜P + 2M关Q共t + ⌬t兲兴T共4兲共t + ⌬t兲, 共50兲 2
˜ are auxiliary variables. It is worth noting that where ˜P and Q for the free rotation motion we have used a factorization 3-2-1, the same as used by Miller et al.,17 although other factorization schemes are possible, such as 2-3-1, etc. In current work we have examined all possible factorization schemes and this splitting 共3-2-1兲 yielded the most stable scheme in terms of the energy conservation for the systems under investigation. Therefore, it is this scheme that we will used throughout this paper. In this work we have implemented both methods and compared them in terms of energy conservation. Comparison is also made with the Fincham algorithm for rotational motion.27 We have implemented a modified leap-frog scheme as described in Ref. 11, which is summarized as follows:
共1兲
v t+
共2兲
q共t + ⌬t兲 = q共t兲 + ⌬tv t +
共3兲
˜P = P共t兲+ ⌬t 2M关Q共t兲兴T共4兲共t兲, 2
共4兲
˜P = cos共⌬t /2兲P ˜ + sin共⌬t /2兲D ˜P , 3 3 3
共5兲
˜ = cos共⌬t /2兲Q共t兲 + sin共⌬t /2兲D Q共t兲, Q 3 3 3
共6兲
˜P = cos共⌬t /2兲P ˜ + sin共⌬t /2兲D ˜P , 2 2 2
共7兲
˜ = cos共⌬t /2兲Q ˜ + sin共⌬t /2兲D Q ˜ Q 2 2 2 ,
共8兲
˜P = cos共⌬t 兲P ˜ + sin共⌬t 兲D ˜P , 1 1 1
S t+
共9兲
˜ = cos共⌬t 兲Q ˜ + sin共⌬t 兲D Q ˜ Q 1 1 1 ,
˙ t + ⌬t = A t + ⌬t Q 2 2
冉 冊
⌬t , 2
共10兲
˜P = cos共⌬t /2兲P ˜ + sin共⌬t /2兲D ˜P , 2 2 2
共11兲
˜ = cos共⌬t /2兲Q ˜ + sin共⌬t /2兲D Q ˜ Q 2 2 2 ,
冉 冊 冉 冊 冉 冊 冉 冊 冉 冊 冋 冉 冊册 冉 冊 冉 冊
S共t兲 = S t −
⌬t ⌬t + T共t兲, 2 2
˜ t + ⌬t = Q共t兲 + ⌬t Q ˙ 共t兲, Q 2 2
⌬t ⌬t =S t− + ⌬tT共t兲, 2 2
Q共t + ⌬t兲 = Q共t兲 +
˜ t + ⌬t , Q 2
共51兲
⌬t ⌬t ˙ Q t+ . 2 2
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-12
J. Chem. Phys. 122, 224114 共2005兲
Kamberaj, Low, and Neal
˜ 关t + 共⌬t / 2兲兴 is a guess of the quaternion Q at the Here Q time t + ⌬t / 2 in order to update the derivative of the quater˙ 关t + 共⌬t / 2兲兴 a half time step. Allen and Tildesley11 nion Q suggest that quaternion should be normalized at each time step. This may violate the time-reversibility property of the algorithm as described in the literature.16
共1兲 iLNHC
冉
N␣
关− 兺␣ 兺 j=1
=
+
冋 兺冋
k
k
兺 k=1
C. Canonical ensemble
=
共1兲 iLNVE
+
共1兲 iLNHC ,
共52兲
where
冉 冊 冉
冉
⌬t ⫻exp 2
冉 冉
⫻exp
⌬t 2
⌬t ⫻exp 2
冉 冉
⫻exp
⌬t 2
⫻exp
⌬t 2
␣兲 关− 共r, S j,␣兴 · ⵜS 兺 1 j=1
M−1
+
k=1
␣兲 G共t, k
␣兲 Q共t, pk
␣兲 G共r, k
␣兲 Q共r, p
共t,␣兲 共t,␣兲 − k+1 k
册 册
␣兲 G共t, M 共t,␣兲 + 共t,␣兲 ␣兲 k Q p 共t, M M
共r,␣兲 共r,␣兲 − k+1 k
N␣
兺␣ 兺 j=1
k
␣
⌬t 共r,␣兲 共r,␣兲 exp 2 Q p M M
M−1
␣兲 Q共t, pk
␣ k=1
M−1
␣兲 G共t, k
␣兲 Q共t, pk
␣ k=1
␣兲 G共t, M
␣
␣兲 G共t, k
共t,␣兲 共t,␣兲 k+1 k
⌬t 共t,␣兲 exp 2 k
−
␣ j=1
␣兲 G共r, M
共r,␣兲 共r,␣兲 ␣ Q p M M
␣兲 关− 共r, S j,␣兴ⵜS j,␣ exp i 1
␣ k=1
␣兲 共t, k
␣兲 Q共r, pk
␣ k=1
␣兲 关− 共r, S j,␣兴 · ⵜS j,␣ 1
共r,␣兲 共r,␣兲 − k+1 k
␣兲 exp ⌬t s共t, k
␣兲 G共r, k
M−1
␣ j=1
␣兲 Q共r, pk
␣ k=1
M
␣兲 exp ⌬t 共t, k
N␣
␣兲 G共r, k
M−1
⌬t 共t,␣兲 共t,␣兲 exp 2 Q p M M
共t,␣兲 共t,␣兲 − k+1 k
⌬t 共t,␣兲 共t,␣兲 exp 2 Q p M M N␣
⌬t ⌬t L1,r exp 2 2
␣兲 G共t, M
␣
␣兲 共r, k
M
␣ k=1
共r,␣兲 共r,␣兲 − k+1 k
␣兲 共r, k
␣兲 s共r, k
冊
␣兲 共r, k
N␣
␣ j=1
␣兲 关− 共t, 1 v j,␣兴 · ⵜv j,␣ exp i
冊
⌬t L1,t + O共⌬t3兲 2
⬅ ⌬t + O共⌬t3兲,
body frame associated with the ␣th chain thermostat on the
冊 冊
exp共i⌬tL2,t兲exp共i⌬tL2,r兲
⌬t ⌬t L1,r exp 2 2
which is correct to the second order. The approach described above for the constant NVE case is actually straightforward to implement here. Applying the approximate flow map ⌬t t共r兲 on the state vector 共st共r兲 k , k , v , q , S , Q兲 共k = 1 , ¯ , M兲. First, the operator exp共i共⌬t / 2兲L1,t兲 acts to update the state vector for each chain thermostat ␣. It can be seen that the particle velocities can be updated at the half time step using the velocity-Verlet scheme described above, while other components remain unchanged. Then, the operator ␣ 关− 共t,␣兲v 兴 · ⵜ exp共⌬t / 2兺␣兺Nj=1 j,␣ v j,␣兲 scales the output veloci1 ties according to Nosé–Hoover thermostats. In a similar way, ␣ the operators exp共iL1,r⌬t / 2兲 and exp共⌬t / 2兺␣兺Nj=1 共r,␣兲 关−1 S j,␣兴 · ⵜS j,␣兲, act to update the angular momentum in
冊
共53兲 where the index ␣ runs over all species of the system. Similar to the NVE case, using the Strang splitting scheme given by Eq. 共35兲, the evolution operator can be written as
␣兲 关− 共t, 1 v j,␣兴 · ⵜv j,␣ exp i
␣兲 G共r, M
j,␣
␣兲 G共r, M + 共r,␣兲 ␣兲 , 共r,␣兲 k Q p 共r, M M
冊 冉 冊 冉 兺兺 兺 冊 冉兺 冊 冉 兺兺冋 册 兺兺冋 册 冊 冉 兺兺 冊 冉 兺兺 兺兺冋 册 冊 冉 兺兺冋 册 冊 兺 冊 冉兺 冊 冊 冉 冊 冉 兺兺 冊 冉 兺兺
⌬t ⌬t L1,t exp 2 2
共1兲 exp共i⌬tLNVT 兲 = exp i
· ⵜv j,␣ +
␣兲 共r,␣兲 共t, 兺 k 共t,␣兲 + k s s共r,␣兲 k=1
+
共1兲 iLNVT
N␣
M
M−1
The integration scheme for the NVT ensemble is also formulated using the approach described above. First we write the Liouville operator for equations of motion, Eq. 共8兲, as
␣兲 共t, 1 v j,␣兴
共54兲
t共r兲 half time step. At this stage, st共r兲 k , k , q, and Q have not changed. Next, the coordinates of the particles q, using the velocity-Verlet scheme, and quaternion Q according to the scheme 共43兲 is updated a full time step. At this step, the extended coordinates and velocities of each thermostat are also updated using the updated velocities as input to compute the thermostat forces. In our algorithm the operator
冉冋
exp − t
␣兲 G共t共r兲, k
␣兲 Q共t共r兲, p k
共t共r兲,␣兲 共t共r兲,␣兲 − k+1 k
册 冊 ␣兲 共t共r兲, k
is factorized as proposed by Martyna et al.:18
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-13
冉冋
exp − t
J. Chem. Phys. 122, 224114 共2005兲
Molecular dynamics simulation of rigid molecules
Gt共r兲 k Qt共r兲 pk
冉
t共r兲 t共r兲 − k+1 k
册 冊 t共r兲 k
共2兲
冊 冉 冊
t t共r兲 t共r兲 t共r兲 = exp − k+1 k t共r兲 exp tGk 2 k t共r兲 k
冉
冊
t t共r兲 t共r兲 ⫻exp − k+1 k , 2 t共r兲 k
共55兲
冉 冊
Here, the first step of the integration finishes. The rest of the evolution operator is applied in the same way after the force and torque acting on each particle are calculated at new particle positions, which represents the second step of the integration. The action of the full operator to the state vector 共st共r兲 , t共r兲 , v , q , S , Q兲 associated with chain thermostat ␣ is summarized as follows: Step 1:
冉 冊 冉 冊 冉
˜S共t + ⌬t兲 = R y
共4兲
⌬t S␣共t + ⌬t兲 = ˜S共t + ⌬t兲 + T␣共t + ⌬t兲, 2
冉
共5兲 ˜v共t + ⌬t兲 = exp − 共6兲
q␣共t + ⌬t兲 = q␣共t兲 + ⌬tv␣ t +
共4兲
˜S共t兲 = S 共t兲 + ⌬t T 共t兲, ␣ ␣ 2
共5兲
˜S t + ⌬t = R ⌬t 1 − 1 ˜S 共t兲 ˜S共t兲, y 2 2 2 I3 I2
冉 冊 冉 冊 冉
共1兲
␣兲 共t, t+ M
⌬t ⌬t 共t,␣兲 ␣兲 G 共t兲, = 共t, M 共t兲 + 2 2 M
共2兲
␣兲 共t, M−k t +
⌬t ⌬t ␣兲 = exp − 共t, 共t兲 2 4 M−k+1
冤
共6兲
˜S t + ⌬t = R ⌬t 1 − 1 ˜S t + ⌬t x 1 2 2 I3 I1 2
⌬t ⌬t ␣兲 ⌬t = exp − 共r, 共t兲 ˜S t + , 1 2 2 2
共7兲
S␣ t +
共8兲
Q␣共t + ⌬t兲 = E关共t + ⌬t/2兲兴Q␣共t兲,
共9兲
UPDATENHCP共t → t + ⌬t兲
Step 2: Calculate F共t + ⌬t兲 and T共t + ⌬t兲 ⌬t ⌬t ␣兲 t+ = exp − 共r, 共t + ⌬t兲 2 2 1
冉
⌬t 共t,␣兲 共t兲 4 M−k+1
冊
共k = 1, ¯ ,M − 1兲, 共3兲
冊
⌬t 共t,␣兲 G 共t兲 2 M−k
⌬t 共t,␣兲 共t兲 4 M−k+1 ⌬t 共t,␣兲 共t兲 4 M−k+1
冥
冉 冊
␣兲 共t,␣兲 共t,␣兲 s共t, t+ k 共t + ⌬t兲 = sk 共t兲 + ⌬tk
⌬t 2
共k = 1, ¯ ,M兲,
共4兲
共5兲
冉 冊 冉 冊 冉
␣兲 共r, t+ M
␣兲 共r, M−k
⌬t ⌬t 共r,␣兲 ␣兲 G 共t兲, = 共r, M 共t兲 + 2 2 M
⌬t ⌬t ␣兲 t+ = exp − 共r, 共t兲 2 4 M−k+1
冤
冉
⫻ exp −
冊
冊
sinh ⫻
˜ t + ⌬t , ⫻S 2
⫻S␣
冉
␣兲 ⫻共t, M−k共t兲 +
⌬t , 2
冉 冊 冉 冋 册 冊 冉 冊 冋 冋 册 冉 冊册 冉 冊 冉 冊 冉 冊冉 冊
⌬t t+ , 2
⌬t F␣共t + ⌬t兲 , 2 m␣
where UPDATENHCP共t → t + ⌬t兲 includes the following steps:
冊冉 冊 冉 冊
冉 冊 冉 冉 冊
冊冉 冊
v␣共t + ⌬t兲 = ˜v共t + ⌬t兲 +
⌬t ⌬t ␣兲 ⌬t = exp − 共t, 共t兲 ˜v t + , 2 2 1 2
共3兲
共57兲
⌬t 共t,␣兲 ⌬t 1 共t + ⌬t兲 v␣ t + , 2 2
⫻ exp −
v␣ t +
S␣
共3兲
⌬t ⌬t F␣共t兲 = v␣共t兲 + , 2 2 m␣
共2兲
共1兲
⌬t , 2 ⌬t 1 1 ˜ − S2共t + ⌬t兲 ˜S共t + ⌬t兲, 2 I3 I2
⫻S␣ t +
where the index ␣ is omitted for simplicity in notation. The action of this operator on 共r兲 k yields t t共r兲 sinh k+1 t共r兲 t共r兲 2 t共r兲 −tk+1 −共t/2兲k+1 t共r兲 + tGt共r兲 . 共56兲 k → k e k e t t共r兲 k+1 2
共1兲 ˜v t +
冠 冋 册 冉 冊冡 冉 冊 冉 冋 册 冊
⌬t ˜S共t + ⌬t兲 = R ⌬t 1 − 1 S x 1,␣ t + 2 I3 I1 2
共58兲
冊 冊
⌬t 共r,␣兲 ␣兲 共t兲 共r, M−k 共t兲 4 M−k+1
⌬t ␣兲 + G共r, 共t兲 2 M−k
冉
⌬t 共r,␣兲 共t兲 4 M−k+1 ⌬t 共r,␣兲 共t兲 4 M−k+1
sinh
共k = 1, ¯ ,M − 1兲,
冊
冥
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-14
共6兲
J. Chem. Phys. 122, 224114 共2005兲
Kamberaj, Low, and Neal
冉 冊
␣兲 ␣兲 ␣兲 s共r, 共t + ⌬t兲 = s共r, 共t兲 + ⌬t共r, t+ k k k
TABLE I. The values of the 共nys , w j兲 parameters involved in the Yoshida– Suzuki multiple time steps integrators 共Refs. 18, 37, and 38兲.
⌬t 2
共k = 1, ¯ ,M兲, 共7兲
冋
冉 冊册
⌬t 共r,␣兲 ⌬t ␣兲 共r, 共t + ⌬t兲 = exp − k+1 t+ k 4 2
冦冋
nys
wj
3
w1 = w3 = 1 / 共2 − 21/3兲 w2 = 1 − 2w1 w1 = w2 = w4 = w5 = 1 / 共4 − 41/3兲 w3 = 1 − 2w1 w1 = w7 = −1.177 679 984 178 87 w2 = w6 = 0.235 573 213 359 357 w3 = w5 = 0.784 513 610 477 56 w4 = 1 − 2共w1 + w2 + w3兲
5
冉 冊册
7
⌬t 共r,␣兲 ⌬t ⫻ exp − k+1 t+ 4 2
冉 冊
␣兲 ⫻共r, t+ k
⌬t ⌬t ␣兲 + G共r, 2 2 k
冋 冉 冊 sinh
⌬t ⫻ t+ 2
冉 冊册
⌬t 共r,␣兲 ⌬t t+ 4 k+1 2 ⌬t 共r,␣兲 共t + ⌬2t 兲 4 k+1
共k = 1, ¯ ,M − 1兲, 共8兲 共9兲
冉 冊
冉 冊
⌬t ⌬t ⌬t ␣兲 + G共r, t+ , M 2 2 2 ⌬t 共t,␣兲 ⌬t ␣兲 共t, k+1 t + k 共t + ⌬t兲 = exp − 4 2 共r,␣兲 ␣兲 共r, t+ M 共t + ⌬t兲 = M
冋
冦
冋
⫻ exp −
冉 冊册
冉 冊册
⌬t 共t,␣兲 ⌬t k+1 t + 4 2
冉 冊
␣兲 ⫻共t, t+ k
⫻
冋 冉 冊册
⌬t 共t,␣兲 ⌬t t+ 4 k+1 2 ⌬t 共t,␣兲 ⌬t k+1 t + 4 2
冉 冊
共k = 1, ¯ ,M − 1兲,
冉 冊
共t,␣兲 ␣兲 共t, t+ M 共t + ⌬t兲 = M
冉 冊
⌬t ⌬t ␣兲 ⌬t + G共t, t+ 2 2 k 2
sinh
共10兲
冧
冧
冉 冊
⌬t ⌬t ␣兲 ⌬t + G共t, t+ . M 2 2 2
␣兴 ␣兴 The term sinh兵共⌬t / 4兲关t共r兲, 其 / 共⌬t / 4兲关t共r兲, , j = k + 1, M − k j j + 1, that appears in the nonfactorized result has a singularity for 关t共r兲 , ␣兴 j = 0, which can be removed by expanding it in a Maclaurin series. Here we considered only the first eight terms as suggested by Martyna et al.18 It has to be noted that higher order integrators can be constructed by applying the Yoshida–Suzuki factorization scheme.37,38 Following Martyna et al.,18 we have used a multiple time step, denoted nc ⫻ nys where 共nc , nys兲 is the number of inner steps. In this case, UPDATENHCP共t → t + ⌬t兲, Eq. 共58兲, is performed in nc ⫻ nys steps where ⌬t → w j⌬t / nc. Some of the values of the 共nys , w j兲 parameters are given in Table I as reported in Refs. 18, 37, and 38. The dynamics generated by Eq. 共8兲 in the NVT ensemble are not Hamiltonian and hence we cannot
speak of symplectic integrators for the t flows defined by Eq. 共57兲. However, the algorithms are time reversible 共for the same reason as the NVE case, ⌬t−⌬t = 1兲 and second order similar to the constant NVE case, since the Trotter factorization scheme, Eq. 共54兲, is again correct to the second order. And as we will show in the following section these integrators for the non-microcanonical ensembles are also stable for long-time trajectories, as are the symplectic integrators for the NVE ensemble. The algorithm is explicit and can also be implemented in two steps. In the case of the Miller et al.17 method for rotation 共2兲 , can easily be written as motion, the Liouville operator, iLNVT 共2兲 共2兲 共2兲 共2兲 共1兲 iLNVT = iLNVE + iLNHC, where iLNHC is similar to iLNHC 关see Eq. 共53兲兴 only that instead of S we have P. Then Eq. 共57兲 can easily be modified by considering 共P , Q兲 instead of 共S , Q兲, and furthermore, equations labeled as 共4兲–共6兲 and 共8兲 at the first step of integration and 共2兲–共4兲 at the second step are modified as follows: ˜P = P 共t兲 + ⌬t 2M关Q 共t兲兴T共4兲共t兲, ␣ ␣ ␣ 2
冉
冊
˜P = exp − ⌬t 共r,␣兲共t兲 ˜P , 2 1 ˜P = cos共⌬t /2兲P ˜ + sin共⌬t /2兲D ˜P , 3 3 3 ˜ = cos共⌬t /2兲Q 共t兲 + sin共⌬t /2兲D Q 共t兲, Q 3 ␣ 3 3 ␣ ˜P = cos共⌬t /2兲P ˜ + sin共⌬t /2兲D ˜P , 2 2 2 ˜ = cos共⌬t /2兲Q ˜ + sin共⌬t /2兲D Q ˜ Q 2 2 2 , 共59兲 ˜P = cos共⌬t 兲P ˜ + sin共⌬t 兲D ˜P , 1 1 1 ˜ = cos共⌬t 兲Q ˜ + sin共⌬t 兲D Q ˜ Q 1 1 1 , ˜P = cos共⌬t /2兲P ˜ + sin共⌬t /2兲D ˜P , 2 2 2 ˜ = cos共⌬t /2兲Q ˜ + sin共⌬t /2兲D Q ˜ Q 2 2 2 ,
冉 冊
P␣ t +
⌬t ˜ + sin共⌬t /2兲D ˜P , = cos共⌬t3/2兲P 3 3 2
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-15
J. Chem. Phys. 122, 224114 共2005兲
Molecular dynamics simulation of rigid molecules
1. Isotropic cell fluctuations
˜ + sin共⌬t /2兲D Q ˜ Q␣共t + ⌬t兲 = cos共⌬t3/2兲Q 3 3 ,
冉
冊冉 冊
The Liouville operator for the equations of motion, Eq. 共15兲, is
˜P = exp − ⌬t 共r,␣兲共t + ⌬t兲 P t + ⌬t , ␣ 2 1 2
共1兲 共1兲 共1兲 = iLNVT + iLNHB , iLNPT
⌬t P␣共t + ⌬t兲 = ˜P + 2M关Q␣共t + ⌬t兲兴T␣共4兲共t + ⌬t兲, 2
共1兲 where iLNHB is given by
˜ are auxiliary variables and , k = 1, 2, 3 are where ˜P and Q k the same as in the NVE case. These equations are combined with these for translational motion to give the full integrator for rigid body system. Similar to the NVE case, the fourth-order integrators can be reconstructed for both methods of the integration of rotation motion.
N
共1兲 = iLNHB
兺 j=1
冋冉 冊 册 冋 − 1+
D. Isothermal-isobaric ensemble
Similar to the NVT ensemble, the integration scheme for the NPT ensemble is also formulated using the Liouville formalism. First, we present the numerical integration scheme for the isotropic method, then a more complicated numerical integration scheme for the shape-varying method will be presented. Both methods are described using two approaches mentioned above for the rotation motion.
冉
冊 冉 冊 冉 冊 冉
冉 冉 冉 冉 冉 冉 冉 冉
+
+ 兺 兺 k k=1 k=1
+
GM . QbM M
k
兺 k=1
k
k
N␣
−
␣
j=1
M−1
⌬t ⫻exp 2
␣
k=1
冊 冉 兺冋
k=1
M−1
␣
⌬t ⌬t L1,t exp 2 2
G k − k+1k k Qbk k
册 共61兲
G k Q bk
− k+1k
册 冊 k
N␣
␣兲 关− 共1 + d/g f 兲⑀ − 共t, 兺␣ 兺 1 兴v j,␣ · ⵜv j=1
⌬t d ␣兲 ⑀ − 共r, S j,␣ · ⵜS j,␣ exp 1 2 gf
␣兲 G共r, k
−
共r,␣兲 共r,␣兲 k+1 k
⌬t 共r,␣兲 exp 2 k
k=1
共r,␣兲 共r,␣兲 − k+1 k
⌬t 共r,␣兲 exp 2 k
N
j=1
⌬t ⫻exp 2
关v j − ⑀q j兴 · ⵜq j exp共i⌬tL2,r兲exp N␣
␣
␣
M−1
␣
M−1 k=1
−
␣
j=1
␣兲 G共t, k
␣兲 Q共t, p
共t,␣兲 共t,␣兲 − k+1 k
k
␣兲 G共t, M 共t,␣兲 ␣兲 Q p 共t, M M
N␣
␣兲 共t, 1 兴v j,␣
· ⵜv j,␣
␣
exp
⌬t 2
␣兲 共t, k
␣兲 共t, k
␣兲 G共r, M
␣
⌬t L1,r 2
␣兲 共t,␣兲 Q共t, p M M
共t,␣兲 共t,␣兲 − k+1 k
␣兲 共r,␣兲 Q共r, p M M
⌬t d ␣兲 ⑀ − 共r, S j,␣ⵜS j,␣ exp i L1,r 1 2 gf M−1
关− 共1 + d/g f 兲⑀ −
j=1
⌬t 2
␣
␣兲 Q共t, pk
k=1
␣
␣兲 G共t, k
exp i
␣兲 G共t, M
⌬t 共r,␣兲 共r,␣兲 exp 2 Q p M M
⌬t ␣兲 共r, k 共r,␣兲 exp ␣兲 exp ⌬t 2 s共t, s k=1 k k ␣兲 G共r, k ␣兲 Q共r, pk
j,␣
␣兲 G共r, M
M
␣兲 共t, k
⌬t 2
exp i
␣兲 Q共r, pk
M
⫻exp i⌬t
⫻exp
冋
冊 冉 冊 册 冊 冉 兺 兺兺冋 冊 冉兺 冊 兺兺冋 册 冊 冉 兺兺冋 册 冊 冊 冉 兺 冊 冉 兺兺冋 兺 册 冊 兺兺冋 册 冊 冉兺 冊 冉兺 冊 册 冊 冉 冊 冊 冉 兺兺冋 兺 冊 冉 冊 冉 兺冋 兺兺 册 冊 冊 冉 冊 冉 冊 冉 冊 M
⌬t ⫻exp 2
⫻exp
冊
G⑀ − ⑀ 1 + ⑀ ⑀ W ⑀
The chain thermostat part of the operator retains its previous definition. The equations of motion can be integrated using the approximate evolution operator,
冊 冉
⫻exp ⌬t
冉
M−1
M−1 ⌬t G⑀ ⌬t ⌬t GM ⌬t = exp exp ⑀ exp exp 2 W ⑀ 2 1 ⑀ 2 QbM M 2 k=1
⫻exp ⌬t
册
d d ⑀v j · ⵜ v j + − ⑀S j · ⵜ S j gf gf
+ 关 ⑀q j 兴 · ⵜ q j + M
共1兲 exp共i⌬tLNPT 兲
共60兲
⌬t ⌬t exp i L1,t exp 2 2 k=1
G k Q bk
− k+1k
k
⌬t GM ⌬t ⌬t G⑀ exp ⌬t⑀ exp 1 ⑀ exp + O共⌬t3兲 ⬅ ⌬t + O共⌬t3兲. 2 QbM M 2 2 W ⑀ ⑀ ⑀
共62兲
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-16
J. Chem. Phys. 122, 224114 共2005兲
Kamberaj, Low, and Neal
The full approximate propagator, ⌬t 关Eq. 共62兲兴, is applied to the full phase space by first acting with operator exp关共⌬t / 2兲1⑀共 / ⑀兲兴exp关共⌬t / 2兲共G⑀ / W兲共 / ⑀兲兴 to update t共r兲 the state vector 共st共r兲 k , k , , ⑀ , q , v , S , Q兲 共k = 1 , ¯ , M兲. As one can see, it updates only ⑀. Then the variables of the chain thermostat coupled to barostat are updated exactly in the same way as the chains of thermostat variables associated with particles, already discussed in a previous case for the NVT ensemble. The rest of the operator acts similarly to the NVT ensemble. To update the coordinates a nonfactorized operator was employed as was suggested by Martyna et al.18 in order to maintain the second-order accuracy of factorization given by Eq. 共62兲. The action of the operator exp共⌬t关v + ⑀q兴 · ⵜq兲 can be simplified using the same procedure presented above by Eqs. 共55兲 and 共56兲 as18
冉 冊
⌬t ⑀ 2 v共0兲. ⌬t ⑀ 2
共6兲
+ ⌬t exp
⫻
冉 冊
⌬t ⌬t = ⑀共t兲 + G⑀共t兲, 共1兲 ˜⑀ t + 2 2
共2兲
冉 冊 冉
冊冉 冊
冉 冊
˜S共t兲 = S 共t兲 + ⌬t T 共t兲, ␣ ␣ 2
共8兲
˜S t + ⌬t = R ⌬t 1 − 1 ˜S 共t兲 ˜S共t兲, y 2 2 2 I3 I2
共9兲
˜S t + ⌬t = R ⌬t 1 − 1 ˜S t + ⌬t x 1 2 I3 I1 2 2
共5兲
共10兲
冉 冊 冉 冋 册 冊
冉 冊 冠 冋 册 冉 冊冡 冉 冊 冉 冊 冠 冋 冉 冊册冡 冉 冊
S␣ t +
⌬t ⌬t 共r,␣兲 d = exp − 共t兲 + 2 2 1 gf ⫻⑀ t +
⌬t , 2
共12兲
UPDATENHCP共t → t + ⌬t兲,
共13兲
UPDATENHCB共t → t + ⌬t兲.
共1兲
冉 冊 冠 冋 冉 冊册冡 冉 冊
S␣ t +
⌬t ⌬t 共r,␣兲 d = exp − 1 共t + ⌬t兲 + 2 2 gf
˜v t +
⌬t , 2
⌬t 2
S t+
⌬t , 2
冠 冋 册 冉 冊冡 冉 冊
⌬t ˜S共t + ⌬t兲 = R ⌬t 1 − 1 S x 1,␣ t + 2 I3 I1 2 ⫻S␣ t +
⌬t ⌬t 共t,␣兲 = exp − 共t兲 + 共1 + d/g f 兲 2 2 1 ⌬t 2
˜S t + ⌬t , 2
Q␣共t + ⌬t兲 = E关共t + ⌬t/2兲兴Q␣共t兲,
共2兲
冉 冊 冠 冋 冉 冊册冡 冉 冊 ⫻⑀ t +
⌬t 2
共11兲
⌬t ⌬t F␣共t兲 = v␣共t兲 + 2 2 m␣
v␣ t +
⌬t , 2
˜ t + ⌬t , ⫻S 2
冉 冊
共4兲 ˜v t +
v␣ t +
Step 2: Calculate F共t + ⌬t兲 and T共t + ⌬t兲
⌬t ⌬t ⌬t ⑀ t + = exp − 1共t兲 ˜⑀ t + , 2 2 2
共t + ⌬t兲 = 共t兲 + ⌬t⑀ t +
⌬t ⌬t ⑀ t + 2 2
⌬t ⌬t ⑀ t + 2 2 ⌬t ⌬t ⑀ t + 2 2
⫻⑀ t +
共3兲
q␣共t兲
共7兲
共63兲 Similar to the case of the NVT ensemble, the term sinh关共⌬t / 2兲⑀兴 / 共⌬t / 2兲⑀ that appears in the nonfactorized result has a singularity for ⑀ = 0, therefore it is expanded in a Maclaurin series. We also considered only the first eight terms as suggested by Martyna et al.,18 which as will be shown here in the following section do not decrease the overall accuracy of the integrator. The explicit integration method can be written as Step 1:
⌬t 2
sinh
sinh e⌬t⑀q·ⵜqq共0兲 = e⌬t⑀q共0兲 + ⌬te共⌬t/2兲⑀
冋 冉 冊册 冋 冉 冊册 冋 冉 冊册 冉 冊 冉 冊
q␣共t + ⌬t兲 = exp ⌬t⑀ t +
⌬t , 2
冉 冋 册
冊
共3兲
˜S共t + ⌬t兲 = R ⌬t 1 − 1 ˜S 共t + ⌬t兲 ˜S共t + ⌬t兲, y 2 2 I3 I2
共4兲
⌬t S␣共t + ⌬t兲 = ˜S共t + ⌬t兲 + T␣共t + ⌬t兲, 2 共64兲
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-17
J. Chem. Phys. 122, 224114 共2005兲
Molecular dynamics simulation of rigid molecules
冉 冊 冠 冋 冉 冊册冡 冉 冊
共5兲 ˜v共t + ⌬t兲 = exp −
⌬t 共t,␣兲 d 1 共t + ⌬t兲 + 1 + 2 gf
⌬t ⫻⑀ t + 2 共6兲
v␣
⫻
⌬t t+ , 2
共5兲
冊冉 冊
⌬t ⌬t , 共7兲 ˜⑀共t + ⌬t兲 = exp − 1共t + ⌬t兲 ⑀ t + 2 2 共8兲
⌬t ⑀共t + ⌬t兲 = ˜⑀共t + ⌬t兲 + G⑀共t + ⌬t兲, 2
where UPDATENHCP共t → t + ⌬t兲 updates the chains of thermostats coupled to translational and rotation degrees of freedom associated with ␣ species and is described by Eq. 共58兲. The chain thermostat variables coupled to barostat are updated using UPDATENHCB共t → t + ⌬t兲 which is completely described by Eq. 共58兲 by substituting the variables of chain thermostat coupled to particles with these coupled to barostat. For a convenience of the reader we have written the steps to update the chain thermostat variables coupled to barostat in the following:
冉 冊 冉 冊 冉
⌬t ⌬t = M 共t兲 + GM 共t兲 2 2
共1兲
M t +
共2兲
M−k t +
冤
冉
冊 冊
共k = 1, ¯ ,M − 1兲,
冉 冊 冉 冊册 ⌬t t+ 2
共3兲
k共t + ⌬t兲 = k共t兲 + ⌬tk
共4兲
⌬t ⌬t k共t + ⌬t兲 = exp − k+1 t + 4 2
冦
冋
In the case of the Miller et al.17 approach for rotation 共2兲 共2兲 motion, the Liouville operator is written as iLNPT = iLNVT 共2兲 共2兲 + iLNHB. Similar to the NVE and NVT ensembles, iLNHB and 共2兲 the evolution operator exp共iLNPT 兲 are straightforward modified by replacing, respectively, in Eqs. 共61兲 and 共62兲, 共S , Q兲 by 共P , Q兲. Then, the rotation part of the integrator 关the updates 共7兲–共11兲 of the first step, and 共1兲–共4兲 of the second one兴, Eq. 共64兲, is modified as follows: ˜P = P 共t兲 + ⌬t 2M关Q 共t兲兴T共4兲共t兲, ␣ ␣ ␣ 2
再 冋
冉 冊册冎
˜P = exp − ⌬t 共r,␣兲共t兲 + d t + ⌬t ⑀ 2 1 gf 2
˜P ,
˜P = cos共⌬t /2兲P ˜ + sin共⌬t /2兲D ˜P , 3 3 3
冊
˜P = cos共⌬t 兲P ˜ + sin共⌬t 兲D ˜P , 1 1 1
冥
共k = 1, ¯ ,M兲,
冉 冊册
⌬t ⌬t k+1 t + 4 2
冉 冊
⫻ k t +
冉 冊
⌬t ⌬t ⌬t + GM t + . 2 2 2
˜ = cos共⌬t /2兲Q ˜ + sin共⌬t /2兲D Q ˜ Q 2 2 2 ,
⌬t 共t兲 M−k共t兲 4 M−k+1
冉
⫻ exp −
冉 冊
M 共t + ⌬t兲 = M t +
冧
˜P = cos共⌬t /2兲P ˜ + sin共⌬t /2兲D ˜P , 2 2 2
⌬t 共t兲 sinh 4 M−k+1 ⌬t + GM−k共t兲 2 ⌬t 共t兲 4 M−k+1
冋
冉 冊
˜ = cos共⌬t /2兲Q 共t兲 + sin共⌬t /2兲D Q 共t兲, Q 3 ␣ 3 3 ␣
⌬t ⌬t = exp − M−k+1共t兲 2 4
⫻ exp −
⌬t ⌬t k+1 t + 4 2 ⌬t ⌬t t + 4 k+1 2
共k = 1, ¯ ,M − 1兲,
⌬t F␣共t + ⌬t兲 v␣共t + ⌬t兲 = ˜v共t + ⌬t兲 + , 2 m␣
冉
冋 冉 冊册
sinh
冉 冊
⌬t ⌬t ⌬t + G k t + 2 2 2
共65兲
˜ = cos共⌬t 兲Q ˜ + sin共⌬t 兲D Q ˜ Q 1 1 1 , ˜P = cos共⌬t /2兲P ˜ + sin共⌬t /2兲D ˜P , 2 2 2 共66兲 ˜ = cos共⌬t /2兲Q ˜ + sin共⌬t /2兲D Q ˜ Q 2 2 2 ,
冉 冊
P␣ t +
⌬t ˜ + sin共⌬t /2兲D ˜P , = cos共⌬t3/2兲P 3 3 2
˜ + sin共⌬t /2兲D Q ˜ Q␣共t + ⌬t兲 = cos共⌬t3/2兲Q 3 3 ,
再 冋
冉 冊册冎
˜P = exp − ⌬t 共r,␣兲共t + ⌬t兲 + d t + ⌬t ⑀ 2 1 gf 2
冉 冊
⫻P␣ t +
⌬t , 2
⌬t P␣共t + ⌬t兲 = ˜P + 2M关Q␣共t + ⌬t兲兴T␣共4兲共t + ⌬t兲, 2
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-18
J. Chem. Phys. 122, 224114 共2005兲
Kamberaj, Low, and Neal
˜ are auxiliary variables and , k = 1, 2, 3 are where ˜P and Q k the same as in the NVE and NVT ensembles. These equations are combined with these for translational motion to give the full integrator for rigid body system. Similar to the NVT ensemble, the dynamics generated by equations in the NPT ensemble are not Hamiltonian, therefore, the algorithm is not symplectic, but it is time reversible 共⌬t−⌬t = 1兲 and correct to the second order as the Trotter factorization scheme applied here 关see Eq. 共62兲兴 is correct to the second order. The integration procedure can also be
冉 兺 冉 兺冋
冊 冉
3
implemented in two steps as in the previous cases. It is worthy noting that fourth-order accurate integrator can also be constructed in the NPT ensemble for rotation motion similar to the previous cases. 2. Shape-varying cell fluctuations
The equations of motion, Eqs. 共26兲, have the associated 共2兲 Liouville operator iLNPT and the corresponding approximated time evaluation operator,
冊 冉
3
⌬t ⌬t ⌬t GM 共G⑀兲 exp 1 共 ⑀兲 exp 2 ,=1 2 2 QbM M 共 v兲 共 ⑀兲 ,=1
共2兲 exp共i⌬tLNPT 兲 = exp
M−1
⌬t ⫻exp 2 k=1
再 再 再
G k
− k+1k
Q bk
冋 冉 兺兺冋 N␣
⌬t ⫻exp 2
兺␣ 兺 j=1
⌬t 2
N␣
− ⑀ −
兺
册 冊 冉
冊 冉 冊
M
⌬t exp ⌬t 兺 k exp i L1,t 2 k k k=1
冎
冊册
冉
Tr共⑀兲 ⌬t ␣兲 + 共t, 13 v j,␣ · ⵜv j,␣ exp i L1,r 1 2 gf
冊
冎冉 冊 冉 冋 册 冎 再 冋 冉 冊 冉 冊 再 冋 冊 冉 再 冋 册 冎 冉 册 冉 冊 再 冋 再 冋 冉 冊册 冎 冉 冊 冉
⫻exp
−
␣
j=1
M−1
⌬t ⫻exp 2
兺␣ 兺 k=1
M
⫻exp ⌬t
␣兲 G共r, k
␣兲 Q共r, pk
−
共r,␣兲 共r,␣兲 k+1 k
⌬t 兺 共r,␣兲 exp 2 ␣ k
␣兲 共t, k M−1
兺␣ 兺 k=1
⌬t 共r,␣兲 兺 共t,␣兲 exp ⌬t 兺 k 共r,␣兲 exp 2 ␣ sk sk k=1 ␣兲 G共r, k
␣兲 Q共r, p
共r,␣兲 共r,␣兲 − k+1 k
k
⌬t ⫻exp 2 − k+1k
冉
⫻ exp
兺 j=1
关v j − ⑀q j兴 · ⵜq j exp共i⌬tL2,r兲exp N␣
兺␣ 兺 j=1
␣兲 G共r, M
␣兲 G共t, ⌬t M exp 兺 共r,␣兲 共t,␣兲 共r,␣兲 ␣兲 2 ␣ Q p 共t, Q p M M M M
M−1
兺 k=1
M−1
兺 k=1
␣兲 G共t, k
␣兲 Q共t, pk
␣兲 G共t, k
␣兲 Q共t, pk
共t,␣兲 共t,␣兲 − k+1 k
␣兲 共t, k
共t,␣兲 共t,␣兲 − k+1 k
⌬t 2
N␣
兺␣ 兺 j=1
−
冎 冎
␣兲 共t, k
冊 冉
冊 冉
冎
冉
M−1
兺
冋
3
兺
冊
+ O共⌬t3兲 ⬅ ⌬t + O共⌬t3兲,
where iL1,t共r兲 and iL2,r are given as above. The thermostat part remains the same as in the isotropic cell fluctuation method. The procedure used to apply this evolution operator is the same as that used in the isotropic method. However, the appearance of a matrix ⑀ in the operators rather than a single variable and of a matrix of cell parameters H rather than a scalar variable makes the computations more com-
冊
冊
G k Q bk
3 ⌬t GM ⌬t exp exp ⌬t 兺 共vH兲 exp 1 兺 共 ⑀兲 2 QbM M 2 H 共 ⑀兲 k ,=1
⌬t 共G⑀兲 2 ,=1 共 v兲
冊
Tr共⑀兲 ⌬t ␣兲 − 共r, S j,␣ⵜS j,␣ exp i L1,r 1 2 gf
Tr共⑀兲 ⌬t ⌬t ␣兲 − ⑀ − + 共t, 13 v j,␣ · ⵜv j,␣ exp i L1,t exp 1 2 2 k=1 gf
册 冊 冉
册 册
␣兲 ␣兲 G共t, G共r, ⌬t ⌬t M M exp exp 兺 兺 共t,␣兲 共r,␣兲 共r,␣兲 共t,␣兲 ␣兲 2 ␣ Q p M 2 ␣ Q p 共r, k M M M
N
⫻exp i⌬t
兺␣
M
兺 k=1
⌬t ⫻exp 2
册
Tr共⑀兲 ⌬t ␣兲 − 共r, S j,␣ · ⵜS j,␣ exp 1 2 gf
冊
冊 共67兲
plicated. The operator exp共⌬t兺共⑀H兲 / H兲 updates the matrix H as
冋 冉 冊册
H共⌬t兲 = exp ⌬t⑀
⌬t 2
H共0兲.
共68兲
The update of the position q is more complicated because of the matrix exponential operators. We have used the same
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-19
J. Chem. Phys. 122, 224114 共2005兲
Molecular dynamics simulation of rigid molecules
nonfactorized scheme as in the isotropic cell fluctuation method, which is written as
冉 冊 冋 冉 冊册 冉 冊
q共⌬t兲 = e⌬t⑀共⌬t/2兲q共0兲 + 2−1 ⑀ ⌬t ⌬t ⫻ sinh ⑀ 2 2
共5兲
⌬t 共⌬t/2兲 共⌬t/2兲 ⑀ e 2
⌬t v . 2
冉 冊
v␣ t +
+
共69兲
Following Martyna et al., the exponential of the matrix is determined by Eq. 共38兲, then Eqs. 共69兲 and 共68兲 can be written as
冉 冊
冉 冊
q共⌬t兲 = C
冉 冊冋 冉 冊 冉 冊 冉 冊 冉 冊册 ⌬t 2
+ Ds
De共⌬t兲CT
共6兲
冋 冉 冊册 ⌬t Ds 2
冉 冊
冉 冊
The hyperbolic sine function that appears in the nonfactorized result can be expanded in a Maclaurin series in the same way as in the isotropic method. The same procedure is used to calculate other matrix exponentials that appear in the integration algorithm. The explicit integration method, correct to the second order, can be written as Step 1:
冉 冊 冉
H共t + ⌬t兲 = exp ⌬t⑀ t +
冉 冊
共4兲 ˜v t +
⌬t 2
⌬t ⌬t F␣共t兲 = v␣共t兲 + , 2 2 m␣
⌬t ⌬t ⑀ t + 2 2
⫻sinh
⌬t ⌬t ⑀ t + 2 2
H共t兲,
v␣ t +
共8兲
˜S t + ⌬t = R ⌬t 1 − 1 ˜S 共t兲 ˜S共t兲, y 2 2 2 I3 I2
共9兲
˜S t + ⌬t = R ⌬t 1 − 1 ˜S t + ⌬t x 1 2 2 I3 I1 2
⌬t , 2
冉 冊 冉 冋 册 冊 冉 冊
再 冋 册 冉 冊冎 冉 冊
˜ t + ⌬t , ⫻S 2
共10兲
冦 冤
冉 冊
S␣ t +
⌬t ⌬t 共r,␣兲 = exp − 共t兲 2 2 1
+
冊冉 冊
冋 冉 冊册
⫻exp
冋 冉 冊册 冥冧 冉 冊
Tr ⑀ t +
⌬t ⌬t ⌬t = exp − 1共t兲 ˜⑀ t + , 2 2 2
共3兲
⌬t 2
˜S共t兲 = S 共t兲 + ⌬t T 共t兲, ␣ ␣ 2
冉 冊
⑀ t +
q␣共t兲
共7兲
⌬t ⌬t = ⑀共t兲 + G⑀共t兲, 共1兲 ˜⑀ t + 2 2
共2兲
⌬t 2
冉 冊 冋 冉 冊册 冋 冉 冊册 冉 冊
关De共⌬t兲兴 = exp共⌬t兲␦ , ⌬t sinh 2 ⌬t = exp ␦ . 2 ⌬t 2
冣 冥冧
␣兲 + 共t, 1 共t兲 13
⌬t , 2
冋 冉 冊册
共70兲
where C is the associated matrix of eigenvectors of ⑀ 共the inverse C−1 is replaced by its transpose CT, since ⑀ is a symmetric matrix兲 and De and Ds are given by
冊
冉 冊
+ 2−1 ⑀ t+
,
⌬t 2
gf
q␣共t + ⌬t兲 = exp ⌬t⑀ t +
⌬t q共0兲 2
⌬t T ⌬t ⌬t C v 2 2 2
冢
冋 冉 冊册
Tr ⑀ t +
⫻ ˜v t +
18
⌬t ⌬t De共⌬t兲CT H共0兲, H共⌬t兲 = C 2 2
冦 冤冉
⌬t ⌬t ⌬t = exp − ⑀ t + 2 2 2
⌬t 2
gf
共11兲
Q␣共t + ⌬t兲 = E关共t + ⌬t/2兲兴Q␣共t兲,
共12兲
UPDATENHCP共t → t + ⌬t兲,
共13兲
UPDATENHCB共t → t + ⌬t兲.
˜S t + ⌬t , 2
Step 2: Calculate F共t + ⌬t兲 and T共t + ⌬t兲
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-20
共1兲
J. Chem. Phys. 122, 224114 共2005兲
Kamberaj, Low, and Neal
冦 冤
冉 冊
S␣ t +
˜ = cos共⌬t /2兲Q 共t兲 + sin共⌬t /2兲D Q 共t兲, Q 3 ␣ 3 3 ␣
⌬t ⌬t 共r,␣兲 = exp − 共t + ⌬t兲 2 2 1
˜P = cos共⌬t /2兲P ˜ + sin共⌬t /2兲D ˜P , 2 2 2
冋 冉 冊册 冥冧
Tr ⑀ t + +
⌬t 2
˜ = cos共⌬t /2兲Q ˜ + sin共⌬t /2兲D Q ˜ Q 2 2 2 ,
gf
˜P = cos共⌬t 兲P ˜ + sin共⌬t 兲D ˜P , 1 1 1
冉 冊
⫻S␣ t + 共2兲
⌬t , 2
共72兲
冠 冋 册 冉 冊冡 冉 冊 冉 冋 册 冊
⌬t ˜S共t + ⌬t兲 = R ⌬t 1 − 1 S x 1,␣ t + 2 I3 I1 2 ⫻S␣ t +
共4兲
⌬t S␣共t + ⌬t兲 = ˜S共t + ⌬t兲 + T␣共t + ⌬t兲, 2
⌬t ⌬t ⑀ t + 2 2
冋 冉 冊册
Tr ⑀ t +
冊
v␣ t +
冊
⌬t , 2
⌬t F␣共t + ⌬t兲 , 2 m␣
冊冉 冊
⌬t ⌬t , 共7兲 ˜⑀共t + ⌬t兲 = exp − 1共t + ⌬t兲 ⑀ t + 2 2 共8兲
⌬t ⑀共t + ⌬t兲 = ˜⑀共t + ⌬t兲 + G⑀共t + ⌬t兲. 2
In the case of the Miller et al.17 approach for rotation motion, Eqs. 共71兲 共only rotation integration part兲 have to be modified by considering 共P , Q兲 instead of 共S , Q兲 as already mentioned above. In the following we have written the equations of rotational motion as ˜P = P 共t兲 + ⌬t 2M关Q 共t兲兴T共4兲共t兲, ␣ ␣ ␣ 2
冢 冤
˜P = exp − ⌬t 共r,␣兲共t兲 + 2 1
冉 冊冥
Tr ⑀ t +
⌬t 2
gf
˜P = cos共⌬t /2兲P ˜ + sin共⌬t /2兲D ˜P , 3 3 3
gf
⌬t 2
冧
⌬t , 2
⌬t P␣共t + ⌬t兲 = ˜P + 2M关Q␣共t + ⌬t兲兴T␣共4兲共t + ⌬t兲, 2
冣 冥冧 冉
冉
冦 冤
˜P = exp − ⌬t 共r,␣兲共t + ⌬t兲 + 2 1
冉 冊冥
Tr ⑀ t +
冉 冊
gf
v␣共t + ⌬t兲 = ˜v共t + ⌬t兲 +
⌬t ˜ + sin共⌬t /2兲D ˜P , = cos共⌬t3/2兲P 3 3 2
⫻P␣ t +
⌬t 2
␣兲 + 共t, 1 共t + ⌬t兲 13
冉 冊
P␣ t +
˜ + sin共⌬t /2兲D Q ˜ Q␣共t + ⌬t兲 = cos共⌬t3/2兲Q 3 3 , 共71兲
冦 冤冉
共5兲 ˜v共t + ⌬t兲 = exp −
冢
˜ = cos共⌬t /2兲Q ˜ + sin共⌬t /2兲D Q ˜ Q 2 2 2 ,
⌬t 1 1 ˜ − S2共t + ⌬t兲 ˜S共t + ⌬t兲, 2 I3 I2
˜S共t + ⌬t兲 = R y
+
˜P = cos共⌬t /2兲P ˜ + sin共⌬t /2兲D ˜P , 2 2 2
⌬t , 2
共3兲
共6兲
˜ = cos共⌬t 兲Q ˜ + sin共⌬t 兲D Q ˜ Q 1 1 1 ,
冣
˜P ,
˜ are auxiliary variables and , k = 1, 2, 3 are where ˜P and Q k the same as above. These equations are combined with these for translational motion to give the full integrator for rigid body system. Similar to the isotropic case, the algorithm is time reversible, second order and can be implemented in two steps as shown. IV. RESULTS AND DISCUSSIONS
In order to evaluate the algorithms described here, we first compare the proposed integration schemes with a standard algorithm for the NVE ensemble. We have selected the Fincham algorithm as described earlier where the rotational algorithm is a modified version of the leap-frog algorithm. Following this an application of the integration scheme of constant NPT ensemble with both fixed and variable box shape will be presented. As a test system, we consider 500 molecules interacting via the Gay–Berne potential34 under periodic boundary conditions. The form of the Gay–Berne potential is presented in Appendix A. The potential is truncated at a distance rcut = 共 + 1兲0 and shifted such that U共rij = rcut兲 = 0:40 U共rij,ui,u j兲 = U共rijrˆ ij,ui,u j兲 − U共rcutrˆ ij,ui,u j兲.
共73兲
Both terms are included when the forces and torques are calculated during MD simulations. In simulation studies of Gay–Berne mesogen, the parameters 0 and ⑀0 共Appendix A兲
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-21
J. Chem. Phys. 122, 224114 共2005兲
Molecular dynamics simulation of rigid molecules
TABLE II. The percentage relative drift D and the standard energy error E in constant NVE , NVT, and NPT ensembles for Fincham algorithm 共Ref. 27兲, time reversible algorithm according to Matubayasi and Nakahara 共Ref. 16兲, and time reversible and/or symplectic algorithm according to Miller et al. 共Ref. 17兲 time step. NVE
NVT
NPT
⌬t 共⫻10 兲
E 共⫻10 兲
D 共%兲
E ⫻10
D 共%兲
E 共⫻10 兲
D 共%兲
E 共⫻10 兲
D 共%兲
E 共⫻103兲
Dd 共%兲
0.25 0.50 1.00 2.00 2.50
0.04 0.62 10 177
2.2 34 551
0.002 0.005 0.011 0.179 0.431
0.004 0.02 0.07 2.5 3.0
0.002 0.007 0.013 0.300 1.360
0.000 03 0.000 10 0.000 50 0.003 8 0.118 0
0.005 0.054 0.333 1.109 1.916
0.0006 0.003 0.018 0.049 0.069
0.085 0.133 0.622 6.470 18.38
0.001 0.003 0.030 0.354 1.053
*
3
a
3
a
b
3
b
c
3
c
d
3
d
d
Fincham algorithm 共Ref. 27兲. Time reversible algorithm of Matubayasi and Nakahara 共Ref. 16兲. Symplectic and time reversible algorithm of Miller et al. 共Ref. 17兲. d Time reversible algorithm using Miller et al. 共Ref. 17兲 algorithm for rotation motion. a
b c
are normally set equal to unity and the results are reported in terms of reduced units. A neighbor list was used to save * = 5.3. computational time, with a radius of rlist The Gay–Berne potential has been selected as the model potential for comparison because various forms of the Gay– Berne model have been shown to exhibit stable isotropic 共I兲, nematic 共N兲, smectic A 共SmA兲, and smectic B 共SmB兲 phases. Miguel et al.41 have provided an approximate phase diagram for a Gay–Berne system with parameters = 3, ⬘ = 5, = 2, and = 1, which exhibited N and SmB phases. Luckhurst et al.42 found that a system with = 3, ⬘ = 5, = 1, and = 2 displayed N, SmA, and SmB phases. Berardi et al.43 have set = 3, ⬘ = 5, = 1, and = 3 and found N and SmB phases. Brown and Allen40 have reported a detailed study of the Gay–Berne fluid for 3 艋 艋 4 with other parameters held fixed to = 2, = 1, and ⬘ = 5. They observed vapor, I, N, SmA, and SmB liquid crystal phases in their study. It is with detailed results presented by Brown and Allen40 that we make comparison in this study. In the current work, we chose the same exponents and and are set to the values = 2, = 1, = 4, and ⬘ = 5.
two different chains of thermostats. In the case of the NPT simulations the barostat is also coupled to a separate chain of thermostats. The length of each chain thermostat was M = 10. Two different techniques are adopted during MD simulations in the NPT ensemble; the fixed aspect ratio procedure
A. Simulation details
Molecular dynamics simulations were undertaken in the NVE , NVT, and NPT ensembles to study the phase behavior of a system of N = 500 GB rodlike molecules with periodic boundary conditions. We are aware that the NVE and NVT ensembles MD simulations alone are not the most complete technique for the study of phase transitions since the question arises as to whether the system may be forced into metastable states. The investigation in the NVE and NVT ensembles has been regarded as an initial investigation in determining the stability of the time-reversible and/or symplectic numerical integration methods already introduced in Sec. III. These results44 will not be reported here in order to save some space. The NVE ensemble MD simulations were followed by MD simulations in NVT and NPT ensembles. The Nosé–Hoover equations of motion were utilized and solved numerically by the time-reversible algorithms presented in the preceding section. Throughout the NVT and NPT MD simulations, the temperature was kept constant by using different chains thermostats for each particle. The translational and rotational degrees of freedom are coupled
FIG. 1. 共a兲 The deviation of the energy from its mean value for the system of N = 500 Gay–Berne particles plotted vs MD steps using Fincham 共Ref. 27兲 共for a time step of ⌬t* = 0.0005兲 and 共b兲 time reversible and sympletic and time-reversible algorithms 共for a time step of ⌬t* = 0.001兲.
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-22
J. Chem. Phys. 122, 224114 共2005兲
Kamberaj, Low, and Neal
TABLE III. The percentage relative drift D and the standard energy error E * of the total extended energy as a function of the thermostating T,t共r兲 rates in constant NVT ensemble and the number of the inner steps nc ⫻ nys used in the integration of the chain thermostats variables as proposed by Martyna et al. 共Ref. 18兲. The values of the temperature T* are also reported together with their standard deviations. The time step was fixed to ⌬t* = 0.001. Parameters
E 共%兲
D 共%兲
具T*典
nc ⫻ nys
* T,t共r兲 = 0.5 * T,t共r兲 = 1.8 * T,t共r兲 =5 * T,t共r兲 = 10
0.005 0.033 0.032 0.132 0.072 0.039
0.010 0.018 0.030 0.071 0.037 0.014
2.0± 0.050 2.0± 0.036 2.0± 0.016 2.0± 0.010 2.0± 0.012 2.0± 0.012
1⫻1 1⫻1 1⫻1 1⫻1 3⫻7 10⫻ 1
of changing the volume of the simulation cell and the full cell fluctuation procedure. The latter procedure allows variation of the simulation cell shape. A thermostating rate for the * * translational and rotational motion of T,t = 2 and T,r = 2 共in reduced units兲, respectively, and a reduced barostating rate in the NPT ensemble of *p = 5 was chosen. In the full cell fluctuation method, simulations in the nematic phases were performed with *p = 2 in order to avoid large fluctuations of box shape due to absence of the elastic restoring forces. For the system of 500 GB rodlike molecules we found that the val* * ues presented above for T,r , T,t , and *p produce more stable dynamics as will be shown in next section. The time step used for numerical solution of the equations of motion was ⌬t* = 0.001, an improvement from previous values of 0.000 15.45 The simulation run nrun at each new generated state point was about 共1 – 2兲 ⫻ 106 time steps, where the equilibration periods were at least 5 ⫻ 105 time steps followed by 5 ⫻ 105 additional time steps to calculate the averages of the interesting quantities. Close to a phase transition the equilibration period was two to four times longer. Two equation of states are investigated at a reduced temperature of T* = 2.0. The configuration at P* = 2.0 was used as a starting point45 which corresponds to isotropic fluid state as expected from previous work.40 Then the pressure was increased slowly in steps of 0.5–1 at T* = 2.0 as described in Ref. 40. Close to the nematic-smectic phase transition the step was smaller.
FIG. 2. 共a兲 The trajectory of the energy of the system of N = 500 Gay–Berne particles using the time-reversible integrator for the rotation motion in the NVT ensemble and 共b兲 NPT ensemble 共isotropic cell fluctuation method兲 using a time step of ⌬t = 0.001.
unstable the simulation becomes. The stability of the numerical integrator is measured from the standard error of the energy defined as11
冑兺 K
1. Performance of the algorithm
First the performance of the algorithms introduced in the preceding section was tested. We start simulations at a preequilibrated state at the temperature T* = 2.0, and in the NPT ensemble MD simulation the target pressure was P* = 6.0 for the isotropic cell fluctuations method, which corresponds to nematic phase, and P* = 10.0 for shape-varying cell fluctuations method in smectic B phase. In order to measure the instability, we use the percent relative drift of the total energy D as a measure of it, which is determined as46 D = 100dL/具Ek典, where d is the slope of the linear curve fit of the blockaveraged total energy, L is the simulation length, and 具Ek典 is the average kinetic energy throughout the simulation. For a fixed simulation length L the bigger the value of D, the more
E =
共Ei − 具E典兲2/K,
i=1
where K is the number of data points of the block-averaged total energy, Ei is the block-averaged total energy, and 具E典 is TABLE IV. The percentage relative drift D and the standard energy error E * of the total extended energy vs the thermostating T,t共r兲 and barostating *p rates in the NPT ensemble 共isotropic cell fluctuations兲. The values of the pressure P* and temperature T* are also reported together with their standard deviations. The time step was fixed to ⌬t* = 0.001. Parameters * *p = 2, T,t共r兲 = 1.85 * * p = 5, T,t共r兲 = 1.85 * *p = 10, T,t共r兲 = 1.85 * *p = 20, T,t共r兲 = 1.85
D 共%兲
E 共%兲
具P*典
具T*典
0.013 0.018 0.030 0.115
0.028 0.039 0.062 0.240
6.0± 0.012 6.0± 0.005 6.0± 0.003 6.0± 0.001
2.0± 0.033 2.0± 0.031 2.0± 0.014 2.0± 0.033
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-23
J. Chem. Phys. 122, 224114 共2005兲
Molecular dynamics simulation of rigid molecules
TABLE V. The percentage relative drift D and the standard energy error E of the total extended energy vs the * thermostating T,t共r兲 and barostating *p rates in the NPT ensemble 共shape-varying cell fluctuations兲. The pressure * tensor P , pressure P*, and temperature T* are also reported together with their standard deviations. The time step was fixed to ⌬t* = 0.001. D共%兲
E共%兲
具P*典
*p = 0.5, * T,t共r兲 = 1.85
0.02
0.58
10.0± 0.43
*p = 1, * T,t共r兲 = 1.85
0.03
1.56
10.0± 0.43
*p = 5, * T,t共r兲 = 1.85
0.15
0.76
10.0± 0.37
*p = 10, * T,t共r兲 = 1.85
0.18
0.21
10.0± 0.09
*p = 20, * T,t共r兲 = 1.85
0.35
0.12
10.0± 0.05
*p = 25, * T,t共r兲 = 1.85
1.50
0.71
10.0± 0.09
Parameters
the simulation averaged total energy. The drift D and the standard deviation E of the total energy are reported in Table II as a function of the time step ⌬t* in the NVE , NVT, and NPT 共isotropic cell fluctuation case兲 ensembles. We compare two algorithms for rotation motion, the time-reversible algorithm of Matubayasi and Nakahara16 and the symplectic and time reversible algorithm of Miller et al.17 as discussed in the preceding section, which has been found to provide numerical integrators with excellent stability in terms of the energy conservation. For sake of comparison we have also performed the simulations in the NVE ensemble using Fincham.27 In the NVT and NPT ensemble we have applied the extended version of both the Miller et al.17 and Matubayasi and Nakahara16 algorithms for the case of the non-Hamiltonian systems discussed in the preceding section. It can be seen that for the time step ⌬t* 艌 0.001, the Fincham algorithm has a very poor performance as the value of the drift D and energy error E increase rapidly. This is also illustrated graphically in Fig. 1 by plotting the deviation of the energy, E共t兲 − 具E典, each times step, where E共t兲 are the block-averaged values and 具E典 is the mean value of the energy. For ⌬t* ⬎ 0.001 the MD simulation with Fincham algorithm fails. In contrast, the symplectic and time-reversible algorithm of Miller et al.17 and the time-reversible algorithm of Matubayasi and Nakahara16 show both a very stable performance even for large time steps for NVE ensemble. Our results show that the Miller et al. algorithm yields less drift compared to the Matubayasi and Nakahara algorithm, however, the latter one provides a slightly smaller energy error. This study indicates that both time-reversible and symplectic algorithms show very good energy conservation and thus
具P*典
共 共 共 共
共
10.0 0.0031 0.0006 0.0039 10.0 0.0118 0.0012 0.0117 10.0
具T*典
兲
10.0 −0.0064 0.0065 −0.0061 10.0 0.0074 0.0070 0.0069 10.0 10.0 −0.0019 −0.0006 0.0005 10.0 0.0013 0.0011 0.0008 10.0
共
10.0 0.0006 0.0004 0.0004 10.0 0.0009 0.0006 0.0007 10.0
兲
10.0 0.0003 −0.0003 0.0003 10.0 0.0002 0.0007 −0.0004 10.0 10.0 −0.0012 −0.0013 0.0019 10.0 0.0004 0.0012 −0.0002 10.0
2.0± 0.085
兲 兲
2.0± 0.076
2.0± 0.081
2.0± 0.077
兲 兲
2.0± 0.080
2.0± 0.082
long-time stable numerical integrators in the NVE ensemble. In the case of the NVT and NPT ensembles the results are presented for the Miller et al. algorithm for rotation motion extended for the case of the non-Hamiltonian systems using * *p = 5 and T,t共r兲 = 1.85. Results, reported in Table III, show that the standard deviation and drift of the extended total energy are small up to the time step of ⌬t* = 0.002. In the case of the extended dynamics systems it is important to show that extended total energy is conserved for a long run. In Figs. 2共a兲 and 2共b兲 we have plotted the deviation, E共t兲 − 具E典, of the physical total energy 共kinetic + potential energy兲 of the system, thermostat and/or barostat energy and the total extended energy of the system for the NVT and NPT ensembles 共isotropic cell fluctuation method兲 using a time step of ⌬t* = 0.001. Our results show that the fluctuations of the physical total energy and of the thermostat and/or barostat energy cancel each other in both the NVT and NPT ensemble simulations as we expect in order to conserve the total extended energy of the system. The ability of the method to regulate the pressure de* and barostatpends on the values of the thermostating T,t共r兲 * ing p rates. These are adjustable parameters and their values will depend on the system under investigation. In Table III we have presented the values of the temperature along the standard deviation and the drift of the energy for different * obtained from MD simulations in the values of the T,t共r兲 NVT ensemble at T* = 2.0. The simulations were performed with a time step of ⌬t* = 0.001. Results of this study indicate * the ability to reach that with increasing the values of T,t共r兲 the target temperature is higher for both methods. However,
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-24
Kamberaj, Low, and Neal
J. Chem. Phys. 122, 224114 共2005兲
FIG. 3. The trajectories 共a兲 of the simulation box sides, 共b兲 of the simulation box angles, 共c兲 of the diagonal components of the pressure tensor, and 共d兲 of the temperature of the system of N = 500 Gay–Berne particles using the time-reversible integrator for the rotation motion of Miller et al. 共Ref. 17兲 in the NPT ensemble using the variable box shape method with a time step of ⌬t = 0.001. * larger values of T,t共r兲 yield a decrease of the stability of the methods which measured here in terms of the drift D and standard deviation of the energy E. In this case of high * we have found that applying a values of the parameter T,t共r兲 multiple step integrator as proposed by Martyna et al.,18 the efficiency of the integrator will improve. For example, for * = 10, the numerical integration with nc the value of T,t共r兲 ⫻ nys = 3 ⫻ 7 and nc ⫻ nys = 10⫻ 1 number of inner steps decreases the standard deviation with about 45% and 70%, respectively, compared to the single step integrator 共nc ⫻ nys = 1 ⫻ 1兲. Next, we have studied the efficiency of the integrators as a function of the parameter *p at a fixed value of * T,t共r兲 = 1.85 as indicated by the above investigation in the NVT ensemble. In Tables IV and V we have reported the values of the pressure and the temperature together with their standard deviations for different sets of *p obtained from MD simulations in the NPT ensemble using an isotropic cell fluctuation at T* = 2.0 and P* = 6.0 and using shape-varying cell fluctuations at T* = 2.0 and P* = 10.0. The stability of the method is also examined by calculating the drift D and the standard deviation of the extended total energy 共conserved quantity兲 for the same time step of ⌬t* = 0.001. Similar to the NVT ensemble, our data presented here indicate that with
increasing ability of the method to reach the target pressure increases with increasing *p for both methods, but the stability of the numerical integration scheme decreases as predicted by the values of the drift D and standard deviation of the energy E. It has to be noted that according to our investigation when the initial pressure and/or temperature of the system are far from their target values, large values of the *p * and T,t共r兲 lead to an instability of the algorithm. In the NPT ensemble simulations allowing the simulation box to change its shape, it is important to keep the box elongated within limits, particularly in the nematic phase simulations, because we have noted that in this case the algorithms become numerically unstable. For the system under investigation we * found that the values of the parameters 共*p , T,t共r兲 兲 presented in Table V provide stable dynamics. In Figs. 3共a兲 and 3共b兲 we have presented graphically the time evolution of the box sizes 共h1 , h2 , h3兲 and the angles 共␣ ,  , ␥兲, respectively, in the NPT simulations method where the box changes its * = 1.85. It can shape and size for the case of *p = 5 and T,t共r兲 be seen that the shape of the simulation box does not change significantly from the cubical one and thus indicating that the dynamics of the system are stable. On the other hand, small changes from the cubical shape, as will be discussed in the next chapter, may create an
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-25
Molecular dynamics simulation of rigid molecules
FIG. 4. 共a兲 Density and 共b兲 order parameter as a function of the pressure at fixed temperature of T* = 2.0 in the NPT molecular dynamics and NPT Monte Carlo 共Ref. 40兲 simulation results for 500 and 256 rodlike GB particles, respectively.
alignment of the layers in the smectic phase parallel to one side of the simulation box. This has also been reported very recently in the literature.32 In the NPT simulations with shape-varying box it is important that the diagonal components of the pressure tensor be equal in average and to fluctuate about the target pressure. Indeed, as shown in Table V and illustrated graphically in Fig. 3共c兲, the diagonal elements of the pressure tensor are in average equal and tend to the required pressure of 10.0, whereas the off-diagonal elements fluctuate about zero. 2. NPT ensemble simulations: Fixed aspect ratio method
The variations of density with pressure as obtained from MD simulations in the NPT ensemble using a cubic box with a fixed aspect ratio method at the reduced temperature of T* = 2.0 is shown in Fig. 4共a兲. The corresponding MD pressures and densities, together with orientational order parameters are reported in Table VI. In addition to these, we have also presented the results of the MC simulations in the NPT ensemble taken from Ref. 40. It can be seen that our results
J. Chem. Phys. 122, 224114 共2005兲
in NPT MD simulations agree very well with those in NPT MC simulations. In the following section we confirm that the same phases were identified as in Ref. 40. We have started the NPT MD simulations from the pressure P* = 2.0 from a previous equilibrated ensemble. As expected this corresponds to isotropic fluid state as it was identified in Ref. 40. The results show that with increasing pressure a phase transition occurs as indicated by a discontinuity in the density and a considerable increase in orientational order to 具P2典 = 0.713± 0.028 shown in Figs. 4共a兲 and 4共b兲, respectively, at P* = 4.0. This appears for P* 艌 3.5 and the ordered phase is nematic, as confirmed by liquidlike behavior of the radial pair distribution function g共r*兲 and its components parallel * 兲 to the director as illustrated g储共r*储 兲 and perpendicular g⬜共r⬜ * in Figs. 5共a兲–5共d兲 at P = 4.0 with a corresponding average orientational order parameter of 具P2典 = 0.713± 0.028 which is significantly nonzero. The nematic phase persists for all P* 艋 7.5 in agreement with results published elsewhere.40 At higher pressures, the system undergoes another transition to a smectic phase. Pair correlation functions reveal that this corresponds to nematic-smectic B phase transition. This is illustrated in Figs. 5共a兲–5共c兲 at P* = 8.0 very close to this transition. Examination of the pair distribution functions reveal a change in the layer structure of the system. The amplitude of the peaks of g储共r*储 兲 is high, indicating that the layers are clearly defined. A split of the second peak in g共r*兲 indicates a smectic B phase. Figure 5共d兲 shows the in-plane * 兲 indicating a bond orientational correlation function g6共r⬜ strong long range in-plane bond order orientation correlation. The smectic B phase persisted for all pressures studied greater than P* = 8.0 where the first discontinuity was observed in the order parameter which rises from 0.8814± 0.008 at P* = 7.5 to 0.9467± 0.004 at P* = 8.0. Is is worth noting that the same phase behavior, as described above, is observed from Monte Carlo simulation in the NPT ensemble as published in literature.40 3. NPT MD simulation: Shape-varying cell method
The NPT MD simulations with fixed aspect ratio were followed by NPT MD simulations in which the box shape was allowed to vary. The time step ⌬t* was again 0.001. Box shape is an important factor when simulating smectic phases in order to check the effect of the boundary conditions in smectic phase packing. We are investigating whether the fixed box had any importance on the formation of the smectic phases as well as the stability of the alignment in the ordered phases. The starting configuration for NPT runs with shape-varying cell was the nematic configuration of the output of NPT simulations with cubical box at P* = 7.0. The results of the NPT MD simulations are presented in Table VII. It is inappropriate to apply the method to the isotropic phase since the box becomes quite elongated in a random direction in the absence of elastic restoring forces. The first result presented is at P* = 7.0 which correspond to the nematic phases similar to the isotropic cell fluctuations method. In the nematic phase a preferred direction for the system already existed. On increasing the pressure a smectic phase was formed. Good agreement was found with the case
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-26
J. Chem. Phys. 122, 224114 共2005兲
Kamberaj, Low, and Neal
TABLE VI. MD simulation in the NPT ensemble using fixed aspect ratio simulation method at the temperature T* = 2.0. Results of the MC NPT simulations are also presented as reported in Ref. 40.
a
P*
具 *典
具 *典 a
具Q200典
具Q200典a
Phase
2.0 3.0 4.0 5.0 6.0 7.0 7.5 8.0 8.5 9.0 9.5 10.0 10.4 10.9 11.3 11.8 12.2 12.7 13.2 13.7
0.1641± 0.0018 0.1871± 0.0010 0.2145± 0.0010 0.2302± 0.0010 0.2417± 0.0010 0.2514± 0.0010 0.2556± 0.0009 0.2708± 0.0006 0.2735± 0.0006 0.2763± 0.0007 0.2777± 0.0008 0.2807± 0.0007 0.2820± 0.0006 0.2841± 0.0007 0.2859± 0.0006 0.2883± 0.0006 0.2898± 0.0006 0.2916± 0.0006 0.2935± 0.0006 0.2954± 0.0007
0.1638 0.1864 0.2125 0.2292 0.2410 0.2511
0.0778± 0.034 0.1298± 0.051 0.7130± 0.028 0.8048± 0.015 0.8435± 0.013 0.8728± 0.009 0.8814± 0.008 0.9467± 0.004 0.9495± 0.004 0.9506± 0.003 0.9502± 0.004 0.9537± 0.003 0.9540± 0.003 0.9545± 0.003 0.9560± 0.003 0.9560± 0.003 0.9607± 0.003 0.9615± 0.003 0.9617± 0.003 0.9629± 0.002
0.0700 0.1170 0.6870 0.7950 0.8447 0.8730
Isotropic Isotropic Nematic Nematic Nematic Nematic Nematic Smectic B Smectic B Smectic B Smectic B Smectic B Smectic B Smectic B Smectic B Smectic B Smectic B Smectic B Smectic B Smectic B
0.2682 0.2710 0.2745 0.2771 0.2795 0.2819 0.2840 0.2862 0.2899 0.2912 0.2928 0.2944
0.9460 0.9463 0.9507 0.9540 0.9540 0.9566 0.9571 0.9590 0.9615 0.9598 0.9598 0.9578
MC NPT simulations 共Ref. 40兲.
of NPT MD simulations shown in Table VII with the simulations undertaken with fixed aspect ratio and so with standard literature results.40 In the following we will discuss the situation close to nematic-smectic and smectic A-smectic B transitions. We observed a smectic B ordered phase at P* = 7.5 with average order parameter of 具P2典 = 0.9497± 0.004. This compares with a nematic phase at this temperature and pressure for the fixed aspect ratio case. The presence of the smectic B phase is also indicated at this pressure from the investigation of the pair distribution functions as shown in Figs. 6共a兲–6共c兲. A clear split in the second peak at P* = 7.5 is indicated by the radial pair distribution function g共r*兲. High amplitude oscillation of the parallel g储共r*储 兲 reveals a welldefined layer structure. On the other hand, high peaks of the * 兲 pair distribution function show a long transverse g⬜共r⬜ range ordering in-layer. The smectic B phase persisted with increasing the pressure further, again similar to the fixed aspect ration MD simulations. The layers are more clearly defined and the order slightly higher at any given pressure and temperature in the smectic phase in the shape-varying method than in the fixed aspect ratio method. Figure 7 shows instantaneous snapshots corresponding to the NPT MD simulations using the fixed aspect ratio and shape varying methods for the nematic 共P* = 7.0兲 and smectic 共P* = 7.5兲 phases at the reduced temperature of T* = 2.0. It can be seen that the molecules align along the diagonal of the simulation box in the case of the fixed aspect ratio method, whereas in the case of the shape varying method they tend to align parallel to one of the sides of the simulation box. The molecules align, in the fixed aspect ratio NPT simulations, along the longest distance such as the box diagonal in order to minimize the elastic energy and the strain to fit the simulation box. In more complex phase diagrams, particularly where
there are tilted phases the second method, which allows the box to change the size and angles, may produce a different phase diagram. We are investigating this in a current study of a smectic C phase. V. CONCLUSIONS
In this paper we presented the new numerical integrators for the rigid body molecular dynamics simulations of the type commonly used in chemical and physical applications. Our main aim was to define an isothermal-isobaric molecular dynamics formalism of an ensemble of such molecules using quaternion. The Nosé–Hoover, Anderson, and Parrinello– Rahman methods were found to be well suited to address, in a simple effective way, this problem. The scheme is applied to more than one thermostat, and furthermore, the rotation and translation degrees of freedom are coupled to different thermostats. The Liouville formalism and a generalized form of the symmetric Trotter factorization formula are used to build the symplectic and time-reversible integrators. In these algorithms, the rotation motion is treated using the Trotter factorization scheme where the torque and the free rotation terms are considered separately. The numerical integrators presented here are time reversible and/or symplectic and possess better long-stability properties such as energy conservation than the standard methods. The numerical integrators have been successfully applied to Gay–Berne particles and the results are in very good agreement with standard results reported in literature. In the case of the NPT ensemble MD simulations with varying the shape volume, an effect of the boundary condition on the smectic phase is observed. The same sequence of nematic, smectic A and B phase transitions were observed for any
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-27
J. Chem. Phys. 122, 224114 共2005兲
Molecular dynamics simulation of rigid molecules
* FIG. 5. 共a兲 Radial pair distribution function g共r*兲, 共b兲 parallel pair distribution function g储共r*储 兲, 共c兲 transverse pair distribution function g⬜共r⬜ 兲, and 共d兲 in-plane * * bond orientational correlation function g6共r⬜兲 as determined by MD simulations in the NPT ensemble at reduced temperature of T = 2.0 using the fixed aspect ratio method.
given temperature and pressure. However, the smectic phases were of higher order and with more clearly defined layering. For example, at T* = 2.0 in the case of the NPT ensemble simulations with fixed-shape volume a nematic phase was TABLE VII. MD simulation in the NPT ensemble using shape-varying cell simulation method at the temperature T* = 2.0. P*
具 *典
具Q200典
Phase
7.0 7.5 8.0 8.5 9.0 9.5 10.0 10.4 10.9 11.3 11.7 12.2 12.7 13.2 13.5 13.7
0.2515± 0.001 0.2670± 0.002 0.2704± 0.002 0.2737± 0.001 0.2769± 0.001 0.2805± 0.001 0.2823± 0.001 0.2844± 0.001 0.2867± 0.001 0.2833± 0.001 0.2900± 0.001 0.2923± 0.001 0.2943± 0.001 0.2959± 0.001 0.2969± 0.001 0.2978± 0.001
0.8815± 0.005 0.9497± 0.004 0.9538± 0.004 0.9575± 0.003 0.9601± 0.003 0.9651± 0.002 0.9644± 0.002 0.9665± 0.003 0.9677± 0.003 0.9684± 0.005 0.9691± 0.004 0.9714± 0.002 0.9724± 0.002 0.9735± 0.002 0.9741± 0.002 0.9737± 0.003
Nematic Smectic B Smectic B Smectic B Smectic B Smectic B Smectic B Smectic B Smectic B Smectic B Smectic B Smectic B Smectic B Smectic B Smectic B Smectic B
obtained at P* = 7.5 and in the case of the NPT ensemble with varying-shape volume a smectic B phase was obtained at the same pressure but with a higher order parameter. It is worth noting that the effect of the boundary conditions in the case of the NPT ensemble simulations with varying-shape volume may also depend on the system size in simulations, particularly of tilted or chiral systems. ACKNOWLEDGMENTS
H.K. would like to acknowledge Manchester Metropolitan University for funding a project studentship and EPSRC for support. APPENDIX A: THE ANISOTROPIC GAY–BERNE POTENTIAL
In this study the basic model is the Gay–Berne 共GB兲 potential that represents the molecules as uniaxial34,40–43 ellipsoids. The GB potential is considered as a generalized anisotropic and shifted form of the Lennard-Jones interaction used for simple fluids,11 with an attractive and repulsive contribution that decreases as 6 and 12 inverse powers of the intermolecular distance. In the uniaxial GB model34 the LJ strength and diameter parameters depend on the orientation and separation of the two particles according to
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-28
J. Chem. Phys. 122, 224114 共2005兲
Kamberaj, Low, and Neal
* FIG. 6. 共a兲 Radial pair distribution function g共r*兲, 共b兲 parallel pair distribution function g储共r*储 兲, and 共c兲 transverse pair distribution function g⬜共r⬜ 兲 as determined by MD simulations in the NPT ensemble at reduced temperature of T* = 2.0 and P* = 7.5 and 8.0 using the shape-varying cell method.
Uij = 4⑀共uˆ i,uˆ j,rˆ ij兲 +
冋
再冋
0 rij − 共uˆ i,uˆ j,rˆ ij兲 + 0
0 rij − 共uˆ i,uˆ j,rˆ ij兲 + 0
册冎
册
12
=
6
共A1兲
,
where uˆ i and uˆ j are the unit vectors along the Gay–Berne molecular axes, is the orientation dependent distance of separation at which attractive and repulsive energies cancel, and ⑀共uˆ i , uˆ j , rˆ ij兲 = ⑀0关⑀1共uˆ i , uˆ j兲兴关⑀2共uˆ i , uˆ j , rˆ ij兲兴 is the strength anisotropy function. Here, the power and are adjustable exponents and ⑀0 is a constant. The ⑀1 is given by
共 e/ s兲 2 − 1 2 − 1 = , 共 e/ s兲 2 + 1 2 + 1
and reflect the shape anisotropy where 1 / = s / e is the ratio of separations when the U = 0 for the molecules in the end-to-end and side-to-side configurations, and the anisotropy in the attractive forces where ⬘ = ⑀s / ⑀e is the ratio of the end-to-end to side-to-side well depth, respectively. The information about the shape of the molecules is given by the orientation-dependent range parameter
再 冋
⑀1共uˆ i,uˆ j兲 = 关1 − 2共uˆ i · uˆ j兲2兴−1/2
共uˆ i,uˆ j,rˆ ij兲 = 0 1 −
and the second term by
⑀2共uˆ i,uˆ j,rˆ ij兲 = 1 − +
冋
⬘ 共rˆ ij · uˆ i + rˆ ij · uˆ j兲 2 1 + ⬘uˆ i · uˆ j
册
共rˆ ij · uˆ i − rˆ ij · uˆ j兲2 . 1 − ⬘uˆ i · uˆ j
The parameters and ⬘ are given by
+
2
共A2兲
共A3兲
1 − 共⑀e/⑀s兲1/ 1 − ⬘ ⬘ = = , 1 + 共⑀e/⑀s兲1/ 1 + ⬘
共rˆ ij · uˆ i + rˆ ij · uˆ j兲2 2 1 + uˆ i · uˆ j
共rˆ ij · uˆ i − rˆ ij · uˆ j兲2 1 − uˆ i · uˆ j
册冎
−1/2
.
共A4兲
In simulation studies of Gay–Berne mesogen it is convenient to employ scaled and dimensionless variables for all quantities. The parameters 0 and ⑀0 are normally set equal to unity and the results are reported in terms of reduced units, as reported in Ref. 11. It is apparent that the Gay–Berne poten-
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-29
J. Chem. Phys. 122, 224114 共2005兲
Molecular dynamics simulation of rigid molecules
FIG. 7. 共a兲 and 共b兲 Snapshots for the nematic 共P* = 7.0兲 and smectic 共P* = 7.5兲 phases using the fixed aspect ratio method, and 共c兲 and 共d兲 the snapshots for the nematic 共P* = 7.0兲 and smectic 共P* = 7.5兲 phases using the variable shape box method in the NPT MD simulations at T* = 2.0.
tial, which models a molecule as a uniaxial ellipsoid, contains four parameters: e / s, e / s, , and . The exponents and were originally34 set to the values = 2 and = 1, but several other possibilities have been investigated since.
V g共r兲 = 2 N
APPENDIX B: ORDER PARAMETERS AND CORRELATION FUNCTIONS
The long-ranged orientational order is characterized by the second-rank-order parameter 具P2典, 具P2典 =
冓
冔
N
1 P2共uˆ i · n兲 , N i=1
兺
共B1兲
where N is the number of molecules, n is the director, and P2 is the second Legendre polynomial; 具¯典 denotes a simulation average. This is calculated in a simulation from diagonalization of the second-order tensor Q, Q␣ =
冓
N
冋
1 1 3 uˆi␣uˆi − ␦␣ 2 N i=1 2
兺
册冔
,
nematic and smectic phases it is significantly nonzero, and it approaches unity for perfect ordering. The radial distribution function is defined as
共B2兲
with ␣ ,  = x , y , z, and ␦␣ the Kronecker delta. The orientational order parameter 具P2典 is the largest positive eigenvalue and the corresponding eigenvector is n.47 In the isotropic phase, 具P2典 ⬃ 1 / 冑N, due to orientational fluctuations, in the
冬
N
兺 ␦共r − rij兲
i,j=1 i⫽j
冭
共B3兲
,
where ␦共¯兲 is the Dirac delta function, normalized such that 具␦共r兲典 = V−1, where V is the volume of the simulation cell. This function examines the structure of the phase by finding the probability of finding a pair of particles at a distance r. At short distances g共r兲 → 0, due to molecular excluded volume, and at long distances g共r兲 → 1 as positions become uncorrelated; at intermediate distances, oscillations in g共r兲 reflect correlations between neighboring molecules. In order to characterize the liquid crystalline phases, it is convenient to resolve g共r兲 into two functions g储共r储兲, g储共r储兲 =
V N2
冬
N
兺 ␦关共r − rij兲 · n兴
i,j=1 i⫽j
冭
,
共B4兲
dependent upon r储 = r · n, the pair separation parallel to the director n, and g⬜共r⬜兲,
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp
224114-30
J. Chem. Phys. 122, 224114 共2005兲
Kamberaj, Low, and Neal
V g⬜共r⬜兲 = 2 N
冬
N
兺 ␦关共r − rij兲 ⫻ n兴
i,j=1 i⫽j
冭
,
共B5兲
dependent upon r⬜ = 冑r2 − r2储 , the transverse separation. A nematic phase is characterized by nonzero orientational order parameter 具P2典, a uniform g储共r储兲, and short-ranged functions g共r兲 and g⬜共r⬜兲. In a SmA phase, g储共r储兲 shows long-ranged oscillations with period equal to the layer spacing, while g⬜共r⬜兲 has short-ranged structure. In a SmB phase, it shows long-ranged peaks. With formation of layers in smectic phases, a one-dimensional density wave arises along the layer normal. Note that in the case here the normal to the layer coincide with director n and in the case that the normal to the layer of smectic phases is not parallel to n another technique should be adopted to calculate g储共r储兲 and g⬜共r⬜兲.48 In analysis of a smectic layer we calculated the correlation function g6共r⬜兲 which allows us to distinguish between smectic phases such as the SmA and SmB.49 The bond correlation function g6共r⬜兲 is given by g6共r⬜兲 = 具6共ri兲6共ri兲典,
共B6兲
where 6共r⬜兲 is the local bond orientational order of particle i and ri is the positional vector. In general the local bond orientational order is a summation over the nearest neighboring particles k, typically k = 6, of the reference particle i such as
6共ri兲 = 兺 w共rik兲e6iik k
冒兺
w共rik兲,
k
where ik is the angle between the projection of the vector rik = ri − rk onto the plane normal to the director and a fixed reference axis. The selection of the six nearest neighbors is done with help of the cutoff function w共rik兲 as suggested in literature.49 The values of g6共r⬜兲 approaches to unity when the orientation of the nearest neighbors of particle i and k show the same characteristics. In case of the isotropic phases the bond orientations are uncorrelated and g6共r⬜兲 levels to zero. S. Nosé and M. L. Klein, Mol. Phys. 50, 1055 共1983兲. H. Andersen, J. Comput. Phys. 52, 24 共1983兲. M. Parrinello and A. Rahman, J. Appl. Phys. 52, 7182 共1981兲. 4 S. Nosé, J. Chem. Phys. 81, 511 共1984兲. 5 W. Hoover, Phys. Rev. A 31, 1695 共1985兲. 6 M. Tuckerman, B. Berne, and G. Martyna, J. Chem. Phys. 97, 1990 共1992兲. 7 S. Melchionna, C. Giovanni, and L. Brad, Mol. Phys. 78, 533 共1993兲. 8 G. Martyna, D. Tobias, and M. Klein, J. Chem. Phys. 101, 4177 共1994兲. 1 2 3
R. Winkler, V. Kraus, and P. Reineker, J. Chem. Phys. 102, 9018 共1995兲. Y. Liu and M. Tuckerman, J. Chem. Phys. 112, 1685 共2000兲. 11 M. Allen and D. Tildesley, Computer Simulation of Liquids 共Oxford University Press, Oxford, 1987兲. 12 H. Goldstein, Classical Mechanics, 2nd ed. 共Addison-Wesley, Reading, MA, 1980兲. 13 J. Ryckaert, G. Ciccotti, and H. Berendsen, J. Comput. Phys. 23, 327 共1977兲. 14 D. Evans, Mol. Phys. 34, 317 共1977兲. 15 D. Evans and S. Murad, Mol. Phys. 34, 327 共1977兲. 16 N. Matubayasi and M. Nakahara, J. Chem. Phys. 110, 3291 共1999兲. 17 T. Miller, M. Eleftheriou, P. Pattnaik, A. Ndirango, D. Newns, and G. Martyna, J. Chem. Phys. 116, 8649 共2003兲. 18 G. Martyna, M. Tuckerman, D. Tobias, and M. Klein, Mol. Phys. 87, 1117 共1996兲. 19 A. Dullweber, B. Leimkuhler, and R. McLachlan, J. Chem. Phys. 107, 5840 共1997兲. 20 S. Bond, B. Leimkuhler, and B. Laird, J. Comput. Phys. 151, 114 共1999兲. 21 M. Tuckerman and G. Martyna, J. Phys. Chem. B 104, 159 共2000兲. 22 M. Tuckerman, D. Yarne, S. Samuelson, A. Highes, and G. Martyna, Comput. Phys. Commun. 128, 333 共2000兲. 23 A. Bulgac and M. Adamuti-Trache, J. Chem. Phys. 105, 1131 共1996兲. 24 V. Arnold, Mathematical Methods of Classical Mechanics 共Springer, Berlin, 1978兲. 25 M. Tuckerman, C. Mundy, and G. Martyna, Europhys. Lett. 45, 149 共1999兲. 26 M. Tuckerman, Y. Liu, G. Ciccotti, and G. Martyna, J. Chem. Phys. 115, 1678 共2001兲. 27 D. Fincham, CCP5 Information Quarterley 2, 6 共1981兲. 28 H. Kamberaj, R. J. Low, and M. P. Neal, Syst. Sci.. 29, 31 共2003兲. 29 H. Trotter, Proc. Am. Math. Soc. 10, 545 共1959兲. 30 H. D. Raedt and B. D. Raedt, Phys. Rev. A 28, 3575 共1983兲. 31 G. Strang, SIAM 共Soc. Ind. Appl. Math.兲 J. Numer. Anal. 5, 506 共1968兲. 32 H. Dominguez, E. Velasco, and J. Alejandre, Mol. Phys. 100, 2739 共2002兲. 33 K. Aoki, M. Yoneya, and H. Yokoyama, J. Chem. Phys. 118, 9926 共2003兲. 34 J. Gay and B. Berne, J. Chem. Phys. 74, 3316 共1981兲. 35 M. Parrinello and A. Rahman, Phys. Rev. Lett. 45, 1196 共1980兲. 36 H. Andersen, J. Chem. Phys. 72, 2384 共1980兲. 37 H. Yoshida, Phys. Lett. A 150, 262 共1990兲. 38 M. Suzuki, J. Math. Phys. 32, 400 共1991兲. 39 J. Marsden and T. Ratiu, Introduction to Mechanics and Symmetry 共Springer, Berlin, 1994兲. 40 J. Brown and M. Allen, Phys. Rev. E 57, 6685 共1997兲. 41 E. D. Miguel, L. Rull, M. Chalam, and K. Gubbins, Mol. Phys. 74, 504 共1991兲. 42 G. Luckhurst, R. Stephens, and R. Phippen, Liq. Cryst. 8, 451 共1990兲. 43 R. Berardi, A. Emerson, and C. Zannoni, J. Chem. Soc., Faraday Trans. 89, 4069 共1993兲. 44 H. Kamberaj, Ph.D. thesis, Manchester Metropolitan University, Faculty of Science and Engineering, Department of Computing and Mathematics, 2005. 45 M. Solymosi, Ph.D. thesis, MIS, Coventry University, 2002. 46 J. Izaguirre, S. Reich, and R. Skeel, J. Chem. Phys. 110, 9853 共1999兲. 47 C. Zannoni, The Molecular Physics of Liquid Crystals, edited by G. R. Luckhurst and G. W. Gray 共Academic, New York, 1979兲. 48 I. Withers, C. Care, and D. Cleaver, J. Chem. Phys. 113, 5078 共2000兲. 49 K. Strandberg, Bond Orientational Order in Condensed Matter Systems, edited by K. J. Strandberg 共Springer, Berlin, 1992兲. 9
10
Downloaded 08 Mar 2006 to 129.128.157.245. Redistribution subject to AIP license or copyright, see http://jcp.aip.org/jcp/copyright.jsp