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
PhaseAnalyzeror otherMultiPhaseAnalyzers’s. The individual Phases of theMultiPhaseAnalyzerare only references to existing Phase objects, not copies. AllPhaseAnalyzerandMultiPhaseAnalyzerclasses 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:
PhaseAhas.get_free_energyand.get_entropyPhaseBhas.get_free_energyand.get_enthalpy,PhaseAB = PhaseA + PhaseBwill only have a.get_free_energymethodBecause each Phase may have a different number of states, the
reference_statesproperty 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 - PhaseBThen
PhaseAB.get_free_energy()is roughly equivalent to doing the following:A_i, A_j = PhaseA.reference_statesB_i, B_j = PhaseB.reference_statesPhaseA.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”
- Attributes:
observablesList of observables this
MultiPhaseAnalyzercan generatephasesList of implemented
PhaseAnalyzer’s objects thisMultiPhaseAnalyzeris tied tonamesUnique list of string names identifying this phase.
signsList of signs that are used by the
MultiPhaseAnalyzerto- registry
Methods
clear()Clear the individual phases of their observables and estimators for re-computing quantities
See also
PhaseAnalyzerObservablesRegistry
- __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
namesUnique list of string names identifying this phase.
observablesList of observables this
MultiPhaseAnalyzercan generatephasesList of implemented
PhaseAnalyzer's objects thisMultiPhaseAnalyzeris tied tosignsList of signs that are used by the
MultiPhaseAnalyzerto