Simpatico
v1.10
|
The classes McMd::NvtLangevinIntegrator and DdMd::NvtLangevinIntegrator compute approximate solutions to the Langevin equation. This page describe the time stepping algorithm used by both of these classes.
The Langevin equation for each particle is given by Newton's equation
with a force
that includes frictional and random components, in which:
The random force must have a mean and auto-correlation function:
The algorithm uses a conventional two-step velocity-Verlet time stepping sequence, identical to that of of the energy conserving NVE integrators, with a modified total force. This algorithm uses the following two-step update scheme for the velocity and position
:
The total force is given by a function
in which is the conservative force derived from the potential energy, evaluated at updated position
,
and
are numerical coefficients whose values are determined below, and
is a dimensioness random number whose Cartesian components are each uniformly distributed random numbers in the range
.
Because the force is calculated between the first step of this two-step integrator (i.e., first two lines of the above algorithm) and the final velocity update (the last line), it contains a conservative force that is calculated using fully updated positions
but a frictional drag force calculated using the half-updated velocity
. In practice, the drag and random forces for each particle are evaluated and added to the total force for that particle at the beginning of the loop over particles for second step of the algorithm, after evaluation of the conservative forces for all particles.
Determination of Coefficients: The coefficients and
are chosen so that in the absence of any potential force (i.e., in an ideal gas) the algorithm would yield the exact result for the decay of velocity correlations and for the variance of the velocity obtained at the end of each step. In an ideal gas, the velocity change between midstep force evaluations is given by
By convention, we choose the constant such that
, where
is a decay rate parameter input by the user. This yields the decay of velocity auto-correlations between midstep velocities predicted by the exact solution. This gives a coefficient
for which . The coefficient
for the random force is then chosen so that, in the absence of conservative forces, the mapping would produce a variance for the end of step velocities that satisfies the equipartition theorem
Because there are systematic differences between the mid-step and end-of-step velocities, this turns out to imply that the mid-step velocities obey a modified equation
in which is a coefficient that approaches unity only in the continuum limit
. Applying the above criteria for the variance of the midstep velocities, while treating
for now as unknown, and using the identity
for the Cartesian components of
, we obtain:
To determine , we then use the mapping
for an ideal gas to calculate the relationship between variances for midstep and final velocities, and require that the end-of-step velocities satisfy equipartition. This yields:
Substituting this into the equation for completes the specification of constants in the algorithm.
Because the values of the coefficients and
depend on the particle mass, values must be calculated for each atom type. These values are stored in private arrays named cv_ and cr_ that are indexed by atom type id.