Class BennettAcceptanceRatio

java.lang.Object
ffx.numerics.estimator.SequentialEstimator
ffx.numerics.estimator.BennettAcceptanceRatio
All Implemented Interfaces:
BootstrappableEstimator, StatisticalEstimator

public class BennettAcceptanceRatio extends SequentialEstimator implements BootstrappableEstimator
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
  • 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.
  • Method Details

    • getInitialBackwardsGuess

      public Zwanzig 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 interface BootstrappableEstimator
    • getInitialForwardsGuess

      public Zwanzig getInitialForwardsGuess()
      Returns the forwards Zwanzig estimator used to seed BAR.
      Returns:
      A forwards Zwanzig estimator.
    • copyEstimator

      public BennettAcceptanceRatio 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 interface BootstrappableEstimator
      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 interface BootstrappableEstimator
      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 interface StatisticalEstimator
      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 interface StatisticalEstimator
      Returns:
      Individual bin/window uncertainties.
    • getFreeEnergy

      public double getFreeEnergy()
      Returns the estimated free energy (usually in kcal/mol).
      Specified by:
      getFreeEnergy in interface StatisticalEstimator
      Returns:
      Free energy estimate.
    • getUncertainty

      public double getUncertainty()
      Returns the uncertainty in the free energy estimate.
      Specified by:
      getUncertainty in interface StatisticalEstimator
      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 interface StatisticalEstimator
      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 interface StatisticalEstimator
      Returns:
      Individual bin/window enthalpy.