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
ConstructorsConstructorDescriptionAndersenThermostat
(double defaultTemperature, double defaultCollisionFrequency) Create an AndersenThermostat. -
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 or not 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 defaultTemperature, double defaultCollisionFrequency) Create an AndersenThermostat.- Parameters:
defaultTemperature
- the default temperature of the heat bath (in Kelvin)defaultCollisionFrequency
- the default collision frequency (in 1/ps)
-
-
Method Details
-
destroy
public void destroy()Destroy the force. -
getDefaultCollisionFrequency
public double getDefaultCollisionFrequency()Get the default collision frequency (in 1/ps).- Returns:
- the default collision frequency (in 1/ps).
-
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.
-
getRandomNumberSeed
public int getRandomNumberSeed()Get the random number seed. See setRandomNumberSeed() for details. -
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)
-
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)
-
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.
-
usesPeriodicBoundaryConditions
public boolean usesPeriodicBoundaryConditions()Returns whether or not this force makes use of periodic boundary conditions.- Overrides:
usesPeriodicBoundaryConditions
in classForce
- Returns:
- true if force uses PBC and false otherwise
-