openmmslicer.sampling_metrics module¶
This module contains the EnergyCorrelation
metric, which can be used for
adaptively determining the number of decorrelation steps at each SMC iteration.
- class openmmslicer.sampling_metrics.EnergyCorrelation(ensemble)¶
Bases:
object
A sampling metric which determines the energy autocorrelation time and stops sampling after enough decorrelation.
- Parameters
ensemble (slicer.smc.SequentialSampler) – A sampler, containing all of the information of the system.
- ensemble¶
The associated SMC sampler.
- Type
slicer.smc.SequentialSampler
- E_before¶
A list of all reduced initial potential energies for each walker.
- Type
[float]
- E_after¶
A list of all reduced current potential energies for each walker.
- Type
[float]
- evaluateAfter()¶
Evaluates the energies at the current timestep.
- evaluateBefore()¶
Evaluates the energies immediately after resampling.
- property max¶
The maximum value of the metric. Default is 0.1.
- Type
float
- property metric¶
The energy autocorrelation coefficient.
- Type
float
- property min¶
The minimum value of the metric. Default is -0.1.
- Type
float
- property requireNextLambda¶
Whether a potentially expensive calculation of the next lambda value is needed.
- Type
bool
- reset()¶
Resets the sampling metric.
- serialise()¶
- property terminateSampling¶
Whether the metric is within the desired bounds.
- Type
bool