AndersenThermostat¶
- class openmm.openmm.AndersenThermostat(*args)¶
This class uses the Andersen method to maintain constant temperature.
- __init__(self, defaultTemperature, defaultCollisionFrequency) → AndersenThermostat¶
- __init__(self, other) → AndersenThermostat
Create an AndersenThermostat.
- Parameters
defaultTemperature (double) – the default temperature of the heat bath (in Kelvin)
defaultCollisionFrequency (double) – the default collision frequency (in 1/ps)
Methods
This is the name of the parameter which store the current collision frequency (in 1/ps).
This is the name of the parameter which stores the current temperature of the heat bath (in Kelvin).
__init__
(-> AndersenThermostat)Create an AndersenThermostat.
Get the default collision frequency (in 1/ps).
getDefaultTemperature
(self)Get the default temperature of the heat bath (in Kelvin).
getForceGroup
(self)Get the force group this Force belongs to.
getName
(self)Get the name of this Force.
getRandomNumberSeed
(self)Get the random number seed.
setDefaultCollisionFrequency
(self, frequency)Set the default collision frequency.
setDefaultTemperature
(self, temperature)Set the default temperature of the heat bath.
setForceGroup
(self, group)Set the force group this Force belongs to.
setName
(self, name)Set the name of this Force.
setRandomNumberSeed
(self, seed)Set the random number seed.
Returns whether or not this force makes use of periodic boundary conditions.
Attributes
The membership flag
- property thisown¶
The membership flag
- static Temperature() → std::string const &¶
This is the name of the parameter which stores the current temperature of the heat bath (in Kelvin).
- static CollisionFrequency() → std::string const &¶
This is the name of the parameter which store the current collision frequency (in 1/ps).
- getDefaultTemperature(self) → double¶
Get the default temperature of the heat bath (in Kelvin).
- Returns
the default temperature of the heat bath, measured in Kelvin.
- Return type
double
- setDefaultTemperature(self, 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 (double) – the default temperature of the heat bath (in Kelvin)
- getDefaultCollisionFrequency(self) → double¶
Get the default collision frequency (in 1/ps).
- Returns
the default collision frequency, measured in 1/ps.
- Return type
double
- setDefaultCollisionFrequency(self, frequency)¶
Set the default collision frequency. This will affect any new Contexts you create, but not ones that already exist.
- Parameters
frequency (double) – the default collision frequency (in 1/ps)
- getRandomNumberSeed(self) → int¶
Get the random number seed. See setRandomNumberSeed() for details.
- setRandomNumberSeed(self, 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.
- usesPeriodicBoundaryConditions(self) → bool¶
Returns whether or not this force makes use of periodic boundary conditions.
- Returns
true if force uses PBC and false otherwise
- Return type
bool
- getForceGroup(self) → int¶
Get the force group this Force belongs to.
- getName(self) → std::string const &¶
Get the name of this Force. This is an arbitrary, user modifiable identifier. By default it equals the class name, but you can change it to anything useful.
- setForceGroup(self, group)¶
Set the force group this Force belongs to.
- Parameters
group (int) – the group index. Legal values are between 0 and 31 (inclusive).
- setName(self, name)¶
Set the name of this Force. This is an arbitrary, user modifiable identifier. By default it equals the class name, but you can change it to anything useful.