openmmtools.forces.RadiallySymmetricCentroidRestraintForce

class openmmtools.forces.RadiallySymmetricCentroidRestraintForce(energy_function, restraint_parameters, restrained_atom_indices1, restrained_atom_indices2, controlling_parameter_name='lambda_restraints')[source]

Base class for radially-symmetric restraints between the centroids of two groups of atoms.

The restraint is applied between the centers of mass of two groups of atoms. The restraint strength is controlled by a global context parameter whose name is passed on construction through the optional argument controlling_parameter_name.

With OpenCL, only on 64bit platforms are supported.

Parameters:
energy_functionstr

The energy function to pass to CustomCentroidBondForce. The name of the controlling global parameter will be prepended to this expression.

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, optional

The name of the global parameter controlling the energy function. The default value is ‘lambda_restraints’.

Attributes:
restraint_parameters

OrderedDict: The restraint parameters in dictionary form.

restrained_atom_indices1

The indices of the first group of restrained atoms.

restrained_atom_indices2

The indices of the first group of restrained atoms.

controlling_parameter_name

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

Methods

addBond(self, groups[, parameters])

Add a bond to the force

addEnergyParameterDerivative(self, name)

Request that this Force compute the derivative of its energy with respect to a global parameter.

addGlobalParameter(self, name, defaultValue)

Add a new global parameter that the interaction may depend on.

addGroup(self, particles[, weights])

Add a particle group.

addPerBondParameter(self, name)

Add a new per-bond parameter that the interaction may depend on.

addTabulatedFunction(self, name, function)

Add a tabulated function that may appear in the energy expression.

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.

getBondParameters(self, index)

Get the properties of a bond.

getEnergyFunction(self)

Get the algebraic expression that gives the interaction energy of each bond

getEnergyParameterDerivativeName(self, index)

Get the name of a global parameter with respect to which this Force should compute the derivative of the energy.

getForceGroup(self)

Get the force group this Force belongs to.

getGlobalParameterDefaultValue(self, index)

Get the default value of a global parameter.

getGlobalParameterName(self, index)

Get the name of a global parameter.

getGroupParameters(self, index)

Get the properties of a group.

getName(self)

Get the name of this Force.

getNumBonds(self)

Get the number of bonds for which force field parameters have been defined.

getNumEnergyParameterDerivatives(self)

Get the number of global parameters with respect to which the derivative of the energy should be computed.

getNumFunctions(self)

Get the number of tabulated functions that have been defined.

getNumGlobalParameters(self)

Get the number of global parameters that the interaction depends on.

getNumGroups(self)

Get the number of particle groups that have been defined.

getNumGroupsPerBond(self)

Get the number of groups used to define each bond.

getNumPerBondParameters(self)

Get the number of per-bond parameters that the interaction depends on.

getNumTabulatedFunctions(self)

Get the number of tabulated functions that have been defined.

getPerBondParameterName(self, index)

Get the name of a per-bond parameter.

getTabulatedFunction(-> TabulatedFunction)

Get a reference to a tabulated function that may appear in the energy expression.

getTabulatedFunctionName(self, index)

Get the name of a tabulated function that may appear in the energy expression.

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.

setBondParameters(self, index, groups[, ...])

Set the properties of a bond.

setEnergyFunction(self, energy)

Set the algebraic expression that gives the interaction energy of each bond

setForceGroup(self, group)

Set the force group this Force belongs to.

setGlobalParameterDefaultValue(self, index, ...)

Set the default value of a global parameter.

setGlobalParameterName(self, index, name)

Set the name of a global parameter.

setGroupParameters(self, index, particles[, ...])

Set the properties of a group.

setName(self, name)

Set the name of this Force.

setPerBondParameterName(self, index, name)

Set the name of a per-bond parameter.

setUsesPeriodicBoundaryConditions(self, periodic)

Set whether this force should apply periodic boundary conditions when calculating displacements.

updateParametersInContext(self, context)

Update the per-bond parameters and tabulated functions in a Context to match those stored in this Force object.

usesPeriodicBoundaryConditions(self)

Returns whether or not this force makes use of periodic boundary conditions.

__init__(self, numGroups, energy) CustomCentroidBondForce[source]
__init__(self, other) CustomCentroidBondForce

Create a CustomCentroidBondForce.

Parameters:
numGroupsint

the number of groups used to define each bond

energystring

an algebraic expression giving the interaction energy of each bond as a function of particle positions, inter-particle distances, angles, and dihedrals, and any global and per-bond parameters

Methods

__init__(-> CustomCentroidBondForce)

Create a CustomCentroidBondForce.

addBond(self, groups[, parameters])

Add a bond to the force

addEnergyParameterDerivative(self, name)

Request that this Force compute the derivative of its energy with respect to a global parameter.

addGlobalParameter(self, name, defaultValue)

Add a new global parameter that the interaction may depend on.

addGroup(self, particles[, weights])

Add a particle group.

addPerBondParameter(self, name)

Add a new per-bond parameter that the interaction may depend on.

addTabulatedFunction(self, name, function)

Add a tabulated function that may appear in the energy expression.

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.

getBondParameters(self, index)

Get the properties of a bond.

getEnergyFunction(self)

Get the algebraic expression that gives the interaction energy of each bond

getEnergyParameterDerivativeName(self, index)

Get the name of a global parameter with respect to which this Force should compute the derivative of the energy.

getForceGroup(self)

Get the force group this Force belongs to.

getGlobalParameterDefaultValue(self, index)

Get the default value of a global parameter.

getGlobalParameterName(self, index)

Get the name of a global parameter.

getGroupParameters(self, index)

Get the properties of a group.

getName(self)

Get the name of this Force.

getNumBonds(self)

Get the number of bonds for which force field parameters have been defined.

getNumEnergyParameterDerivatives(self)

Get the number of global parameters with respect to which the derivative of the energy should be computed.

getNumFunctions(self)

Get the number of tabulated functions that have been defined.

getNumGlobalParameters(self)

Get the number of global parameters that the interaction depends on.

getNumGroups(self)

Get the number of particle groups that have been defined.

getNumGroupsPerBond(self)

Get the number of groups used to define each bond.

getNumPerBondParameters(self)

Get the number of per-bond parameters that the interaction depends on.

getNumTabulatedFunctions(self)

Get the number of tabulated functions that have been defined.

getPerBondParameterName(self, index)

Get the name of a per-bond parameter.

getTabulatedFunction(-> TabulatedFunction)

Get a reference to a tabulated function that may appear in the energy expression.

getTabulatedFunctionName(self, index)

Get the name of a tabulated function that may appear in the energy expression.

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.

setBondParameters(self, index, groups[, ...])

Set the properties of a bond.

setEnergyFunction(self, energy)

Set the algebraic expression that gives the interaction energy of each bond

setForceGroup(self, group)

Set the force group this Force belongs to.

setGlobalParameterDefaultValue(self, index, ...)

Set the default value of a global parameter.

setGlobalParameterName(self, index, name)

Set the name of a global parameter.

setGroupParameters(self, index, particles[, ...])

Set the properties of a group.

setName(self, name)

Set the name of this Force.

setPerBondParameterName(self, index, name)

Set the name of a per-bond parameter.

setUsesPeriodicBoundaryConditions(self, periodic)

Set whether this force should apply periodic boundary conditions when calculating displacements.

updateParametersInContext(self, context)

Update the per-bond parameters and tabulated functions in a Context to match those stored in this Force object.

usesPeriodicBoundaryConditions(self)

Returns whether or not this force makes use of periodic boundary conditions.

Attributes

controlling_parameter_name

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

restrained_atom_indices1

The indices of the first group of restrained atoms.

restrained_atom_indices2

The indices of the first group of restrained atoms.

restraint_parameters

OrderedDict: The restraint parameters in dictionary form.

thisown

The membership flag