Package ffx.openmm

Class MonteCarloMembraneBarostat

java.lang.Object
ffx.openmm.Force
ffx.openmm.MonteCarloMembraneBarostat

public class MonteCarloMembraneBarostat extends Force
This class uses a Monte Carlo algorithm to adjust the size of the periodic box, simulating the effect of constant pressure and surface tension on a membrane system. It assumes the simulation is running at constant temperature, and the box size is adjusted to maintain constant pressure in the XY plane and constant surface tension in the Z direction.

This class is most useful for simulating membrane systems at constant pressure and surface tension, where the membrane is oriented in the XY plane and the normal direction is along the Z axis.

  • Constructor Details

    • MonteCarloMembraneBarostat

      public MonteCarloMembraneBarostat(double defaultPressure, double defaultSurfaceTension, double defaultTemperature, int xymode, int zmode, int frequency)
      Create a MonteCarloMembraneBarostat.
      Parameters:
      defaultPressure - The default pressure acting on the system (in bar).
      defaultSurfaceTension - The default surface tension acting on the membrane (in bar*nm).
      defaultTemperature - The default temperature at which the system is being maintained (in Kelvin).
      xymode - The mode for scaling the XY dimensions (0 = isotropic, 1 = anisotropic).
      zmode - The mode for scaling the Z dimension (0 = constant volume, 1 = constant pressure).
      frequency - The frequency at which Monte Carlo pressure changes should be attempted (in time steps).
  • Method Details

    • destroy

      public void destroy()
      Destroy the force.
      Specified by:
      destroy in class Force
    • getDefaultPressure

      public double getDefaultPressure()
      Get the default pressure (in bar).
      Returns:
      The default pressure acting on the system.
    • getDefaultSurfaceTension

      public double getDefaultSurfaceTension()
      Get the default surface tension (in bar*nm).
      Returns:
      The default surface tension acting on the membrane.
    • getDefaultTemperature

      public double getDefaultTemperature()
      Get the default temperature at which the system is being maintained (in Kelvin).
      Returns:
      The default temperature.
    • getFrequency

      public int getFrequency()
      Get the frequency (in time steps) at which Monte Carlo pressure changes should be attempted.
      Returns:
      The frequency of pressure change attempts.
    • getRandomNumberSeed

      public int getRandomNumberSeed()
      Get the random number seed. See setRandomNumberSeed() for details.
      Returns:
      The random number seed.
    • getXYMode

      public int getXYMode()
      Get the mode for scaling the XY dimensions.
      Returns:
      The XY scaling mode (0 = isotropic, 1 = anisotropic).
    • getZMode

      public int getZMode()
      Get the mode for scaling the Z dimension.
      Returns:
      The Z scaling mode (0 = constant volume, 1 = constant pressure).
    • setDefaultPressure

      public void setDefaultPressure(double pressure)
      Set the default pressure acting on the system (in bar).
      Parameters:
      pressure - The default pressure acting on the system.
    • setDefaultSurfaceTension

      public void setDefaultSurfaceTension(double surfaceTension)
      Set the default surface tension acting on the membrane (in bar*nm).
      Parameters:
      surfaceTension - The default surface tension acting on the membrane.
    • setDefaultTemperature

      public void setDefaultTemperature(double temperature)
      Set the default temperature at which the system is being maintained (in Kelvin).
      Parameters:
      temperature - The default temperature.
    • setFrequency

      public void setFrequency(int frequency)
      Set the frequency (in time steps) at which Monte Carlo pressure changes should be attempted.
      Parameters:
      frequency - The frequency of pressure change attempts.
    • setRandomNumberSeed

      public void setRandomNumberSeed(int 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 random numbers 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.

      Parameters:
      seed - The random number seed.
    • setXYMode

      public void setXYMode(int xymode)
      Set the mode for scaling the XY dimensions.
      Parameters:
      xymode - The XY scaling mode (0 = isotropic, 1 = anisotropic).
    • setZMode

      public void setZMode(int zmode)
      Set the mode for scaling the Z dimension.
      Parameters:
      zmode - The Z scaling mode (0 = constant volume, 1 = constant pressure).
    • usesPeriodicBoundaryConditions

      public boolean usesPeriodicBoundaryConditions()
      Returns whether this force makes use of periodic boundary conditions.
      Overrides:
      usesPeriodicBoundaryConditions in class Force
      Returns:
      True if the force uses periodic boundary conditions.