RegulatedNHLIntegrator¶
- class openxps.integrators.RegulatedNHLIntegrator(temperature, timeConstant, stepSize, *, regulationParameter=1, forceFirst=False)[source]¶
A Regulated Nosé-Hoover-Langevin (NHL) integrator [6].
The Regulated Nosé-Hoover-Langevin (NHL) integrator is effective at maintaining temperature control under steady-state conditions, such as in d-AFED/TAMD [3, 4] or UFED [5] simulations.
Note
The friction coefficient is initially set to the inverse of the time constant, but this value can be customized via
setFrictionCoefficient().Warning
This integrator is incompatible with systems subject to constraints.
- Parameters:
temperature (Quantity) – The temperature of the heat bath.
timeConstant (Quantity) – The time constant (a.k.a. coupling/damping/relaxation time) of the thermostat.
stepSize (Quantity) – The integration step size.
- Keyword Arguments:
regulationParameter – The regulation parameter (see [6] for details).
forceFirst – If True, the integrator will apply a force-first scheme. Otherwise, it will apply a symmetric operator splitting scheme.
Example
>>> import openxps as xps >>> from openmm import unit >>> from openmmtools import testsystems
Symmetric scheme (default)
>>> integrator = xps.integrators.RegulatedNHLIntegrator( ... temperature=300 * unit.kelvin, ... timeConstant=100 * unit.femtoseconds, ... stepSize=2 * unit.femtoseconds, ... ) >>> integrator Per-dof variables: v1, active Global variables: kT = 2.494... invQ = 40.090... a = 0.9801... b = 1.9801... Computation steps: 0: allow forces to update the context state 1: v <- v + 0.5*dt*f/m 2: x <- x + 0.5*dt*c*tanh(v/c); c=sqrt(1*kT/m) 3: v1 <- active*(v1 + 0.5*dt*(m*v*c*tanh(v/c) - kT)*invQ); c=sqrt(1*kT/m) 4: v <- v*exp(-0.5*dt*v1) 5: v1 <- active*(a*v1 + b*gaussian) 6: v <- v*exp(-0.5*dt*v1) 7: v1 <- active*(v1 + 0.5*dt*(m*v*c*tanh(v/c) - kT)*invQ); c=sqrt(1*kT/m) 8: x <- x + 0.5*dt*c*tanh(v/c); c=sqrt(1*kT/m) 9: v <- v + 0.5*dt*f/m
Force-first scheme
>>> integrator_ff = xps.integrators.RegulatedNHLIntegrator( ... temperature=300 * unit.kelvin, ... timeConstant=100 * unit.femtoseconds, ... stepSize=2 * unit.femtoseconds, ... forceFirst=True ... ) >>> model = testsystems.AlanineDipeptideVacuum() >>> try: ... integrator_ff.registerWithSystem(model.system, False) ... except ValueError as e: ... print(e) Regulated NHL integrators do not support constraints.
Methods
- getFrictionCoefficient()¶
Get the friction coefficient.
- Returns:
The friction coefficient.
- Return type:
openmm.unit.Quantity
- getRegulationParameter()[source]¶
Get the regulation parameter of the integrator.
- Returns:
The regulation parameter.
- Return type:
float
- getTemperature()¶
Get the temperature.
- Returns:
The temperature.
- Return type:
openmm.unit.Quantity
- getTimeConstant()¶
Get the time constant.
- Returns:
The time constant.
- Return type:
openmm.unit.Quantity
- setFrictionCoefficient(value)¶
Set the friction coefficient.
- Parameters:
value (Quantity | float) – The friction coefficient.
- setTemperature(value)¶
Set the temperature.
- Parameters:
value (Quantity | float) – The temperature.
- setTimeConstant(value)¶
Set the time constant.
- Parameters:
value (Quantity | float) – The time constant.