|
|
Next: Extended Systems for other
Up: Mechanics
Previous: Mechanics
Contents
Integrating the Equations of Motion: the
DLM method
The default method for integrating the equations of motion in OOPSE is a velocity-Verlet version of the symplectic splitting method
proposed by Dullweber, Leimkuhler and McLachlan
(DLM).[42] When there are no directional atoms or
rigid bodies present in the simulation, this integrator becomes the
standard velocity-Verlet integrator which is known to sample the
microcanonical (NVE) ensemble.[43]
Previous integration methods for orientational motion have problems
that are avoided in the DLM method. Direct propagation of the Euler
angles has a known
divergence in the equations of
motion for
and
,[12] leading to numerical
instabilities any time one of the directional atoms or rigid bodies
has an orientation near
or
. Quaternion-based
integration methods work well for propagating orientational motion;
however, energy conservation concerns arise when using the
microcanonical (NVE) ensemble. An earlier implementation of OOPSE utilized quaternions for propagation of rotational motion;
however, a detailed investigation showed that they resulted in a
steady drift in the total energy, something that has been observed by
Laird et al.[44]
The key difference in the integration method proposed by Dullweber
et al. is that the entire
rotation matrix is
propagated from one time step to the next. In the past, this would not
have been feasible, since the rotation matrix for a single body has
nine elements compared with the more memory-efficient methods (using
three Euler angles or 4 quaternions). Computer memory has become much
less costly in recent years, and this can be translated into
substantial benefits in energy conservation.
The basic equations of motion being integrated are derived from the
Hamiltonian for conservative systems containing rigid bodies,
 |
(4.1) |
where
and
are the cartesian position vector
and velocity of the center of mass of particle
, and
,
are the body-fixed angular
momentum and moment of inertia tensor respectively, and the
superscript
denotes the transpose of the vector.
is the
rotation matrix describing the instantaneous
orientation of the particle.
is the potential energy function
which may depend on both the positions
and
orientations
of all particles. The
equations of motion for the particle centers of mass are derived from
Hamilton's equations and are quite simple,
where
is the instantaneous force on the center of mass
of the particle,
 |
(4.4) |
The equations of motion for the orientational degrees of freedom are
In these equations of motion, the
skew
matrix of a vector
is defined:
skew |
(4.7) |
The
rot
notation refers to the mapping of the
rotation matrix to a vector of orientations by first computing the
skew-symmetric part
and
then associating this with a length 3 vector by inverting the
skew
function above:
rot skew |
(4.8) |
Written this way, the
rot
operation creates a set of
conjugate angle coordinates to the body-fixed angular momenta
represented by
. This equation of motion for angular momenta
is equivalent to the more familiar body-fixed forms,
which utilize the body-fixed torques,
. Torques are
most easily derived in the space-fixed frame,
 |
(4.12) |
where the torques are either derived from the forces on the
constituent atoms of the rigid body, or for directional atoms,
directly from derivatives of the potential energy,
 |
(4.13) |
Here
is a unit vector pointing along the principal axis
of the particle in the space-fixed frame.
The DLM method uses a Trotter factorization of the orientational
propagator. This has three effects:
- the integrator is area-preserving in phase space (i.e. it is
symplectic),
- the integrator is time-reversible, making it suitable for Hybrid
Monte Carlo applications, and
- the error for a single time step is of order
for timesteps of length
.
The integration of the equations of motion is carried out in a
velocity-Verlet style 2-part algorithm, where
:
moveA:
In this context, the
function is the reversible product
of the three body-fixed rotations,
 |
(4.14) |
where each rotational propagator,
, rotates
both the rotation matrix (
) and the body-fixed angular
momentum (
) by an angle
around body-fixed axis
,
 |
(4.15) |
is a quadratic approximation to
the single-axis rotation matrix. For example, in the small-angle
limit, the rotation matrix around the body-fixed x-axis can be
approximated as
 |
(4.16) |
All other rotations follow in a straightforward manner.
After the first part of the propagation, the forces and body-fixed
torques are calculated at the new positions and orientations
doForces:
OOPSE automatically updates
when the rotation matrix
is calculated in moveA. Once the forces and
torques have been obtained at the new time step, the velocities can be
advanced to the same time value.
moveB:
The matrix rotations used in the DLM method end up being more
costly computationally than the simpler arithmetic quaternion
propagation. With the same time step, a 1024-molecule water simulation
incurs an average 12% increase in computation time using the DLM method in place of quaternions. This cost is more than justified
when comparing the energy conservation achieved by the two
methods. Figure 4.1 provides a comparative analysis of the
DLM method versus the traditional quaternion scheme.
Figure 4.1:
Analysis of the energy conservation of the DLM and quaternion integration methods.
is the
linear drift in energy over time and
is the
standard deviation of energy fluctuations around this drift. All
simulations were of a 1024-molecule simulation of SSD water at 298 K
starting from the same initial configuration. Note that the DLM
method provides more than an order of magnitude improvement in both
the energy drift and the size of the energy fluctuations when compared
with the quaternion method at any given time step. At time steps
larger than 4 fs, the quaternion scheme resulted in rapidly rising
energies which eventually lead to simulation failure. Using the DLM method, time steps up to 8 fs can be taken before this behavior
is evident.
|
|
In Fig. 4.1,
E
is a measure of the linear
energy drift in units of
kcal mol
per particle over a
nanosecond of simulation time, and
E
is the standard
deviation of the energy fluctuations in units of
kcal
mol
per particle. In the top plot, it is apparent that the
energy drift is reduced by a significant amount (2 to 3 orders of
magnitude improvement at all tested time steps) by chosing the DLM method over the simple non-symplectic quaternion integration
method. In addition to this improvement in energy drift, the
fluctuations in the total energy are also dampened by 1 to 2 orders of
magnitude by utilizing the DLM method.
Although the DLM method is more computationally expensive than
the traditional quaternion scheme for propagating a single time step,
consideration of the computational cost for a long simulation with a
particular level of energy conservation is in order. A plot of energy
drift versus computational cost was generated
(Fig. 4.2). This figure provides an estimate of the CPU time
required under the two integration schemes for 1 nanosecond of
simulation time for the model 1024-molecule system. By chosing a
desired energy drift value it is possible to determine the CPU time
required for both methods. If a
E
of
kcal mol
per particle is desired, a nanosecond of
simulation time will require 19 hours of CPU time with the DLM
integrator, while the quaternion scheme will require 154 hours of CPU
time. This demonstrates the computational advantage of the integration
scheme utilized in OOPSE.
Figure 4.2:
Energy drift as a function of required simulation run time.
is the linear drift in energy over time.
Simulations were performed on a single 2.5 GHz Pentium 4
processor. Simulation time comparisons can be made by tracing
horizontally from one curve to the other. For example, a simulation
that takes 24 hours using the DLM method will take roughly 210
hours using the simple quaternion method if the same degree of energy
conservation is desired.
|
|
There is only one specific keyword relevant to the default integrator,
and that is the time step for integrating the equations of motion.
| variable |
Meta-data keyword |
units |
default value |
|
dt = 2.0; |
fs |
none |
Next: Extended Systems for other
Up: Mechanics
Previous: Mechanics
Contents
|