openmmtools.testsystems.TestSystem¶
- class openmmtools.testsystems.TestSystem(**kwargs)[source]¶
Abstract base class for test systems, demonstrating how to implement a test system.
- Parameters:
- Attributes:
systemopenmm.SystemThe openmm.System object corresponding to the test system.
positionslistThe openmm.unit.Quantity object containing the particle positions, with units compatible with openmm.unit.nanometers.
topologylistThe openmm.app.Topology object corresponding to the test system.
Methods
reduced_potential_expectation(...)Calculate the expected potential energy in state_sampled_from, divided by kB * T in state_evaluated_in.
serialize()Return the System and positions in serialized XML form.
Notes
Unimplemented methods will default to the base class methods, which raise a NotImplementedException.
Examples
Create a test system.
>>> testsystem = TestSystem()
Retrieve a deep copy of the System object.
>>> system = testsystem.system
Retrieve a deep copy of the positions.
>>> positions = testsystem.positions
Retrieve a deep copy of the topology.
>>> topology = testsystem.topology
Serialize system and positions to XML (to aid in debugging).
>>> (system_xml, positions_xml) = testsystem.serialize()
Methods
__init__(**kwargs)Abstract base class for test system.
reduced_potential_expectation(...)Calculate the expected potential energy in state_sampled_from, divided by kB * T in state_evaluated_in.
serialize()Return the System and positions in serialized XML form.
Attributes
analytical_propertiesA list of available analytical properties, accessible via 'get_propertyname(thermodynamic_state)' calls.
mdtraj_topologyThe mdtraj.Topology object corresponding to the test system (read-only).
nameThe name of the test system.
positionsThe openmm.unit.Quantity object containing the particle positions, with units compatible with openmm.unit.nanometers.
systemThe openmm.System object corresponding to the test system.
topologyThe openmm.app.Topology object corresponding to the test system.