Exploring the Fix Rigid class
The Fix Rigid
class can treat a set of atoms as an independent rigid body. Its dynamics is described in terms of the net force on its center-of-mass (COM) and torque around the COM.
As described in Chapter 1, MD Theory and Simulation Practices, the net force, on a rigid body is calculated by summing up all the forces on all its constituent atoms (N
), while the torque, , about its COM is calculated from the sum of the cross products of the displacement vector, , of each atom from the COM with the force, , acting on that atom:
The torque is used to update the rigid-body angular momentum, , through the velocity Verlet algorithm for rotational motion:
Using the moment of inertia tensor, I, the angular velocity, , of the rigid body can be obtained as follows:
The angular velocity and the distance from the COM can be used to find the individual atom linear velocities, , with respect to the COM...