openmmtools.multistate.MultiPhaseAnalyzer

class openmmtools.multistate.MultiPhaseAnalyzer(phases)[source]

Multiple Phase Analyzer creator, not to be directly called itself, but instead called by adding or subtracting different implemented PhaseAnalyzer or other MultiPhaseAnalyzers’s. The individual Phases of the MultiPhaseAnalyzer are only references to existing Phase objects, not copies. All PhaseAnalyzer and MultiPhaseAnalyzer classes support + and - operations.

The observables of this phase are determined through inspection of all the passed in phases and only observables which are shared can be computed. For example:

PhaseA has .get_free_energy and .get_entropy

PhaseB has .get_free_energy and .get_enthalpy,

PhaseAB = PhaseA + PhaseB will only have a .get_free_energy method

Because each Phase may have a different number of states, the reference_states property of each phase determines which states from each phase to read the data from.

For observables defined by two states, the i’th and j’th reference states are used:

If we define PhaseAB = PhaseA - PhaseB

Then PhaseAB.get_free_energy() is roughly equivalent to doing the following:

A_i, A_j = PhaseA.reference_states

B_i, B_j = PhaseB.reference_states

PhaseA.get_free_energy()[A_i, A_j] - PhaseB.get_free_energy()[B_i, B_j]

The above is not exact since get_free_energy returns an error estimate as well

For observables defined by a single state, only the i’th reference state is used

Given PhaseAB = PhaseA + PhaseB, PhaseAB.get_temperature() is equivalent to:

A_i = PhaseA.reference_states[0]

B_i = PhaseB.reference_states[0]

PhaseA.get_temperature()[A_i] + PhaseB.get_temperature()[B_i]

For observables defined entirely by the phase, no reference states are needed.

Given PhaseAB = PhaseA + PhaseB, PhaseAB.get_standard_state_correction() gives:

PhaseA.get_standard_state_correction() + PhaseB.get_standard_state_correction()

Each phase MUST use the same ObservablesRegistry, otherwise an error is raised

This class is public to see its API.

Parameters
phasesdict

has keys “phases”, “names”, and “signs”

See also

PhaseAnalyzer
ObservablesRegistry
Attributes
observables

List of observables this MultiPhaseAnalyzer can generate

phases

List of implemented PhaseAnalyzer’s objects this MultiPhaseAnalyzer is tied to

names

Unique list of string names identifying this phase.

signs

List of signs that are used by the MultiPhaseAnalyzer to

registry

Methods

clear()

Clear the individual phases of their observables and estimators for re-computing quantities

__init__(phases)[source]

Create the compound phase which is any combination of phases to generate a new MultiPhaseAnalyzer.

Methods

__init__(phases)

Create the compound phase which is any combination of phases to generate a new MultiPhaseAnalyzer.

clear()

Clear the individual phases of their observables and estimators for re-computing quantities

Attributes

names

Unique list of string names identifying this phase.

observables

List of observables this MultiPhaseAnalyzer can generate

phases

List of implemented PhaseAnalyzer's objects this MultiPhaseAnalyzer is tied to

signs

List of signs that are used by the MultiPhaseAnalyzer to