Package ffx.numerics.estimator
Class BennettAcceptanceRatio
java.lang.Object
ffx.numerics.estimator.SequentialEstimator
ffx.numerics.estimator.BennettAcceptanceRatio
- All Implemented Interfaces:
BootstrappableEstimator
,StatisticalEstimator
The Bennett Acceptance Ratio class implements the Bennett Acceptance Ratio (BAR) statistical
estimator, based on the Tinker implementation.
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, eAt, eHigh, eLow, lamValues, nTrajectories, snaps, temperatures
-
Constructor Summary
ConstructorDescriptionBennettAcceptanceRatio
(double[] lambdaValues, double[][] energiesLow, double[][] energiesAt, double[][] energiesHigh, double[] temperature) Constructs a BAR estimator and obtains an initial free energy estimate.BennettAcceptanceRatio
(double[] lambdaValues, double[][] energiesLow, double[][] energiesAt, double[][] energiesHigh, double[] temperature, double tolerance) Constructs a BAR estimator and obtains an initial free energy estimate.BennettAcceptanceRatio
(double[] lambdaValues, double[][] energiesLow, double[][] energiesAt, double[][] energiesHigh, 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 void
Main driver for estimation of delta-G.final void
estimateDG
(boolean randomSamples) Main driver for estimation of delta-G.double[]
Gets the free energy change per bin/window.double[]
Gets the enthalpy per bin/window.double[]
Gets the uncertainty in free energy associated with each bin/window.double
Returns the estimated free energy (usually in kcal/mol).Returns the backwards Zwanzig estimator used to seed BAR.Returns the forwards Zwanzig estimator used to seed BAR.double
Returns the uncertainty in the free energy estimate.int
Returns the number of windows (BAR, etc), bins (WHAM, etc), or other sub-values used to compute free energy.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ffx.numerics.estimator.BootstrappableEstimator
sumBootstrapEnthalpyUncertainty, sumBootstrapResults, sumBootstrapUncertainty, sumEnthalpyBootstrapResults
-
Constructor Details
-
BennettAcceptanceRatio
public BennettAcceptanceRatio(double[] lambdaValues, double[][] energiesLow, double[][] energiesAt, double[][] energiesHigh, double[] temperature) Constructs a BAR estimator and obtains an initial free energy estimate.- Parameters:
lambdaValues
- Values of lambda used.energiesLow
- Energies of trajectory i at lambda (i-1).energiesAt
- Energies of trajectory i at lambda i.energiesHigh
- Energies of trajectory i at lambda (i+1).temperature
- Temperature of each trajectory.
-
BennettAcceptanceRatio
public BennettAcceptanceRatio(double[] lambdaValues, double[][] energiesLow, double[][] energiesAt, double[][] energiesHigh, double[] temperature, double tolerance) Constructs a BAR estimator and obtains an initial free energy estimate.- Parameters:
lambdaValues
- Values of lambda used.energiesLow
- Energies of trajectory i at lambda (i-1).energiesAt
- Energies of trajectory i at lambda i.energiesHigh
- Energies of trajectory i at lambda (i+1).temperature
- Temperature of each trajectory.tolerance
- Convergence criterion in kcal/mol for BAR iteration.
-
BennettAcceptanceRatio
public BennettAcceptanceRatio(double[] lambdaValues, double[][] energiesLow, double[][] energiesAt, double[][] energiesHigh, double[] temperature, double tolerance, int nIterations) Constructs a BAR estimator and obtains an initial free energy estimate.- Parameters:
lambdaValues
- Values of lambda used.energiesLow
- Energies of trajectory i at lambda (i-1).energiesAt
- Energies of trajectory i at lambda i.energiesHigh
- Energies of trajectory i at lambda (i+1).temperature
- Temperature of each trajectory.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.
-
estimateDG
public final void estimateDG()Main driver for estimation of delta-G. Based on Tinker implementation, which uses the substitution proposed in Wyczalkowski, Vitalis and Pappu 2010.- Specified by:
estimateDG
in interfaceBootstrappableEstimator
-
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:
copyEstimator
in interfaceBootstrappableEstimator
- Returns:
- A copy of this Estimator.
-
estimateDG
public final void estimateDG(boolean randomSamples) Main driver for estimation of delta-G. Based on Tinker implementation, which uses the substitution proposed in Wyczalkowski, Vitalis and Pappu 2010.- Specified by:
estimateDG
in interfaceBootstrappableEstimator
- Parameters:
randomSamples
- Whether to use random sampling (for bootstrap analysis).
-
getBinEnergies
public double[] getBinEnergies()Gets the free energy change per bin/window.- Specified by:
getBinEnergies
in interfaceStatisticalEstimator
- Returns:
- Individual bin/window free energy changes.
-
getBinUncertainties
public double[] getBinUncertainties()Gets the uncertainty in free energy associated with each bin/window.- Specified by:
getBinUncertainties
in interfaceStatisticalEstimator
- Returns:
- Individual bin/window uncertainties.
-
getFreeEnergy
public double getFreeEnergy()Returns the estimated free energy (usually in kcal/mol).- Specified by:
getFreeEnergy
in interfaceStatisticalEstimator
- Returns:
- Free energy estimate.
-
getUncertainty
public double getUncertainty()Returns the uncertainty in the free energy estimate.- Specified by:
getUncertainty
in interfaceStatisticalEstimator
- Returns:
- Uncertainty in the free energy estimate.
-
numberOfBins
public int numberOfBins()Returns the number of windows (BAR, etc), bins (WHAM, etc), or other sub-values used to compute free energy.- Specified by:
numberOfBins
in interfaceStatisticalEstimator
- Returns:
- Total number of sub-values used to compute free energy.
-
getBinEnthalpies
public double[] getBinEnthalpies()Gets the enthalpy per bin/window.- Specified by:
getBinEnthalpies
in interfaceStatisticalEstimator
- Returns:
- Individual bin/window enthalpy.
-