Package ffx.algorithms.thermodynamics
Class HistogramData
java.lang.Object
ffx.algorithms.thermodynamics.HistogramData
-
Field Summary
Modifier and TypeFieldDescriptionint
The number of hills added to the recursion kernel.int
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.double
Half the width of the F_lambda bin.double
The maximum value of the last dUdL bin.double
The variance for the Gaussian bias in the dU/dL dimension.int
For continuous lambda: The first Lambda bin is centered on 0.0 (-0.0025 to 0.0025).double
Half the width of a lambda bin, or zero for discrete lambda values.double[]
Either the discrete lambda values used, or null (continuous lambda).double
The variance for the Gaussian bias in the lambda dimension.double
The minimum value of the first lambda bin. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyProperties
(org.apache.commons.configuration2.CompositeConfiguration properties) double
Gets the Gaussian bias magnitude in kcal/mol.int
int
double
double
Gets the tempering offset.boolean
Returns the value of independentWrite.static HistogramData
readHistogram
(File file) Unmarshall the histogram data.double
void
setAsynchronous
(boolean asynchronous) void
setBiasMag
(double biasMag) Set the bias magnitude.void
setCountInterval
(int countInterval) void
setDiscreteLambda
(boolean discreteLambda) void
setdUdLBinWidth
(double dUdLBinWidth) void
setHistogramFile
(File histogramFile) void
setHistogramRead
(boolean histogramRead) void
setIndependentWalkers
(boolean independentWalkers) Sets the value of independentWalkers; if true, it also sets writeIndependent to true.void
setLambdaBinWidth
(double lambdaBinWidth) Sets lambdaBinWidth; if an invalid value is provided (not 0-1), resets it to default 0.005.void
setMetaDynamics
(boolean metaDynamics) void
setResetHistogramAtLambda
(double resetHistogramAtLambda) Set the lambda value at which to reset the histogram.void
setTemperingFactor
(double temperingFactor) void
setTemperingOffset
(double temperingOffset) Sets an explicit tempering offset in kcal/mol.void
setWriteIndependent
(boolean independentWrite) Sets the value of writeIndependent.toString()
boolean
void
Marshall this histogram data to a file.static void
writeHistogram
(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
-