Package ffx.openmm
Class AndersenThermostat
java.lang.Object
ffx.openmm.Force
ffx.openmm.AndersenThermostat
This class uses the Andersen method to maintain constant temperature.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAndersenThermostat
(double temperature, double frequency) OpenMM AndersenThermostat constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Destroy the force.double
Get the default collision frequency (in 1/ps).double
Get the default temperature of the heat bath (in Kelvin).int
Get the random number seed.void
setDefaultCollisionFrequency
(double frequency) Set the default collision frequency.void
setDefaultTemperature
(double temperature) Set the default temperature of the heat bath.void
setRandomNumberSeed
(int seed) Set the random number seed.boolean
Returns whether this force makes use of periodic boundary conditions.Methods inherited from class ffx.openmm.Force
getForceGroup, getForceIndex, getName, getPointer, setForceGroup, setForceIndex, setName
-
Constructor Details
-
AndersenThermostat
public AndersenThermostat(double temperature, double frequency) OpenMM AndersenThermostat constructor.- Parameters:
temperature
- the default temperature of the heat bath (in Kelvin).frequency
- the default collision frequency (in 1/ps)
-
-
Method Details
-
setDefaultTemperature
public void setDefaultTemperature(double temperature) Set the default temperature of the heat bath. This will affect any new Contexts you create, but not ones that already exist.- Parameters:
temperature
- the default temperature of the heat bath (in Kelvin).
-
getDefaultTemperature
public double getDefaultTemperature()Get the default temperature of the heat bath (in Kelvin).- Returns:
- the default temperature of the heat bath, measured in Kelvin.
-
setDefaultCollisionFrequency
public void setDefaultCollisionFrequency(double frequency) Set the default collision frequency. This will affect any new Contexts you create, but not ones that already exist.- Parameters:
frequency
- the default collision frequency (in 1/ps).
-
getDefaultCollisionFrequency
public double getDefaultCollisionFrequency()Get the default collision frequency (in 1/ps).- Returns:
- the default collision frequency (in 1/ps).
-
setRandomNumberSeed
public void setRandomNumberSeed(int seed) Set the random number seed. The precise meaning of this parameter is undefined, and is left up to each Platform to interpret in an appropriate way. It is guaranteed that if two simulations are run with different random number seeds, the sequence of collisions will be different. On the other hand, no guarantees are made about the behavior of simulations that use the same seed. In particular, Platforms are permitted to use non-deterministic algorithms which produce different results on successive runs, even if those runs were initialized identically.If seed is set to 0 (which is the default value assigned), a unique seed is chosen when a Context is created from this Force. This is done to ensure that each Context receives unique random seeds without you needing to set them explicitly.
- Parameters:
seed
- the random number seed.
-
getRandomNumberSeed
public int getRandomNumberSeed()Get the random number seed. See setRandomNumberSeed() for details. -
usesPeriodicBoundaryConditions
public boolean usesPeriodicBoundaryConditions()Returns whether this force makes use of periodic boundary conditions.- Overrides:
usesPeriodicBoundaryConditions
in classForce
- Returns:
- True if the force uses periodic boundary conditions.
-
destroy
public void destroy()Destroy the force.
-