Rigid Bodies and Rotational Integration Algorithms¶
Description of Rigid Body Units¶
A rigid body unit is a collection of point entities whose local geometry is time invariant. One way to enforce this in a simulation is to impose a sufficient number of bond constraints between the atoms in the unit. However, in many cases this may be either problematic or impossible. Examples in which it is impossible to specify sufficient bond constraints are
linear molecules with more than 2 atoms (e.g. CO\(_2\))
planar molecules with more than three atoms (e.g. benzene).
Even when the structure can be defined by bond constraints the network of bonds produced may be problematic. Normally, they make the iterative SHAKE/RATTLE procedure slow, particularly if a ring of constraints is involved (as occurs when one defines water as a constrained triangle). It is also possible, inadvertently, to over constrain a molecule (e.g. by defining a methane tetrahedron to have 10 rather than 9 bond constraints) in which case the SHAKE/RATTLE procedure will become unstable. In addition, massless sites (e.g. charge sites) cannot be included in a simple constraint approach making modelling with potentials such as TIP4P water impossible.
All these problems may be circumvented by defining rigid body units, the dynamics of which may be described in terms of the translational motion of the centre of mass (COM) and rotation about the COM. To do this we need to define the appropriate variables describing the position, orientation and inertia of a rigid body, and the rigid body equations of motion [1].
The mass of a rigid unit \(M\) is the sum of the atomic masses in that unit:
where \(m_{j}\) is the mass of an atom and the sum includes all sites (\(N_{sites}\)) in the body. The position of the rigid unit is defined as the location of its centre of mass \(\underline{R}\):
where \(\underline{r}_{j}\) is the position vector of atom \(j\). The rigid body translational velocity \(\underline{V}\) is defined by:
and its angular momentum \(\underline{J}\) can then be defined by the expression:
where \(\underline{v}_{j}\) is the velocity of atom \(j\) and \(\underline{d}_{j}\) is the displacement vector of the atom \(j\) from the COM, is given by:
The net translational force \(\underline{F}\) acting on the rigid body unit is the vector sum of the forces acting on the atoms of the body:
and the torque vector \(\underline{\tau}\) acting on the body in the universal frame of reference is given by:
where \(\underline{f}_{j}\) is the force on a rigid unit site.
A rigid body also has associated with it a rotational inertia matrix \(\underline{\underline{\mathbf{I}}}\), whose components are given by:
and COM stress and virial respectively written down as:
where \(\underline{d}_{j}\) is the displacement vector of the atom \(j\) from the COM, and is given by:
The rigid body angular velocity \(\underline{\omega}\) is the right dot product of the inverse of the moment inertia, \(\underline{\underline{\mathbf{I}}}\), and the angular momentum, \(\underline{J}\),:
It is common practice in the treatment of rigid body motion to define the position \(\underline{R}\) of the body in a universal frame of reference (the so called laboratory or inertial frame), but to describe the moment of inertia tensor in a frame of reference that is localised in the rigid body and changes as the rigid body rotates. Thus the local body frame is taken to be that in which the rotational inertia tensor \(\hat{\underline{\underline{\mathbf{I}}}}\) is diagonal and the components satisfy \(I_{xx} \ge I_{yy} \ge I_{zz}\). In this local frame (the so called Principal Frame) the inertia tensor is therefore constant.
The orientation of the local body frame with respect to the space fixed frame is described via a four dimensional unit vector, the quaternion:
and the rotational matrix \(\underline{\underline{\mathbf{R}}}\) to transform from the local body frame to the space fixed frame is the unitary matrix:
so that if \(\hat{\underline{d}}_{j}\) is the position of an atom in the local body frame (with respect to its COM), its position in the universal frame (w.r.t. its COM) is given by:
With these variables defined we can now consider the equations of motion for the rigid body unit.
Integration of the Rigid Body Equations of Motion¶
The equations of translational motion of a rigid body are the same as those describing the motion of a single atom, except that the force is the total force acting on the rigid body i.e. \(\underline{F}\) in equation (128) and the mass is the total mass of the rigid body unit i.e. \(M\) in equation (127). These equations can be integrated by the standard Verlet VV algorithm described in the previous sections. Thus we need only consider the rotational motion here.
The rotational equation of motion for a rigid body relates the torque to the change in angular momentum:
In a thermostat it can be written as:
where \(i\) is the index of the rigid body, \(\chi\) and \({q_{mass}}\) are the thermostat friction coefficient and mass [2]. In the local frame of the rigid body and without the thermostat term, these simplify to the Euler’s equations
The vectors \(\hat{\underline{\tau}}\) and \(\hat{\underline{\omega}}\) are the torque and angular velocity acting on the body transformed to the local body frame. Integration of \(\hat{\underline{\omega}}\) is complicated by the fact that as the rigid body rotates, so does the local reference frame. So it is necessary to integrate equations (132) simultaneously with an integration of the quaternions describing the orientation of the rigid body. The equation describing this is:
Rotational motion in DL_POLY_4is handled by two different methods. For
the LFV implementation, the Fincham Implicit Quaternion Algorithm (FIQA)
is used 32. The VV implementation uses the
NOSQUISH algorithm of Miller et al. 65.
The implementation NOSQUSH is coded in no_squish both contained
within quaternion_container.
The LFV implementation begins by integrating the angular velocity equation in the local frame:
The new quaternions are found using the FIQA algorithm. In this algorithm the new quaternions are found by solving the implicit equation:
where \(\hat{\underline{w}} = [ 0,\hat{\underline{\omega}}]^T\) and \(\underline{\underline{\mathbf{Q}}}[\underline{q}]\) is:
The above equation is solved iteratively with
as the first guess. Typically, no more than 3 or 4 iterations are needed for convergence. At each step the normalisation constraint:
is imposed.
While all the above is enough to build LFV implementations, the VV implementations, based on the NOSQUISH algorithm of Miller et al. 65, also require treatment of the quaternion momenta as defined by:
and quaternion torques as defined by:
It should be noted that vectors \(\underline{p}\) and \(\underline{\Upsilon}\) are 4-component vectors. The quaternion momenta are first updated a half-step using the formula:
Next a sequence of operations is applied to the quaternions and the quaternion momenta in the order:
which preserves the symplecticness of the operations (see reference 60). Note that \(\delta t\) is some submultiple of \(\Delta t\). (In DL_POLY_4 the default is \(\Delta t=10 \delta t\).) The operators themselves are of the following kind:
where \(P_{k}\) is a permutation operator with \(k=0,\ldots,3\) with the following properties:
and the angular velocity \(\zeta_{k}\) is defined as:
Equations (133)-(134)) represent the heart of the NOSQUISH algorithm and are repeatedly applied (10 times in ). The final result is the quaternion updated to the full timestep value i.e. \(\underline{q}(t+\Delta t)\). These equations form part of the first stage of the VV algorithm (VV1).
In the second stage of the VV algorithm (VV2), new torques are used to update the quaternion momenta to a full timestep:
Thermostats and Barostats coupling to the Rigid Body Equations of Motion¶
In the presence of rigid bodies in the atomic system the system’s instantaneous pressure, equation (121):
and stress, equation (122):
are augmented to include the RBs’ COM virial and stress contributions.
Note
The kinetic energy and stress in the above also include the contributions of the RBs’ COMs kinetic energy and stress!
In DL_POLY_4 all degrees of freedom, translational and rotational, are considered equal and thus treated in the same manner in all available thermostats. Similarly, in the same spirit of equi-partitioning, all translational degrees of freedom, the free particles’ ones and the RBs’ COMs ones are considered equal and thus treated in the same manner in all available barostats. Based on these considerations, it is straightforward to couple the rigid body equations of motion to a thermostat and/or barostat. The thermostat is coupled to both the translational and rotational degrees of freedom and thus the translational and rotational velocities (momenta) are thermostated in the same operational manner as the purely atomic ones. The barostat, however, is coupled only to the translational degrees of freedom and does not contribute to the rotational motion of the RBs, thus only the RBs’ COMs positions and momenta are subjected to the same barostat driven algorithmic operations as those of the free particles’ positions and momenta. Therefore, if we notion the change of the system’s degrees of freedom as:
then all equations of motion defining the ensembles as described in this chapter are subject to the following notional changes in order to include the RB contributions:
where \(f\) refers to the degrees of freedom in the system (see equation (113)), \(\sigma\) is the system target energy (see equation (119)), \({\cal H}\) is the conserved quantity of the ensemble (if there is such defined), \(E_{kin}\) (!includes RB COM kinetic energy too) and \(E_{rot}\) are respectively the kinetic and rotational energies of the system, \(p_{mass}\) is the barostat mass, and \(\eta\) and \(\underline{\underline{\mathbf{\eta}}}\) are the barostat friction coefficient or matrix of coefficients respectively.
There are two slight technicalities with the Evans and Andersen ensembles that are worth mentioning.
Since both the translational and rotational velocities contribute towards temperature, equation (117), showing the derivation of the thermostat friction in the Evans ensemble by imposing a Gaussian constraint on the system’s instantaneous temperature, changes to:
where where \(\cal T\) is the instantaneous temperature defined in equation (112) and \(E_{kin}\) in the final expression contains both the kinetic contribution form the free particles and the RBs’ COMs.
In the case of the Andersen ensemble, if a Poisson selected particle constitutes a RB then the whole RB is Poisson selected. Poisson selected RBs’ translational and angular velocities together with Poisson selected FPs’ velocities sample the same Gaussian distribution isokinetically (Boltzmann distribution), where the isokineticity to target temperature is dependent upon the total of the Poisson selected FPs’ and RBs’ degrees of freedom.