openmmtools.testsystems.TestSystem¶
-
class
openmmtools.testsystems.TestSystem(**kwargs)[source]¶ Abstract base class for test systems, demonstrating how to implement a test system.
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()
Attributes: system: simtk.openmm.SystemThe simtk.openmm.System object corresponding to the test system.
positions: listThe simtk.unit.Quantity object containing the particle positions, with units compatible with simtk.unit.nanometers.
topology: listThe simtk.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. 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 simtk.unit.Quantity object containing the particle positions, with units compatible with simtk.unit.nanometers. systemThe simtk.openmm.System object corresponding to the test system. topologyThe simtk.openmm.app.Topology object corresponding to the test system. -
analytical_properties¶ A list of available analytical properties, accessible via ‘get_propertyname(thermodynamic_state)’ calls.
-
mdtraj_topology¶ The mdtraj.Topology object corresponding to the test system (read-only).
-
name¶ The name of the test system.
-
positions¶ The simtk.unit.Quantity object containing the particle positions, with units compatible with simtk.unit.nanometers.
-
reduced_potential_expectation(state_sampled_from, state_evaluated_in)[source]¶ Calculate the expected potential energy in state_sampled_from, divided by kB * T in state_evaluated_in.
Notes
This is not called get_reduced_potential_expectation because this function requires two, not one, inputs.
-
serialize()[source]¶ Return the System and positions in serialized XML form.
Returns: - system_xml : str
Serialized XML form of System object.
- state_xml : str
Serialized XML form of State object containing particle positions.
-
system¶ The simtk.openmm.System object corresponding to the test system.
-
topology¶ The simtk.openmm.app.Topology object corresponding to the test system.