Estimator#

class cinnabar.estimators.Estimator[source]#

Abstract base class for free-energy estimators.

Subclasses must implement the _estimate method and set a source class attribute that is used as the source field on returned Measurement objects and as the key under which the EstimatorResult is stored on the FEMap.

Methods

estimate

Run the estimator on the FEMap for each unique computational source.

Attributes

source

estimate(femap: FEMap) dict[str, tuple[list[Measurement], EstimatorResult]][source]#

Run the estimator on the FEMap for each unique computational source.

Parameters:

femap (FEMap) – The map to estimate from.

Returns:

A dictionary mapping the composed source label to a (measurements, result) tuple. The composed label is "{estimator.source}({input_source})" when the FEMap contains more than one computational source (e.g. "MLE(openfe)"), or just "{estimator.source}" when there is only one, so that single-source users never need to know the input source name.

Return type:

dict[str, tuple[list[Measurement], EstimatorResult]]

Notes

  • Connectivity is checked per source before _estimate is called.

  • Experimental measurements are forwarded to every source so the estimator can use them to center predictions.

  • The estimates are stamped with a composed source label of the form "{estimator.source}({input_source})"

    when multiple computational sources are present, or just "{estimator.source}" when there is only one.