Class HistogramSettings

java.lang.Object
ffx.algorithms.thermodynamics.HistogramSettings

public class HistogramSettings extends Object
HistogramSettings is a mutable settings class for OST histograms. Many fields in Histogram are (or should be) final at construction, but there are too many to reasonably put in a constructor. As such, HistogramSettings stores these values and their defaults, so a Histogram can have many final fields with a small-signature constructor.

While most fields are package-private and can be set easily (technically breaking encapsulation), some fields are fully private because they are involved in side effects. For example, dL may be adjusted slightly downwards if continuous lambda bins are in use, and we need to arrive at an odd number of lambda bins.

  • Field Details

    • discreteLambda

      public final boolean discreteLambda
      If true, use discrete lambda values instead of continuous lambda values. Is a final field to avoid strange interactions with dL and number of lambda bins.
    • temperature

      public double temperature
      Temperature in Kelvin.

      The default is 298.15.

    • temperingFactor

      public double temperingFactor
      The Dama et al. transition-tempering rate parameter. A reasonable value is about 2 to 8 kT, with larger values being resulting in slower decay.

      The default temperingFactor = 2.0.

    • dt

      public double dt
      Time step in picoseconds.
    • thetaFriction

      public double thetaFriction
      Reasonable thetaFriction is ~60 per picosecond (1.0e-12).
    • thetaMass

      public double thetaMass
      Reasonable thetaMass is ~100 a.m.u. (100 a.m.u is 1.6605e-22 grams).
    • countInterval

      public int countInterval
      Interval between adding a count to the Recursion kernel in MD steps.

      The default countInterval = 10.

    • asynchronous

      public boolean asynchronous
      Flag to indicate if OST should send and receive counts between processes synchronously or asynchronously. The latter can be faster by ~40% because simulation with Lambda > 0.75 must compute two condensed phase self-consistent fields to interpolate polarization.
  • Constructor Details

    • HistogramSettings

      public HistogramSettings(File hisFile, String lamFileName, org.apache.commons.configuration2.CompositeConfiguration properties) throws IOException
      Throws:
      IOException
    • HistogramSettings

      public HistogramSettings(File hisFile, String lamFileName, org.apache.commons.configuration2.CompositeConfiguration properties, boolean discreteLambda) throws IOException
      Throws:
      IOException
  • Method Details

    • getBiasMag

      public double getBiasMag()
      Gets the Gaussian bias magnitude in kcal/mol.
      Returns:
      Gaussian bias magnitude in kcal/mol.
    • setBiasMag

      public void setBiasMag(double biasMag)
      Sets the bias magnitude, and if temperOffset has not previously been set by method or property, sets temperOffset to 20x that value.
      Parameters:
      biasMag - Gaussian bias magnitude in kcal/mol
    • getDL

      public double getDL()
    • setDL

      public void setDL(double dLambda)
      Sets dLambda; if an invalid value is provided (not 0-1), resets it to default 0.005.
      Parameters:
      dLambda - Lambda bin width.
    • setDL

      public void setDL(int lambdaBins)
      Sets dL based on a provided number of lambda bins.
      Parameters:
      lambdaBins - Number of lambda bins.
    • getHisFileName

      public String getHisFileName()
    • getHistogramFile

      public File getHistogramFile()
    • getLambdaFileName

      public String getLambdaFileName()
    • getLambdaResetValue

      public double getLambdaResetValue()
    • setLambdaResetValue

      public void setLambdaResetValue(double lambdaResetValue)
    • getTemperOffset

      public double getTemperOffset()
      Gets the tempering offset.
      Returns:
      Gets the tempering offset in kcal/mol.
    • setTemperOffset

      public void setTemperOffset(double temperingOffset)
      Sets the tempering offset in kcal/mol.
      Parameters:
      temperingOffset - Tempering offset in kcal/mol.
    • isMetaDynamics

      public boolean isMetaDynamics()
      Returns the value of metaDynamics.
      Returns:
      metaDynamics.
    • setMetaDynamics

      public void setMetaDynamics(boolean metaDynamics)
    • independentWalkers

      public boolean independentWalkers()
      Returns the value of independentWalkers.
      Returns:
      independentWalkers.
    • resetStatistics

      public boolean resetStatistics()
    • setIndependentWalkers

      public void setIndependentWalkers(boolean iw)
      Sets the value of independentWalkers; if true, it also sets writeIndependent to true.
      Parameters:
      iw - Value to set independentWalkers to.
    • setWriteIndependent

      public void setWriteIndependent(boolean wi) throws IllegalArgumentException
      Sets the value of writeIndependent.
      Parameters:
      wi - Value to set writeIndependent to.
      Throws:
      IllegalArgumentException - If wi is false and independentWalkers is true.
    • writeIndependent

      public boolean writeIndependent()
      Returns the value of writeIndependent.
      Returns:
      writeIndependent.