openmmtools.testsystems.TestSystem

class openmmtools.testsystems.TestSystem(**kwargs)[source]

Abstract base class for test systems, demonstrating how to implement a test system.

Parameters:

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:
systemopenmm.System

The openmm.System object corresponding to the test system.

positionslist

The openmm.unit.Quantity object containing the particle positions, with units compatible with openmm.unit.nanometers.

topologylist

The 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.

__init__(**kwargs)[source]

Abstract base class for test system.

Parameters:

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_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 openmm.unit.Quantity object containing the particle positions, with units compatible with openmm.unit.nanometers.

system

The openmm.System object corresponding to the test system.

topology

The openmm.app.Topology object corresponding to the test system.