Class BennettAcceptanceRatio
- All Implemented Interfaces:
BootstrappableEstimator,StatisticalEstimator
Literature References (from Tinker): C. H. Bennett, "Efficient Estimation of Free Energy Differences from Monte Carlo Data", Journal of Computational Physics, 22, 245-268 (1976)
M. A. Wyczalkowski, A. Vitalis and R. V. Pappu, "New Estimators for Calculating Solvation Entropy and Enthalpy and Comparative Assessments of Their Accuracy and Precision, Journal of Physical Chemistry, 114, 8166-8180 (2010) [modified BAR algorithm, non-implemented entropy/enthalpy]
K. B. Daly, J. B. Benziger, P. G. Debenedetti and A. Z. Panagiotopoulos, "Massively Parallel Chemical Potential Calculation on Graphics Processing Units", Computer Physics Communications, 183, 2054-2062 (2012) [non-implemented NPT modification]
- Since:
- 1.0
- Author:
- Michael J. Schnieders, Jacob M. Litman
-
Field Summary
Fields inherited from class ffx.numerics.estimator.SequentialEstimator
eAll, eAllFlat, eLambda, eLambdaMinusdL, eLambdaPlusdL, lamValues, nSamples, nStates, temperatures -
Constructor Summary
ConstructorsConstructorDescriptionBennettAcceptanceRatio(double[] lambdaValues, double[][] eLambdaMinusdL, double[][] eLambda, double[][] eLambdaPlusdL, double[] temperature) Constructs a BAR estimator and obtains an initial free energy estimate.BennettAcceptanceRatio(double[] lambdaValues, double[][] eLambdaMinusdL, double[][] eLambda, double[][] eLambdaPlusdL, double[] temperature, double tolerance) Constructs a BAR estimator and obtains an initial free energy estimate.BennettAcceptanceRatio(double[] lambdaValues, double[][] eLambdaMinusdL, double[][] eLambda, double[][] eLambdaPlusdL, double[] temperature, double tolerance, int nIterations) Constructs a BAR estimator and obtains an initial free energy estimate. -
Method Summary
Modifier and TypeMethodDescriptionReturn a copy of this Estimator.final voidestimateDG(boolean randomSamples) Main driver for estimation of BAR free energy differences.double[]Gets the enthalpy change between each pair of states.double[]Gets the uncertainty in free energy difference between each pair of states.double[]Gets the free energy difference between each pair of states.Returns the backwards Zwanzig estimator used to seed BAR.Returns the forwards Zwanzig estimator used to seed BAR.intReturns the number of windows (BAR, etc), bins (WHAM, etc), or other sub-values used to compute the total free energy difference.doubleGets the total enthalpy difference between the first and last state.doubleReturns the total uncertainty in the computed free energy difference between the first and last state.doubleReturns the total free energy difference between the first and last state.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ffx.numerics.estimator.BootstrappableEstimator
estimateDG, getTotalEnthalpyDifference, getTotalEnthalpyUncertainty, getTotalFEDifferenceUncertainty, getTotalFreeEnergyDifference
-
Constructor Details
-
BennettAcceptanceRatio
public BennettAcceptanceRatio(double[] lambdaValues, double[][] eLambdaMinusdL, double[][] eLambda, double[][] eLambdaPlusdL, double[] temperature) Constructs a BAR estimator and obtains an initial free energy estimate.- Parameters:
lambdaValues- Value of lambda for each state.eLambdaMinusdL- Energies of state L samples at L+dL.eLambda- Energies of state L samples at L.eLambdaPlusdL- Energies of state L samples at L+dL.temperature- Temperature of each state.
-
BennettAcceptanceRatio
public BennettAcceptanceRatio(double[] lambdaValues, double[][] eLambdaMinusdL, double[][] eLambda, double[][] eLambdaPlusdL, double[] temperature, double tolerance) Constructs a BAR estimator and obtains an initial free energy estimate.- Parameters:
lambdaValues- Value of lambda for each state.eLambdaMinusdL- Energies of state L samples at L+dL.eLambda- Energies of state L samples at L.eLambdaPlusdL- Energies of state L samples at L+dL.temperature- Temperature of each state.tolerance- Convergence criterion in kcal/mol for BAR iteration.
-
BennettAcceptanceRatio
public BennettAcceptanceRatio(double[] lambdaValues, double[][] eLambdaMinusdL, double[][] eLambda, double[][] eLambdaPlusdL, double[] temperature, double tolerance, int nIterations) Constructs a BAR estimator and obtains an initial free energy estimate.- Parameters:
lambdaValues- Value of lambda for each state.eLambdaMinusdL- Energies of state L samples at L+dL.eLambda- Energies of state L samples at L.eLambdaPlusdL- Energies of state L samples at L+dL.temperature- Temperature of each state.tolerance- Convergence criterion in kcal/mol for BAR iteration.nIterations- Maximum number of iterations for BAR.
-
-
Method Details
-
getInitialBackwardsGuess
Returns the backwards Zwanzig estimator used to seed BAR.- Returns:
- A backwards Zwanzig estimator.
-
getInitialForwardsGuess
Returns the forwards Zwanzig estimator used to seed BAR.- Returns:
- A forwards Zwanzig estimator.
-
copyEstimator
Return a copy of this Estimator. Each implementation should specify its own type as the return type. Intended to make parallelization of bootstrapping easy.- Specified by:
copyEstimatorin interfaceBootstrappableEstimator- Returns:
- A copy of this Estimator.
-
estimateDG
public final void estimateDG(boolean randomSamples) Main driver for estimation of BAR free energy differences.Based on Tinker implementation, which uses the substitution proposed in Wyczalkowski, Vitalis and Pappu 2010.
- Specified by:
estimateDGin interfaceBootstrappableEstimator- Parameters:
randomSamples- Whether to use random sampling (for bootstrap analysis).
-
getFreeEnergyDifferences
public double[] getFreeEnergyDifferences()Gets the free energy difference between each pair of states.- Specified by:
getFreeEnergyDifferencesin interfaceStatisticalEstimator- Returns:
- Array of free energy differences between states.
-
getFEDifferenceUncertainties
public double[] getFEDifferenceUncertainties()Gets the uncertainty in free energy difference between each pair of states.- Specified by:
getFEDifferenceUncertaintiesin interfaceStatisticalEstimator- Returns:
- Array of uncertainties in the free energy differences.
-
getTotalFreeEnergyDifference
public double getTotalFreeEnergyDifference()Returns the total free energy difference between the first and last state.- Specified by:
getTotalFreeEnergyDifferencein interfaceStatisticalEstimator- Returns:
- Total free energy difference estimate.
-
getTotalFEDifferenceUncertainty
public double getTotalFEDifferenceUncertainty()Returns the total uncertainty in the computed free energy difference between the first and last state.- Specified by:
getTotalFEDifferenceUncertaintyin interfaceStatisticalEstimator- Returns:
- Total uncertainty in the free energy difference.
-
getNumberOfBins
public int getNumberOfBins()Returns the number of windows (BAR, etc), bins (WHAM, etc), or other sub-values used to compute the total free energy difference.- Specified by:
getNumberOfBinsin interfaceStatisticalEstimator- Returns:
- Total number of windows used to compute the total free energy difference.
-
getTotalEnthalpyDifference
public double getTotalEnthalpyDifference()Gets the total enthalpy difference between the first and last state.- Specified by:
getTotalEnthalpyDifferencein interfaceStatisticalEstimator- Returns:
- The enthalpy difference between each pair of states.
-
getEnthalpyDifferences
public double[] getEnthalpyDifferences()Gets the enthalpy change between each pair of states.- Specified by:
getEnthalpyDifferencesin interfaceStatisticalEstimator- Returns:
- The enthalpy difference between each pair of states.
-