Package ffx.algorithms.thermodynamics
Class HistogramSettings
java.lang.Object
ffx.algorithms.thermodynamics.HistogramSettings
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 Summary
Modifier and TypeFieldDescriptionboolean
Flag to indicate if OST should send and receive counts between processes synchronously or asynchronously.int
Interval between adding a count to the Recursion kernel in MD steps.final boolean
If true, use discrete lambda values instead of continuous lambda values.double
Time step in picoseconds.double
Temperature in Kelvin.double
The Dama et al.double
Reasonable thetaFriction is ~60 per picosecond (1.0e-12).double
Reasonable thetaMass is ~100 a.m.u. -
Constructor Summary
ConstructorDescriptionHistogramSettings
(File hisFile, String lamFileName, org.apache.commons.configuration2.CompositeConfiguration properties) HistogramSettings
(File hisFile, String lamFileName, org.apache.commons.configuration2.CompositeConfiguration properties, boolean discreteLambda) -
Method Summary
Modifier and TypeMethodDescriptiondouble
Gets the Gaussian bias magnitude in kcal/mol.double
getDL()
double
double
Gets the tempering offset.boolean
Returns the value of independentWalkers.boolean
Returns the value of metaDynamics.boolean
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.void
setDL
(double dLambda) Sets dLambda; if an invalid value is provided (not 0-1), resets it to default 0.005.void
setDL
(int lambdaBins) Sets dL based on a provided number of lambda bins.void
setIndependentWalkers
(boolean iw) Sets the value of independentWalkers; if true, it also sets writeIndependent to true.void
setLambdaResetValue
(double lambdaResetValue) void
setMetaDynamics
(boolean metaDynamics) void
setTemperOffset
(double temperingOffset) Sets the tempering offset in kcal/mol.void
setWriteIndependent
(boolean wi) Sets the value of writeIndependent.boolean
Returns the value of writeIndependent.
-
Field Details
-
discreteLambda
public final boolean discreteLambdaIf 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 temperatureTemperature in Kelvin.The default is 298.15.
-
temperingFactor
public double temperingFactorThe 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 dtTime step in picoseconds. -
thetaFriction
public double thetaFrictionReasonable thetaFriction is ~60 per picosecond (1.0e-12). -
thetaMass
public double thetaMassReasonable thetaMass is ~100 a.m.u. (100 a.m.u is 1.6605e-22 grams). -
countInterval
public int countIntervalInterval between adding a count to the Recursion kernel in MD steps.The default countInterval = 10.
-
asynchronous
public boolean asynchronousFlag 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
-
getHistogramFile
-
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
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.
-