Package ffx.algorithms.thermodynamics
Class HistogramData
java.lang.Object
ffx.algorithms.thermodynamics.HistogramData
-
Field Summary
FieldsModifier and TypeFieldDescriptionintThe number of hills added to the recursion kernel.intIt 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.doubleHalf the width of the F_lambda bin.doubleThe maximum value of the last dUdL bin.doubleThe variance for the Gaussian bias in the dU/dL dimension.intFor continuous lambda: The first Lambda bin is centered on 0.0 (-0.0025 to 0.0025).doubleHalf the width of a lambda bin, or zero for discrete lambda values.double[]Either the discrete lambda values used, or null (continuous lambda).doubleThe variance for the Gaussian bias in the lambda dimension.doubleThe minimum value of the first lambda bin. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyProperties(org.apache.commons.configuration2.CompositeConfiguration properties) doubleGets the Gaussian bias magnitude in kcal/mol.intintdoubledoubleGets the tempering offset.booleanReturns the value of independentWrite.static HistogramDatareadHistogram(File file) Unmarshall the histogram data.doublevoidsetAsynchronous(boolean asynchronous) voidsetBiasMag(double biasMag) Set the bias magnitude.voidsetCountInterval(int countInterval) voidsetDiscreteLambda(boolean discreteLambda) voidsetdUdLBinWidth(double dUdLBinWidth) voidsetHistogramFile(File histogramFile) voidsetHistogramRead(boolean histogramRead) voidsetIndependentWalkers(boolean independentWalkers) Sets the value of independentWalkers; if true, it also sets writeIndependent to true.voidsetLambdaBinWidth(double lambdaBinWidth) Sets lambdaBinWidth; if an invalid value is provided (not 0-1), resets it to default 0.005.voidsetMetaDynamics(boolean metaDynamics) voidsetResetHistogramAtLambda(double resetHistogramAtLambda) Set the lambda value at which to reset the histogram.voidsetTemperingFactor(double temperingFactor) voidsetTemperingOffset(double temperingOffset) Sets an explicit tempering offset in kcal/mol.voidsetWriteIndependent(boolean independentWrite) Sets the value of writeIndependent.toString()booleanvoidMarshall this histogram data to a file.static voidwriteHistogram(HistogramData histogramData, File file) Marshall the histogram data to a file.
-
Field Details
-
dUdLBins
public int dUdLBinsIt 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 countsThe number of hills added to the recursion kernel. -
lambdaBins
public int lambdaBinsFor 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_2Half the width of a lambda bin, or zero for discrete lambda values. -
minLambda
public double minLambdaThe minimum value of the first lambda bin.minLambda = -dL_2 for continuous lambda.
minLambda = 0 for discrete lambda.
-
lambdaLadder
public double[] lambdaLadderEither the discrete lambda values used, or null (continuous lambda). -
lambdaVariance
public double lambdaVarianceThe variance for the Gaussian bias in the lambda dimension. lambdaVariance = 2.0 * dL * 2.0 * dL; -
dUdLMaximum
public double dUdLMaximumThe 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_2Half the width of the F_lambda bin. -
dUdLVariance
public double dUdLVarianceThe 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
Marshall the histogram data to a file.- Parameters:
histogramData- The Histogram data.file- The file to write to.
-
readHistogram
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
-
getHistogramFile
-
setHistogramFile
-
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
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
-