openmmtools.utils.RestorableOpenMMObject

class openmmtools.utils.RestorableOpenMMObject(*args, **kwargs)[source]

Base class for restorable custom integrators and forces.

Normally, a custom OpenMM object loses its specific class (and all its methods) when it is copied or deserialized from its XML representation. Class interfaces inheriting from this can be restored through the method restore_interface(). Also, this class extend the copying functions to copy also Python attributes.

The class automatically adds a global parameter or variable in custom forces and integrators respectively on __init__ to keep track of the original class.

Methods

deserialize_xml(xml_serialization)

Shortcut to deserialize the XML representation and the restore interface.

is_restorable(openmm_object)

Check if the custom integrator or force has a restorable interface.

restore_interface(openmm_object)

Restore the original interface of an OpenMM custom force or integrator.

__init__(*args, **kwargs)[source]

Methods

__init__(*args, **kwargs)

deserialize_xml(xml_serialization)

Shortcut to deserialize the XML representation and the restore interface.

is_restorable(openmm_object)

Check if the custom integrator or force has a restorable interface.

restore_interface(openmm_object)

Restore the original interface of an OpenMM custom force or integrator.