Constraints¶
Constraint simulations¶

Conformational behavior of a flexible molecule = complex superpositions of different motions
Translational motion of the center of mass
Rotatiotional motion determined by the torque about the center of mass
Conformational changes and vibrations
Usually: High-frequency motions (e.g. bond vibrations) are of less interest, but they dictate the timestep of the simulation.

C-H bond stretching of hydrocarbons: 2800-3300 cm
Compute frequency: 90THz = cycles per second
Period of one cycle: s = 10fs
Appropriate timestep: 0.5-1~fs to sample a few points per cycle

Constraint dynamics enables individual, internal coordinates or combinations thereof to be constrained (= fixed) during the simulation without affecting the other degrees if freedom.
Important: Constraint restraint!
Constraint: Bonds or angles are forced to adopt specific values, and the respective degrees of freedom have no energy associated with them.
Restraint: Restrained bonds or angles may deviate from the desired value, the restraint is only an additional term in the forcefield. The respective degree of freedom still has an energy associated with it.
Holonomic vs non-holonomic constraints¶
Holonomic constraints can be expressed in the form
where = coordinates of particle
Example:
Holonomic: Particle with coordinates is constrained to always lie on the surface of a sphere with radius ,
Non-holonomic Particle with coordinates can lie on the surface of a sphere with radius or may fall off,

A simple constraint from classical mechanics¶

Box is constrained to always remain on the slope, must therefore always satisfy the equation of the slope Without constraint: Box would fall vertically
Gravitational force pulls down along dimension, but actual motion is along slope. The total force is the sum of a force due to gravity, and due to a constraint force (perpendicular to the surface, does no work since no motion in this direction, i.e. does not change the energy)
Degrees of freedom, and number of coordinates:
Unconstrained system: 3 degrees of freedom from 3 independent cartesian coordinates
With holonomic constraints: 3 degrees of freedom, which can be described using 3 generalized coordinates
E.g. for box: 2 degrees of freedom ( and coordinate of box) boils down to a single degree of freedom/generalized coordinate under constraint of the slope.
Generalized coordinate along the direction of the slope
Component of the gravitational force along the slope:

Acceleration down the slope:
Equation of motion:
Solution:
Generalized coordinates can be difficult to find for systems with multiple constraints, it is therefore preferable to work with cartesian coordinates instead:
where and are the components of the constraint force.\[0.5cm]
Since the constraint force is perpendicular to the slope, the ratio of the components is given by
We use this by setting , which yields in turn .
We thus get the three equations (two for the equations of motion and one for the constraint):

which we can solve using the Lagrange multiplier method. Since for all , we can also infer that and so that we can reformulate the constraint equation to:

Solving the three equations gives:
which returns the time dependence for and :
Constraints in MD¶
Forces from intra- and intermolecular interactions + forces from constraints
Constraint requires a fixed bond length between atoms and :
where is the Lagrange multiplier, is one of the Cartesian coordinates of the two atoms. The constraint is then
which gives
We can therefore rewrite the forces as (incorporating the factor 2 into ):
This can be incorporated into the Verlet algorithm:
where the summation is over all constraints that affect atom . The last term thus perturbs the positions that would have been obtained without constraints.
Determine multipliers . E.g. for a diatomic molecule:
Which gives us three equations with three unknown , , and , which can be solved easily.
For many constraints: Solving for Lagrange multipliers becomes equivalent to inverting a matrix even when we ignore quadratic terms in
Commonly used algorithms are: SHAKE (Ryckaert, Cicotti and Berendsen 1977) Use the above scheme (with the Verlet integrator). Solve each constraint in turn. Since satisfying one constraint might cause the violation of another, it is necessary to iterate around the constraints until they are all satisfied within some tolerance
By Pedro Gonnet - Own work, CC BY 3.0, https://
RATTLE (Andersen 1983) Implementation using Velocity Verlet integrator. This also requires the velocities to be corrected (not only the positions)\[0.5cm]
Many others all differing in how they solve for