openforcefield.typing.engines.smirnoff.parameters.
BondHandler
(**kwargs)[source]¶Handle SMIRNOFF <Bonds>
tags
Warning
This API is experimental and subject to change.
known_kwargs
List of kwargs that can be parsed by the function.
parameters
The ParameterList that holds this ParameterHandler’s parameter objects
Methods
|
A SMIRNOFF bond type |
|
Add a parameter to the forcefield, ensuring all parameters are valid. |
|
Assign parameters for the given Topology to the specified System object. |
|
Checks whether this ParameterHandler encodes compatible physics as another ParameterHandler. |
|
Check to make sure that the fields requiring defined units are compatible with the required units for the Parameters handled by this ParameterHandler |
|
Find the elements of the topology/molecule matched by a parameter type. |
|
Return the parameters in this ParameterHandler that match the parameter_attrs argument |
|
Allow the force to perform a a final post-processing pass on the System following parameter assignment, if needed. |
|
Convert this ParameterHandler to an OrderedDict, compliant with the SMIRNOFF data spec. |
create_force |
__init__
(self, **kwargs)[source]¶Initialize a ParameterHandler, optionally with a list of parameters and other kwargs.
Whether to permit non-spec kwargs. If True, non-spec kwargs will be stored as attributes of this object and can be accessed and modified. Otherwise an exception will be raised if a non-spec kwarg is encountered.
The dict representation of the SMIRNOFF data source
Methods
|
Initialize a ParameterHandler, optionally with a list of parameters and other kwargs. |
|
Add a parameter to the forcefield, ensuring all parameters are valid. |
|
Assign parameters for the given Topology to the specified System object. |
|
Checks whether this ParameterHandler encodes compatible physics as another ParameterHandler. |
|
Check to make sure that the fields requiring defined units are compatible with the required units for the Parameters handled by this ParameterHandler |
|
|
|
Find the elements of the topology/molecule matched by a parameter type. |
|
Return the parameters in this ParameterHandler that match the parameter_attrs argument |
|
Allow the force to perform a a final post-processing pass on the System following parameter assignment, if needed. |
|
Convert this ParameterHandler to an OrderedDict, compliant with the SMIRNOFF data spec. |
Attributes
List of kwargs that can be parsed by the function. |
|
The ParameterList that holds this ParameterHandler’s parameter objects |
BondType
(**kwargs)[source]¶A SMIRNOFF bond type
Warning
This API is experimental and subject to change.
Methods
|
Convert this ParameterType object to dict. |
to_dict
(self, discard_cosmetic_attributes=True)¶Convert this ParameterType object to dict. A unit-bearing attribute (‘X’) will be converted to two dict entries, one ([‘X’] containing the unitless value, and another ([‘X_unit’]) containing a string representation of its unit.
Whether to discard non-spec attributes of this ParameterType
The SMIRNOFF-compliant dict representation of this ParameterType object.
A mapping from each simtk.unit.Quanitity-valued ParameterType attribute to the unit it was converted to during serialization.
check_handler_compatibility
(self, other_handler)[source]¶Checks whether this ParameterHandler encodes compatible physics as another ParameterHandler. This is called if a second handler is attempted to be initialized for the same tag.
The handler to compare to.
add_parameter
(self, parameter_kwargs)¶Add a parameter to the forcefield, ensuring all parameters are valid.
The kwargs to pass to the ParameterHandler.INFOTYPE (a ParameterType) constructor
assign_parameters
(self, topology, system)¶Assign parameters for the given Topology to the specified System object.
The Topology for which parameters are to be assigned. Either a new Force will be created or parameters will be appended to an existing Force.
The OpenMM System object to add the Force (or append new parameters) to.
check_parameter_compatibility
(self, parameter_kwargs)¶Check to make sure that the fields requiring defined units are compatible with the required units for the Parameters handled by this ParameterHandler
The dict that will be used to construct the ParameterType
find_matches
(self, entity)¶Find the elements of the topology/molecule matched by a parameter type.
Topology or molecule to search.
matches[particle_indices]
is the ParameterType
object
matching the tuple of particle indices in entity
.
get_parameter
(self, parameter_attrs)¶Return the parameters in this ParameterHandler that match the parameter_attrs argument
The attrs mapped to desired values (for example {“smirks”: “[:1]~[#16:2]=,:[#6:3]~[:4]”, “id”: “t105”} )
A list of matching ParameterType objects
known_kwargs
¶List of kwargs that can be parsed by the function.
parameters
¶The ParameterList that holds this ParameterHandler’s parameter objects
postprocess_system
(self, topology, system, **kwargs)¶Allow the force to perform a a final post-processing pass on the System following parameter assignment, if needed.
The Topology for which parameters are to be assigned. Either a new Force will be created or parameters will be appended to an existing Force.
The OpenMM System object to add the Force (or append new parameters) to.
to_dict
(self, output_units=None, discard_cosmetic_attributes=True)¶Convert this ParameterHandler to an OrderedDict, compliant with the SMIRNOFF data spec.
A mapping from the ParameterType attribute name to the output unit its value should be converted to.
Whether to discard non-spec parameter and header attributes in this ParameterHandler.
SMIRNOFF-spec compliant representation of this ParameterHandler and its internal ParameterList.