openmmtools.forces.RadiallySymmetricRestraintForce

class openmmtools.forces.RadiallySymmetricRestraintForce(restraint_parameters, restrained_atom_indices1, restrained_atom_indices2, controlling_parameter_name, *args, **kwargs)[source]

Base class for radially-symmetric restraint force.

Provide facility functions to compute the standard state correction of a receptor-ligand restraint.

To create a subclass, implement the properties restrained_atom_indices1() and restrained_atom_indices2() (with their setters) that return the indices of the restrained atoms.

You will also have to implement _create_bond(), which should add the bond using the correct function/signature.

Optionally, you can implement distance_at_energy() if an analytical expression for distance(potential_energy) exists.

If you subclass this, and plan on adding additional global parameters, you need to invoke this class super().__init__ first as the controlling_parameter_name must be the first global variable.

Parameters:
restraint_parametersOrderedDict

An ordered dictionary containing the bond parameters in the form parameter_name: parameter_value. The order is important to make sure that parameters can be retrieved from the bond force with the correct force index.

restrained_atom_indices1iterable of int

The indices of the first group of atoms to restrain.

restrained_atom_indices2iterable of int

The indices of the second group of atoms to restrain.

controlling_parameter_namestr

The name of the global parameter controlling the energy function.

*args, **kwargs

Parameters to pass to the super constructor.

Attributes:
controlling_parameter_name

str: The name of the global parameter controlling the energy function (read-only).

Methods

compute_standard_state_correction(...[, ...])

Return the standard state correction of the restraint.

deserialize_xml(xml_serialization)

Shortcut to deserialize the XML representation and the restore interface.

distance_at_energy(potential_energy)

Compute the distance at which the potential energy is potential_energy.

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__(restraint_parameters, restrained_atom_indices1, restrained_atom_indices2, controlling_parameter_name, *args, **kwargs)[source]

Methods

__init__(restraint_parameters, ...)

compute_standard_state_correction(...[, ...])

Return the standard state correction of the restraint.

deserialize_xml(xml_serialization)

Shortcut to deserialize the XML representation and the restore interface.

distance_at_energy(potential_energy)

Compute the distance at which the potential energy is potential_energy.

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.

Attributes

controlling_parameter_name

str: The name of the global parameter controlling the energy function (read-only).

restrained_atom_indices1

list: The indices of the first group of restrained atoms.

restrained_atom_indices2

list: The indices of the first group of restrained atoms.

restraint_parameters

OrderedDict: The restraint parameters in dictionary form.