# MonteCarloBarostat Class Reference

This class uses a Monte Carlo algorithm to adjust the size of the periodic box, simulating the effect of constant pressure. More...

Inheritance diagram for MonteCarloBarostat:

List of all members.

## Public Member Functions

def | Pressure
| Pressure() -> string.
def | getDefaultPressure
| getDefaultPressure(self) -> double
def | setDefaultPressure
| setDefaultPressure(self, double pressure)
def | getFrequency
| getFrequency(self) -> int
def | setFrequency
| setFrequency(self, int freq)
def | getTemperature
| getTemperature(self) -> double
def | setTemperature
| setTemperature(self, double temp)
def | getRandomNumberSeed
| getRandomNumberSeed(self) -> int
def | setRandomNumberSeed
| setRandomNumberSeed(self, int seed)
def | __init__
| __init__(self, double defaultPressure, double temperature, int frequency = 25) -> MonteCarloBarostat __init__(self, double defaultPressure, double temperature) -> MonteCarloBarostat __init__(self, MonteCarloBarostat other) -> MonteCarloBarostat
def | __del__
| __del__(self)

## Public Attributes

| this

## Detailed Description

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.

## Member Function Documentation

def __del__ | ( |  | self | ) |

__del__(self)

Reimplemented from Force.

def __init__ | ( |  | self,
|  |  | args |
| ) |  |  |

__init__(self, double defaultPressure, double temperature, int frequency = 25) -> MonteCarloBarostat __init__(self, double defaultPressure, double temperature) -> MonteCarloBarostat __init__(self, MonteCarloBarostat other) -> MonteCarloBarostat

Create a MonteCarloBarostat.

Parameters:

  | defaultPressure | the default pressure acting on the system (in bar)
  | temperature | the temperature at which the system is being maintained (in Kelvin)
  | frequency | the frequency at which Monte Carlo pressure changes should be attempted (in time steps)

def getDefaultPressure | ( |  | self | ) |

getDefaultPressure(self) -> double

Get the default pressure acting on the system (in bar).

def getFrequency | ( |  | self | ) |

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.

def getRandomNumberSeed | ( |  | self | ) |

getRandomNumberSeed(self) -> int

Get the random number seed. See setRandomNumberSeed() for details.

def getTemperature | ( |  | self | ) |

getTemperature(self) -> double

Get the temperature at which the system is being maintained, measured in Kelvin.

def Pressure | ( |  | ) |

Pressure() -> string.

This is the name of the parameter which stores the current pressure acting on the system (in bar).

def setDefaultPressure | ( |  | self,
|  |  | args |
| ) |  |  |

setDefaultPressure(self, double 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 | the default pressure acting on the system, measured in bar.

def setFrequency | ( |  | self,
|  |  | args |
| ) |  |  |

setFrequency(self, int 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.

def setRandomNumberSeed | ( |  | self,
|  |  | args |
| ) |  |  |

setRandomNumberSeed(self, int 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.

def setTemperature | ( |  | self,
|  |  | args |
| ) |  |  |

setTemperature(self, double temp)

Set the temperature at which the system is being maintained.

Parameters:

  | temp | the system temperature, measured in Kelvin.

## Member Data Documentation

this

The documentation for this class was generated from the following file:

- openmm.py