Class SequentialEstimator
- All Implemented Interfaces:
StatisticalEstimator
- Direct Known Subclasses:
BennettAcceptanceRatio
,MultistateBennettAcceptanceRatio
,Zwanzig
- Since:
- 1.0
- Author:
- Michael J. Schnieders, Jacob M. Litman, Matthew J. Speranza
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final double[][][]
The potential energies of the snapshots at all other lambda values.protected double[][]
The potential energies of the snapshots at all other lambda values.protected final double[][]
The potential energy of each snapshot at lambda.protected final double[][]
The potential energy of each snapshot at lambda - dL.protected final double[][]
The potential energy of each snapshot at lambda + dL.protected final double[]
The lambda values at which the samples were collected.protected int[]
The number of samples for each lambda state.protected final int
The number of states from which samples were collected.protected final double[]
The temperatures at which the samples were collected. -
Constructor Summary
ConstructorsConstructorDescriptionSequentialEstimator
(double[] lambdaValues, double[][][] energiesAll, double[] temperature) The SequentialEstimator constructor largely just copies its parameters into local variables.SequentialEstimator
(double[] lambdaValues, double[][] eLambdaMinusdL, double[][] eLambda, double[][] eLambdaPlusdL, double[] temperature) The SequentialEstimator constructor largely just copies its parameters into local variables.SequentialEstimator
(double[] lambdaValues, int[] nSamples, 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). -
Method Summary
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.StatisticalEstimator
getEnthalpyDifferences, getFEDifferenceUncertainties, getFreeEnergyDifferences, getNumberOfBins, getTotalEnthalpyDifference, getTotalFEDifferenceUncertainty, getTotalFreeEnergyDifference
-
Field Details
-
lamValues
protected final double[] lamValuesThe lambda values at which the samples were collected. -
nStates
protected final int nStatesThe number of states from which samples were collected. -
eLambdaMinusdL
protected final double[][] eLambdaMinusdLThe potential energy of each snapshot at lambda - dL. -
eLambda
protected final double[][] eLambdaThe potential energy of each snapshot at lambda. -
eLambdaPlusdL
protected final double[][] eLambdaPlusdLThe potential energy of each snapshot at lambda + dL. -
eAll
protected final double[][][] eAllThe potential energies of the snapshots at all other lambda values.eAll[lambdaWindow][perturbations][energies]
-
eAllFlat
protected double[][] eAllFlatThe potential energies of the snapshots at all other lambda values.eAllFlat[lambda][evaluationsAtThisLambdaFromAllOtherLambda]
-
nSamples
protected int[] nSamplesThe number of samples for each lambda state. -
temperatures
protected final double[] temperaturesThe temperatures at which the samples were collected.
-
-
Constructor Details
-
SequentialEstimator
public SequentialEstimator(double[] lambdaValues, double[][] eLambdaMinusdL, double[][] eLambda, double[][] eLambdaPlusdL, 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. The second dimension (can be of uneven length) corresponds to potential energies of snapshots sampled at that lambda value, calculated either at that lambda value, the lambda value below, or the lambda value above. The arrays eLambdaMindL[0] and eLambdaPlusdL[n-1] is expected to be all NaN.
- Parameters:
lambdaValues
- Values of lambda for sampled states.eLambdaMinusdL
- Potential energies of state L at L-dL.eLambda
- Potential energies of state L at L.eLambdaPlusdL
- Potential energies of state L at L+dL.temperature
- Temperature each state (single-element for a constant temperature).
-
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 of each sample at all other lambdas. (Missing states are NaN)temperature
- Temperature each state (single-element for a constant temperature).
-
SequentialEstimator
public SequentialEstimator(double[] lambdaValues, int[] nSamples, 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.nSamples
- Number of samples for each state.eAllFlat
- Flattened energy evaluations at all lambda values.temperature
- Temperature each state (single-element for a constant temperature).
-