openforcefield.typing.engines.smirnoff.parameters.
ParameterType
(smirks=None, allow_cosmetic_attributes=False, **kwargs)[source]¶Base class for SMIRNOFF parameter types.
Warning
This API is experimental and subject to change.
Methods
|
Add a cosmetic attribute to this ParameterType object. |
|
Delete a cosmetic attribute from this ParameterType object. |
|
Convert this ParameterType object to dict. |
__init__
(self, smirks=None, allow_cosmetic_attributes=False, **kwargs)[source]¶Create a ParameterType
The SMIRKS match for the provided parameter type.
Whether to permit non-spec kwargs (“cosmetic attributes”). If True, non-spec kwargs will be stored as an attribute of this parameter which can be accessed and written out. Otherwise an exception will be raised.
Methods
|
Create a ParameterType |
|
Add a cosmetic attribute to this ParameterType object. |
|
Delete a cosmetic attribute from this ParameterType object. |
|
Convert this ParameterType object to dict. |
Attributes
|
to_dict
(self, discard_cosmetic_attributes=False)[source]¶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.
add_cosmetic_attribute
(self, attr_name, attr_value)[source]¶Add a cosmetic attribute to this ParameterType object. This attribute will not have a functional effect on the object in the Open Force Field toolkit, but can be written out during output.
Name of the attribute to define for this ParameterType object.
The value of the attribute to define for this ParameterType object.