OpenMM

- Main Page
- Related Pages
- Classes

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
RPMDMonteCarloBarostat Class Reference

This class is very similar to MonteCarloBarostat, but it is specifically designed for use with RPMDIntegrator. More...

`#include <RPMDMonteCarloBarostat.h>`

Inheritance diagram for RPMDMonteCarloBarostat:

## Public Member Functions
| RPMDMonteCarloBarostat (double defaultPressure, int frequency=25)
| Create a MonteCarloBarostat. More...
double | getDefaultPressure () const
| Get the default pressure acting on the system (in bar). More...
void | setDefaultPressure (double pressure)
| Set the default pressure acting on the system. More...
int | getFrequency () const
| Get the frequency (in time steps) at which Monte Carlo pressure changes should be attempted. More...
void | setFrequency (int freq)
| Set the frequency (in time steps) at which Monte Carlo pressure changes should be attempted. More...
int | getRandomNumberSeed () const
| Get the random number seed. More...
void | setRandomNumberSeed (int seed)
| Set the random number seed. More...
bool | usesPeriodicBoundaryConditions () const
| Returns whether or not this force makes use of periodic boundary conditions. More...
Public Member Functions inherited from Force
| Force ()
virtual | ~Force ()
int | getForceGroup () const
| Get the force group this Force belongs to. More...
void | setForceGroup (int group)
| Set the force group this Force belongs to. More...

## Static Public Member Functions
static const std::string & | Pressure ()
| This is the name of the parameter which stores the current pressure acting on the system (in bar). More...

## Protected Member Functions
ForceImpl * | createImpl () const
| When a Context is created, it invokes this method on each Force in the System. More...
Protected Member Functions inherited from Force
ForceImpl & | getImplInContext (Context &context)
| Get the ForceImpl corresponding to this Force in a Context. More...
ContextImpl & | getContextImpl (Context &context)
| Get the ContextImpl corresponding to a Context. More...

## Detailed Description

This class is very similar to MonteCarloBarostat, but it is specifically designed for use with RPMDIntegrator.

For each trial move, it scales all copies of the system by the same amount, then accepts or rejects the move based on the change to the total energy of the ring polymer (as returned by the integrator's getTotalEnergy() method).

## Constructor & Destructor Documentation

RPMDMonteCarloBarostat | ( | double | defaultPressure,
|  | int | frequency = `25`
| ) |  |

Create a MonteCarloBarostat.

Parameters

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

## Member Function Documentation

ForceImpl* createImpl | ( |  | ) | const
| protected virtual

When a Context is created, it invokes this method on each Force in the System.

It should create a new ForceImpl object which can be used by the context for calculating forces. The ForceImpl will be deleted automatically when the Context is deleted.

Implements Force.

double getDefaultPressure | ( |  | ) | const
| inline

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

Returns
  the default pressure acting on the system, measured in bar.

int getFrequency | ( |  | ) | const
| inline

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.

int getRandomNumberSeed | ( |  | ) | const
| inline

Get the random number seed.

See setRandomNumberSeed() for details.

static const std::string& Pressure | ( |  | ) |
| inline static

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

void setDefaultPressure | ( | double | pressure | ) |
| inline

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.

void setFrequency | ( | int | freq | ) |
| inline

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.

void setRandomNumberSeed | ( | int | seed | ) |
| inline

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.

bool usesPeriodicBoundaryConditions | ( |  | ) | const
| inline virtual

Returns whether or not this force makes use of periodic boundary conditions.

Returns
  true if force uses PBC and false otherwise

Reimplemented from Force.

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

- RPMDMonteCarloBarostat.h