RPMDMonteCarloMembraneBarostat

class RPMDMonteCarloMembraneBarostat : public OpenMM::Force

This class is very similar to MonteCarloMembraneBarostat, 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).

Public Types

enum XYMode

This is an enumeration of the different behaviors for the X and Y axes.

Values:

enumerator XYIsotropic

The X and Y axes are always scaled by the same amount, so the ratio of their lengths remains constant.

enumerator XYAnisotropic

The X and Y axes are allowed to vary independently of each other.

enum ZMode

This is an enumeration of the different behaviors for Z axis.

Values:

enumerator ZFree

The Z axis is allowed to vary freely, independent of the other two axes.

enumerator ZFixed

The Z axis is held fixed and does not change.

enumerator ConstantVolume

The Z axis is always scaled in inverse proportion to the other two axes so the box volume remains fixed. Note that in this mode pressure has no effect on the system, only surface tension.

Public Functions

RPMDMonteCarloMembraneBarostat(double defaultPressure, double defaultSurfaceTension, XYMode xymode, ZMode zmode, int frequency = 25, bool scaleMoleculesAsRigid = true)

Create a RPMDMonteCarloMembraneBarostat.

Parameters:
  • defaultPressure – the default pressure acting on the system (in bar)

  • defaultSurfaceTension – the default surface tension acting on the system (in bar*nm)

  • xymode – the mode specifying the behavior of the X and Y axes

  • zmode – the mode specifying the behavior of the Z axis

  • frequency – the frequency at which Monte Carlo volume changes should be attempted (in time steps)

  • scaleMoleculesAsRigid – if true, coordinate scaling keeps molecules rigid, scaling only the center of mass of each one. If false, every atom is scaled independently.

inline double getDefaultPressure() const

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

Returns:

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

void setDefaultPressure(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.

inline double getDefaultSurfaceTension() const

Get the default surface tension acting on the system (in bar*nm).

Returns:

the default surface tension acting on the system, measured in bar*nm.

void setDefaultSurfaceTension(double surfaceTension)

Set the default surface tension acting on the system. This will affect any new Contexts you create, but not ones that already exist.

Parameters:

surfaceTension – the default surface tension acting on the system, measured in bar.

inline int getFrequency() const

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.

void setFrequency(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.

inline XYMode getXYMode() const

Get the mode specifying the behavior of the X and Y axes.

inline void setXYMode(XYMode mode)

Set the mode specifying the behavior of the X and Y axes.

inline ZMode getZMode() const

Get the mode specifying the behavior of the Z axis.

inline void setZMode(ZMode mode)

Set the mode specifying the behavior of the Z axis.

inline int getRandomNumberSeed() const

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

inline void setRandomNumberSeed(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.

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.

inline virtual bool usesPeriodicBoundaryConditions() const

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

Returns:

true if force uses PBC and false otherwise

inline bool getScaleMoleculesAsRigid() const

Get whether scaling is applied to the centroid of each molecule while keeping the molecules rigid, or to each atom independently.

Returns:

true if scaling is applied to molecule centroids, false if it is applied to each atom independently.

inline void setScaleMoleculesAsRigid(bool rigid)

Set whether scaling is applied to the centroid of each molecule while keeping the molecules rigid, or to each atom independently.

Public Static Functions

static inline const std::string &Pressure()

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

static inline const std::string &SurfaceTension()

This is the name of the parameter which stores the current surface tension acting on the system (in bar*nm).