Class EstimateBootstrapper

java.lang.Object
ffx.numerics.estimator.EstimateBootstrapper

public class EstimateBootstrapper extends Object
Bootstrap Free Energy Estimate.
  • Constructor Details

    • EstimateBootstrapper

      public EstimateBootstrapper(BootstrappableEstimator estimator)
      Constructor.
      Parameters:
      estimator - Estimator to bootstrap.
  • Method Details

    • getBootstrapIndices

      public static int[] getBootstrapIndices(int length)
      Gets randomized bootstrap indices; ensures there are at least two distinct indices.
      Parameters:
      length - Number of random indices to generate in range [0,length)
      Returns:
      Randomized indices.
    • getBootstrapIndices

      public static int[] getBootstrapIndices(int length, Random random)
      Gets randomized bootstrap indices; ensures there are at least two distinct indices.
      Parameters:
      length - Number of random indices to generate in range [0,length)
      random - Source of randomness.
      Returns:
      Randomized indices.
    • getBootstrapIndices

      public static int[] getBootstrapIndices(int length, Random random, int minDistinct)
      Gets randomized bootstrap indices; ensures there are at least a few distinct indices.
      Parameters:
      length - Number of random indices to generate in range [0,length)
      random - Source of randomness.
      minDistinct - Minimum number of distinct indices.
      Returns:
      Randomized indices.
    • getEnthalpyResults

      public SummaryStatistics[] getEnthalpyResults()
      Get bootstrap Enthalpy results for each window.
      Returns:
      Bootstrap Enthalpy results for each window.
    • bootstrap

      public void bootstrap(long trials)
      Perform bootstrap analysis.
      Parameters:
      trials - Number of trials.
    • bootstrap

      public void bootstrap(long trials, long logInterval)
      Perform bootstrap analysis.
      Parameters:
      trials - Number of trials.
      logInterval - Interval between logging statements.
    • getTotalFreeEnergyDifference

      public double getTotalFreeEnergyDifference()
      Get the total free energy difference estimate from bootstrap analysis.
      Returns:
      The total free energy difference estimate.
    • getTotalEnthalpyChange

      public double getTotalEnthalpyChange()
      Get the total enthalpy estimate from bootstrap analysis.
      Returns:
      The total enthalpy estimate.
    • getTotalEntropyChange

      public double getTotalEntropyChange()
      Get the total entropy change (-TdS) from bootstrap analysis.
      Returns:
      The total entropy change (-TdS).
    • getFreeEnergyDifferences

      public double[] getFreeEnergyDifferences()
      Get bootstrap free energy estimate for each window.

      getFreeEnergyDifferences

      Returns:
      Return the bootstrap free energy difference estimate for each window.
    • getEnthalpyChanges

      public double[] getEnthalpyChanges()
      Get bootstrap enthalpy estimate for each window.
      Returns:
      Return the bootstrap enthalpy estimate for each window.
    • getEntropyChanges

      public double[] getEntropyChanges()
      Get bootstrap entropy estimate for each window (-TdS).
      Returns:
      Return the bootstrap entropy estimate (-TdS) for each window.
    • getTotalFEDifferenceUncertainty

      public double getTotalFEDifferenceUncertainty()
      Get the total free energy difference uncertainty estimate from bootstrap analysis.
      Returns:
      The total free energy difference uncertainty estimate.
    • getTotalEnthalpyUncertainty

      public double getTotalEnthalpyUncertainty()
      Get the total enthalpy uncertainty estimate from bootstrap analysis.
      Returns:
      The total enthalpy uncertainty estimate.
    • getTotalEntropyUncertainty

      public double getTotalEntropyUncertainty()
      Get the total entropy uncertainty estimate from bootstrap analysis. This is computed as the sqrt of the sum of the free energy and enthalpy variances.
      Returns:
      The total enthalpy uncertainty estimate.
    • getFEDifferenceStdDevs

      public double[] getFEDifferenceStdDevs()
      Get the free energy difference uncertainties (standard deviations) from bootstrap analysis for each window.
      Returns:
      Returns free energy difference standard deviation estimate for each window.
    • getEnthalpyStdDevs

      public double[] getEnthalpyStdDevs()
      Get the enthalpy standard deviation estimate from bootstrap analysis for each window.
      Returns:
      Returns enthalpy standard deviation estimate for each window.
    • getEntropyStdDevs

      public double[] getEntropyStdDevs()
      Get the entropy standard deviation estimate from bootstrap analysis for each window.

      This is computed as the sqrt of the sum of the free energy and enthalpy variances for each window.

      Returns:
      Returns enthalpy standard deviation estimate for each window.
    • getTotalFreeEnergyDifference

      public double getTotalFreeEnergyDifference(double[] freeEnergyDifferences)
      Get the total free energy difference estimate from per window bootstrap analysis.
      Parameters:
      freeEnergyDifferences - The free energy difference estimate for each window.
      Returns:
      The total free energy difference estimate from bootstrap analysis.
    • getFEDifferenceVariances

      public double[] getFEDifferenceVariances()
      Get the free energy difference variance estimate from bootstrap analysis for each window.
      Returns:
      Returns free energy difference variance estimate for each window.
    • getTotalFEDifferenceUncertainty

      public double getTotalFEDifferenceUncertainty(double[] variances)
      Get the total free energy difference uncertainty estimate from per window bootstrap analysis.
      Parameters:
      variances - The free energy difference variance estimate (not uncertainty) for each window.
      Returns:
      The total free energy difference uncertainty from bootstrap analysis.
    • getTotalEnthalpyChange

      public double getTotalEnthalpyChange(double[] enthalpyChanges)
      Get the total enthalpy estimate from per window bootstrap analysis.
      Parameters:
      enthalpyChanges - The enthalpy estimate for each window.
      Returns:
      The total enthalpy difference estimate from bootstrap analysis.
    • getTotalEnthalpyUncertainty

      public double getTotalEnthalpyUncertainty(double[] variances)
      Get the total enthalpy uncertainty estimate from per window bootstrap analysis.
      Parameters:
      variances - The enthalpy variance estimate (not uncertainty) for each window.
      Returns:
      The total enthalpy uncertainty estimate from bootstrap analysis.
    • getEnthalpyVariances

      public double[] getEnthalpyVariances()
      Get the enthalpy variance estimate from bootstrap analysis for each window.
      Returns:
      Returns enthalpy variance estimate for each window.