Class HistogramData

java.lang.Object
ffx.algorithms.thermodynamics.HistogramData

public class HistogramData extends Object
  • Field Details

    • dUdLBins

      public int dUdLBins
      It is useful to have an odd number of bins, so that there is a bin from FL=-dFL/2 to dFL/2 so that as FL approaches zero its contribution to thermodynamic integration goes to zero.

      Otherwise a contribution of zero from a L bin can only result from equal sampling of the ranges -dFL to 0 and 0 to dFL.

      The default FLambdaBins = 101.

    • counts

      public int counts
      The number of hills added to the recursion kernel.
    • lambdaBins

      public int lambdaBins
      For continuous lambda: The first Lambda bin is centered on 0.0 (-0.0025 to 0.0025). The final Lambda bin is centered on 1.0 ( 0.9975 to 1.0025).

      With this scheme, the maximum of biasing Gaussian hills is at exactly 0.0 and 1.0.

      For discrete lambda: The first value of lambda is 0.0 and last value is 1.0.

      The default lambdaBins = 201.

    • lambdaBinWidth_2

      public double lambdaBinWidth_2
      Half the width of a lambda bin, or zero for discrete lambda values.
    • minLambda

      public double minLambda
      The minimum value of the first lambda bin.

      minLambda = -dL_2 for continuous lambda.

      minLambda = 0 for discrete lambda.

    • lambdaLadder

      public double[] lambdaLadder
      Either the discrete lambda values used, or null (continuous lambda).
    • lambdaVariance

      public double lambdaVariance
      The variance for the Gaussian bias in the lambda dimension. lambdaVariance = 2.0 * dL * 2.0 * dL;
    • dUdLMaximum

      public double dUdLMaximum
      The maximum value of the last dUdL bin.

      maxdUdL = mindUdL + dUdLBins * dUdLBinWidth.

      default = -101 + 101 * 2.0 = 101 = DEFAULT_DUDL_BINS.

    • dUdLBinWidth_2

      public double dUdLBinWidth_2
      Half the width of the F_lambda bin.
    • dUdLVariance

      public double dUdLVariance
      The variance for the Gaussian bias in the dU/dL dimension. dUdLVariance = 2.0 * dFL * 2.0 * dFL;
  • Constructor Details

    • HistogramData

      public HistogramData()
  • Method Details

    • writeHistogram

      public static void writeHistogram(HistogramData histogramData, File file)
      Marshall the histogram data to a file.
      Parameters:
      histogramData - The Histogram data.
      file - The file to write to.
    • readHistogram

      public static HistogramData readHistogram(@Nullable File file)
      Unmarshall the histogram data.
      Parameters:
      file - The file to read from.
      Returns:
      The Histogram data.
    • setCountInterval

      public void setCountInterval(int countInterval)
    • writeHistogram

      public void writeHistogram()
      Marshall this histogram data to a file.
    • getHistogramFileName

      public String getHistogramFileName()
    • getHistogramFile

      public File getHistogramFile()
    • setHistogramFile

      public void setHistogramFile(@Nullable File histogramFile)
    • wasHistogramRead

      public boolean wasHistogramRead()
    • setHistogramRead

      public void setHistogramRead(boolean histogramRead)
    • setIndependentWalkers

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

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

      public boolean independentWrite()
      Returns the value of independentWrite.
      Returns:
      independentWrite.
    • 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)
      Set the bias magnitude. If temperingOffset has not been explicitly set, the temperOffset is set to bias magnitude * 20.
      Parameters:
      biasMag - Gaussian bias magnitude in kcal/mol
    • setTemperingFactor

      public void setTemperingFactor(double temperingFactor)
    • setMetaDynamics

      public void setMetaDynamics(boolean metaDynamics)
    • getLambdaBinWidth

      public double getLambdaBinWidth()
    • getLambdaBins

      public int getLambdaBins()
    • getDUDLBins

      public int getDUDLBins()
    • setLambdaBinWidth

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

      public void setdUdLBinWidth(double dUdLBinWidth)
    • getTemperingOffset

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

      public void setTemperingOffset(double temperingOffset)
      Sets an explicit tempering offset in kcal/mol.
      Parameters:
      temperingOffset - Tempering offset in kcal/mol.
    • setAsynchronous

      public void setAsynchronous(boolean asynchronous)
    • resetHistogramAtLambda

      public double resetHistogramAtLambda()
    • setResetHistogramAtLambda

      public void setResetHistogramAtLambda(double resetHistogramAtLambda)
      Set the lambda value at which to reset the histogram.
      Parameters:
      resetHistogramAtLambda - The lambda value at which to reset the histogram.
    • setDiscreteLambda

      public void setDiscreteLambda(boolean discreteLambda)
    • applyProperties

      public void applyProperties(org.apache.commons.configuration2.CompositeConfiguration properties)
    • toString

      public String toString()
      Overrides:
      toString in class Object