The constraints parameters are specified in the same manner as for usual (static) harmonic constraints. The reference positions of all constrained atoms are then rotated with a given angular velocity about a given axis. If the force constant of the constraints is sufficiently large, the constrained atoms will follow their reference positions.
A rotation matrix about the axis unit vector is calculated every timestep for the angle of rotation corresponding to the current timestep. angle = , where is the angular velocity of rotation.
From now on, all quantities are 3D vectors, except the matrix and the force constant .
The current reference position is calculated from the initial reference position (at ), , where is the pivot point.
Coordinates of point N can be found as . Normal from the atom pos to the axis is, similarly, normal The force is, as usual, ; This is the force applied to the atom in NAMD (see below). NAMD does not know anything about the torque applied. However, the torque applied to the atom can be calculated as a vector product torque Finally, the torque applied to the atom with respect to the axis is the projection of the torque on the axis, i.e.,
If there are atoms that have to be constrained, but not moved, this implementation is not suitable, because it will move all reference positions.
Only one of the moving and rotating constraints can be used at a time.
Using very soft springs for rotating constraints leads to the system lagging behind the reference positions, and then the force is applied along a direction different from the "ideal" direction along the circular path.
Pulling on N atoms at the same time with a spring of stiffness K amounts to pulling on the whole system by a spring of stiffness NK, so the overall behavior of the system is as if you are pulling with a very stiff spring if N is large.
In both moving and rotating constraints the force constant that you specify in the constraints pdb file is multiplied by 2 for the force calculation, i.e., if you specified in the pdb file, the force actually calculated is . SMD feature of namd2 does the calculation without multiplication of the force constant specified in the config file by 2.