Class SequentialEstimator

java.lang.Object
ffx.numerics.estimator.SequentialEstimator
All Implemented Interfaces:
StatisticalEstimator
Direct Known Subclasses:
BennettAcceptanceRatio, MultistateBennettAcceptanceRatio, Zwanzig

public abstract class SequentialEstimator extends Object implements StatisticalEstimator
The SequentialEstimator abstract class defines a statistical estimator based on perturbative potential energy differences between adjacent windows (e.g. exponential free energy perturbation, Bennett Acceptance Ratio, etc).
Since:
1.0
Author:
Michael J. Schnieders, Jacob M. Litman, Matthew J. Speranza
  • Field Details

    • lamValues

      protected final double[] lamValues
    • eLow

      protected final double[][] eLow
    • eAt

      protected final double[][] eAt
    • eHigh

      protected final double[][] eHigh
    • eAll

      protected final double[][][] eAll
    • eAllFlat

      protected double[][] eAllFlat
    • snaps

      protected int[] snaps
      The number of snaps in each lambda trajectory file.
    • temperatures

      protected final double[] temperatures
    • nTrajectories

      protected final int nTrajectories
  • Constructor Details

    • SequentialEstimator

      public SequentialEstimator(double[] lambdaValues, double[][] energiesLow, double[][] energiesAt, double[][] energiesHigh, double[] temperature)
      The SequentialEstimator constructor largely just copies its parameters into local variables. Most arrays are duplicated (rather a just copying their reference). The temperature array can be of length 1 if all elements are meant to be the same temperature.

      The first dimension of the energies arrays corresponds to the lambda values/windows. The second dimension (can be of uneven length) corresponds to potential energies of snapshots sampled from that lambda value, calculated either at that lambda value, the lambda value below, or the lambda value above. The arrays energiesLow[0] and energiesHigh[n-1] is expected to be all NaN.

      Parameters:
      lambdaValues - Values of lambda dynamics was run at.
      energiesLow - Potential energies of trajectory L at lambda L-dL.
      energiesAt - Potential energies of trajectory L at lambda L.
      energiesHigh - Potential energies of trajectory L at lambda L+dL.
      temperature - Temperature each lambda window was run at (single-element indicates identical temperatures).
    • SequentialEstimator

      public SequentialEstimator(double[] lambdaValues, double[][][] energiesAll, double[] temperature)
      The SequentialEstimator constructor largely just copies its parameters into local variables. Most arrays are duplicated (rather a just copying their reference). The temperature array can be of length 1 if all elements are meant to be the same temperature.

      This constructor is meant for lower variance estimators such as MBAR and WHAM. These methods require energy evaluations from all lambda windows at all lambda values. The energiesAll array is expected to be of the form energiesAll[lambdaWindow][windowPerspective][lambdaWindowSnapshotPerspectiveEnergy]. As an example, at the 3rd lambda window, the energiesAll[2] array should contain the energies of all the snapshots from the 3rd lambda window evaluated at all lambda values. energiesAll[2][3] is a list of all snapshots from lambda 3 evaluated with the potential of lambda 4. energiesAll[2][3][4] is the 5th snapshot from lambda 3 evaluated with the potential of lambda 4.

      This constructor also breaks energiesAll into a flattened array (across the second dimension) such that the first dimension is the lambda window where the energy was evaluated and the second dimension is the snaps. energiesAll is also broken down into eAt, eLow, and eHigh arrays for convenience and so that BAR calculations can be performed and compared.

      Parameters:
      lambdaValues - Values of lambda dynamics was run at.
      energiesAll - Potential energy snaps of trajectories at all other lambdas. (Missing states are NaN)
      temperature - Temperature each lambda window was run at (single-element indicates identical temperatures).
    • SequentialEstimator

      public SequentialEstimator(double[] lambdaValues, int[] snaps, double[][] eAllFlat, double[] temperature)
      Simpler constructor for when data provided is already flattened (although it adds uncertainty about snap counts, they are all set to the same number).
      Parameters:
      lambdaValues - Lambda values.
      snaps - Number of snapshots in each lambda window.
      eAllFlat - Flattened energy evaluations at all lambda values.
      temperature - Temperature each lambda window was run at (a single-element indicates identical temperatures).