openff.toolkit.typing.engines.smirnoff.ImproperTorsionType
- class openff.toolkit.typing.engines.smirnoff.ImproperTorsionType(smirks, allow_cosmetic_attributes=False, **kwargs)
A SMIRNOFF torsion type for improper torsions.
Warning
This API is experimental and subject to change.
- __init__(smirks, allow_cosmetic_attributes=False, **kwargs)
Create a ParameterType.
- Parameters
smirks (str) – The SMIRKS match for the provided parameter type.
allow_cosmetic_attributes (bool optional. Default = False) – 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
__init__
(smirks[, allow_cosmetic_attributes])Create a ParameterType.
add_cosmetic_attribute
(attr_name, attr_value)Add a cosmetic attribute to this object.
attribute_is_cosmetic
(attr_name)Determine whether an attribute of this object is cosmetic.
delete_cosmetic_attribute
(attr_name)Delete a cosmetic attribute from this object.
to_dict
([discard_cosmetic_attributes, ...])Convert this object to dict format.
Attributes
id
idivf
k
parent_id
periodicity
phase
smirks
- add_cosmetic_attribute(attr_name, attr_value)
Add a cosmetic attribute to this object.
This attribute will not have a functional effect on the object in the OpenFF Toolkit, but can be written out during output.
Warning
The API for modifying cosmetic attributes is experimental and may change in the future (see issue #338).
- attribute_is_cosmetic(attr_name)
Determine whether an attribute of this object is cosmetic.
Warning
The API for modifying cosmetic attributes is experimental and may change in the future (see issue #338).
- Parameters
attr_name (str) – The attribute name to check
- Returns
is_cosmetic (bool) – Returns True if the attribute is defined and is cosmetic. Returns False otherwise.
- delete_cosmetic_attribute(attr_name)
Delete a cosmetic attribute from this object.
Warning
The API for modifying cosmetic attributes is experimental and may change in the future (see issue #338).
- Parameters
attr_name (str) – Name of the cosmetic attribute to delete.
- to_dict(discard_cosmetic_attributes=False, duplicate_attributes=None)
Convert this object to dict format.
The returning dictionary contains all the
ParameterAttribute
andIndexedParameterAttribute
as well as cosmetic attributes ifdiscard_cosmetic_attributes
isFalse
.- Parameters
discard_cosmetic_attributes (bool, optional. Default = False) – Whether to discard non-spec attributes of this object
duplicate_attributes (list of string, optional. Default = None) – A list of names of attributes that redundantly decsribe data and should be discarded during serializaiton
- Returns
smirnoff_dict (dict) – The SMIRNOFF-compliant dict representation of this object.