openmmtools.states.IComposableState

class openmmtools.states.IComposableState[source]

A state composable through CompoundThermodynamicState.

Define the interface that needs to be implemented to extend a ThermodynamicState through CompoundThermodynamicState.

Methods

apply_to_context(context) Set the context to be in this state.
apply_to_system(system) Set the system to be in this state.
check_system_consistency(system) Check if the system is in this state.
__init__($self, /, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

Methods

apply_to_context(context) Set the context to be in this state.
apply_to_system(system) Set the system to be in this state.
check_system_consistency(system) Check if the system is in this state.
apply_to_context(context)[source]

Set the context to be in this state.

Parameters:
context : simtk.openmm.Context

The context to set.

Raises:
ComposableStateError

If the context is not compatible with the state.

apply_to_system(system)[source]

Set the system to be in this state.

This method is called in three situations: 1) On initialization, before standardizing the system. 2) When a new system is set and the argument fix_state is

set to True.
  1. When the system is retrieved to convert the standard system into a system in the correct thermodynamic state for the simulation.
Parameters:
system : simtk.openmm.System

The system to modify.

Raises:
ComposableStateError

If the system is not compatible with the state.

check_system_consistency(system)[source]

Check if the system is in this state.

It raises a ComposableStateError if the system is not in this state. This is called when the ThermodynamicState’s system is set with the fix_state argument set to False.

Parameters:
system : simtk.openmm.System

The system to test.

Raises:
ComposableStateError

If the system is not consistent with this state.