MonteCarloBarostat¶
-
class
simtk.openmm.openmm.
MonteCarloBarostat
(*args)¶ This class uses a Monte Carlo algorithm to adjust the size of the periodic box, simulating the effect of constant pressure.
This class assumes the simulation is also being run at constant temperature, and requires you to specify the system temperature (since it affects the acceptance probability for Monte Carlo moves). It does not actually perform temperature regulation, however. You must use another mechanism along with it to maintain the temperature, such as LangevinIntegrator or AndersenThermostat.
-
__init__
(self, defaultPressure, temperature, frequency=25) → MonteCarloBarostat¶ __init__(self, defaultPressure, temperature) -> MonteCarloBarostat __init__(self, other) -> MonteCarloBarostat
Create a MonteCarloBarostat.
Parameters: - defaultPressure (double) – the default pressure acting on the system (in bar)
- temperature (double) – the temperature at which the system is being maintained (in Kelvin)
- frequency (int) – the frequency at which Monte Carlo pressure changes should be attempted (in time steps)
Methods
Pressure
(() -> std::string const &)This is the name of the parameter which stores the current pressure acting on the system (in bar). __init__
((self, defaultPressure, temperature)__init__(self, defaultPressure, temperature) -> MonteCarloBarostat getDefaultPressure
((self) -> double)Get the default pressure acting on the system (in bar). getForceGroup
((self) -> int)Get the force group this Force belongs to. getFrequency
((self) -> int)Get the frequency (in time steps) at which Monte Carlo pressure changes should be attempted. getRandomNumberSeed
((self) -> int)Get the random number seed. getTemperature
((self) -> double)Get the temperature at which the system is being maintained, measured in Kelvin. setDefaultPressure
(self, pressure)Set the default pressure acting on the system. setForceGroup
(self, group)Set the force group this Force belongs to. setFrequency
(self, freq)Set the frequency (in time steps) at which Monte Carlo pressure changes should be attempted. setRandomNumberSeed
(self, seed)Set the random number seed. setTemperature
(self, temp)Set the temperature at which the system is being maintained. usesPeriodicBoundaryConditions
((self) -> bool)Returns whether or not this force makes use of periodic boundary conditions. -
static
Pressure
() → std::string const &¶ This is the name of the parameter which stores the current pressure acting on the system (in bar).
-
getDefaultPressure
(self) → double¶ Get the default pressure acting on the system (in bar).
Returns: the default pressure acting on the system, measured in bar. Return type: double
-
setDefaultPressure
(self, pressure)¶ Set the default pressure acting on the system. This will affect any new Contexts you create, but not ones that already exist.
Parameters: pressure (double) – the default pressure acting on the system, measured in bar.
-
getFrequency
(self) → int¶ Get the frequency (in time steps) at which Monte Carlo pressure changes should be attempted. If this is set to 0, the barostat is disabled.
-
setFrequency
(self, freq)¶ Set the frequency (in time steps) at which Monte Carlo pressure changes should be attempted. If this is set to 0, the barostat is disabled.
-
getTemperature
(self) → double¶ Get the temperature at which the system is being maintained, measured in Kelvin.
-
setTemperature
(self, temp)¶ Set the temperature at which the system is being maintained.
Parameters: temp (double) – the system temperature, measured in Kelvin.
-
getRandomNumberSeed
(self) → int¶ Get the random number seed. See setRandomNumberSeed() for details.
-
setRandomNumberSeed
(self, seed)¶ Set the random number seed. It is guaranteed that if two simulations are run with different random number seeds, the sequence of Monte Carlo steps 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
-
__delattr__
¶ x.__delattr__(‘name’) <==> del x.name
-
__format__
()¶ default object formatter
-
__getattribute__
¶ x.__getattribute__(‘name’) <==> x.name
-
__hash__
¶
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶
-
getForceGroup
(self) → int¶ Get the force group this Force belongs to.
-
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).
-