TorsionIndexer
- pydantic model openff.qcsubmit.workflow_components.TorsionIndexer[source]
A class to keep track of the torsions highlighted for scanning, with methods for combining and deduplication.
Show JSON schema
{ "title": "TorsionIndexer", "description": "A class to keep track of the torsions highlighted for scanning, with methods for combining and deduplication.", "type": "object", "properties": { "torsions": { "title": "Torsions", "description": "A dictionary of the torsions to be scanned grouped by the central bond in the torsion.", "default": {}, "type": "object", "additionalProperties": { "$ref": "#/definitions/SingleTorsion" } }, "double_torsions": { "title": "Double Torsions", "description": "A dictionary of the 2D torsions to be scanned grouped by the sorted combination of the central bonds.", "default": {}, "type": "object", "additionalProperties": { "$ref": "#/definitions/DoubleTorsion" } }, "impropers": { "title": "Impropers", "description": "A dictionary of the improper torsions to be scanned grouped by the central atom in the torsion.", "default": {}, "type": "object", "additionalProperties": { "$ref": "#/definitions/ImproperTorsion" } } }, "definitions": { "SingleTorsion": { "title": "SingleTorsion", "description": "A class used to mark torsions that will be driven for torsiondrive datasets.\n\nNote:\n This is only for 1D torsiondrives.", "type": "object", "properties": { "torsion1": { "title": "Torsion1", "description": "The torsion which is to be driven.", "type": "array", "minItems": 4, "maxItems": 4, "items": [ { "type": "integer" }, { "type": "integer" }, { "type": "integer" }, { "type": "integer" } ] }, "scan_range1": { "title": "Scan Range1", "description": "The scan range used in the torsion drive", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "integer" }, { "type": "integer" } ] }, "scan_increment": { "title": "Scan Increment", "description": "The value in degrees between each grid point in the scan.", "default": [ 15 ], "type": "array", "items": { "type": "integer" } }, "symmetry_group1": { "title": "Symmetry Group1", "description": "The symmetry of the central atoms in the torsion used to deduplicate symmetrical torsions.", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "integer" }, { "type": "integer" } ] } }, "required": [ "torsion1", "symmetry_group1" ] }, "DoubleTorsion": { "title": "DoubleTorsion", "description": "A class used to mark coupled torsions which should be scanned.", "type": "object", "properties": { "torsion1": { "title": "Torsion1", "description": "The torsion which is to be driven.", "type": "array", "minItems": 4, "maxItems": 4, "items": [ { "type": "integer" }, { "type": "integer" }, { "type": "integer" }, { "type": "integer" } ] }, "scan_range1": { "title": "Scan Range1", "description": "The scan range used in the torsion drive", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "integer" }, { "type": "integer" } ] }, "scan_increment": { "title": "Scan Increment", "default": [ 15, 15 ], "type": "array", "items": { "type": "integer" } }, "symmetry_group1": { "title": "Symmetry Group1", "description": "The symmetry of the central atoms in the torsion used to deduplicate symmetrical torsions.", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "integer" }, { "type": "integer" } ] }, "torsion2": { "title": "Torsion2", "description": "The torsion tuple of the second dihedral to be drive at the same time as the first.", "type": "array", "minItems": 4, "maxItems": 4, "items": [ { "type": "integer" }, { "type": "integer" }, { "type": "integer" }, { "type": "integer" } ] }, "scan_range2": { "title": "Scan Range2", "description": "The separate scan range that should be used for the second dihedral.", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "integer" }, { "type": "integer" } ] }, "symmetry_group2": { "title": "Symmetry Group2", "description": "The symmetry group of the second torsion, used to deduplicate torsions.", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "integer" }, { "type": "integer" } ] } }, "required": [ "torsion1", "symmetry_group1", "torsion2", "symmetry_group2" ] }, "ImproperTorsion": { "title": "ImproperTorsion", "description": "A class to keep track of improper torsions being scanned.", "type": "object", "properties": { "central_atom": { "title": "Central Atom", "description": "The index of the central atom of an improper torsion.", "type": "integer" }, "improper": { "title": "Improper", "description": "The tuple of the atoms in the improper torsion.", "type": "array", "minItems": 4, "maxItems": 4, "items": [ { "type": "integer" }, { "type": "integer" }, { "type": "integer" }, { "type": "integer" } ] }, "scan_range": { "title": "Scan Range", "description": "The scan range of the improper dihedral which should normally be limited.", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "integer" }, { "type": "integer" } ] }, "scan_increment": { "title": "Scan Increment", "description": "The value in degrees between each grid point in the scan.", "default": [ 15 ], "type": "array", "items": { "type": "integer" } }, "symmetry_group": { "title": "Symmetry Group", "description": "The symmetry group of the improper used to deduplicate improper torsions.", "type": "array", "minItems": 4, "maxItems": 4, "items": [ { "type": "integer" }, { "type": "integer" }, { "type": "integer" }, { "type": "integer" } ] } }, "required": [ "central_atom", "improper", "symmetry_group" ] } } }
- Config
allow_mutation: bool = True
arbitrary_types_allowed: bool = True
json_encoders: dict = {<class ‘numpy.ndarray’>: <function DatasetConfig.Config.<lambda> at 0x7f2da9e5f380>, <enum ‘Enum’>: <function DatasetConfig.Config.<lambda> at 0x7f2da9ea5bc0>}
validate_assignment: bool = True
- Fields
double_torsions (Dict[Tuple[Tuple[int, int], Tuple[int, int]], openff.qcsubmit.workflow_components.utils.DoubleTorsion])
impropers (Dict[int, openff.qcsubmit.workflow_components.utils.ImproperTorsion])
torsions (Dict[Tuple[int, int], openff.qcsubmit.workflow_components.utils.SingleTorsion])
- field torsions: Dict[Tuple[int, int], openff.qcsubmit.workflow_components.utils.SingleTorsion] = {}
A dictionary of the torsions to be scanned grouped by the central bond in the torsion.
- field double_torsions: Dict[Tuple[Tuple[int, int], Tuple[int, int]], openff.qcsubmit.workflow_components.utils.DoubleTorsion] = {}
A dictionary of the 2D torsions to be scanned grouped by the sorted combination of the central bonds.
- field impropers: Dict[int, openff.qcsubmit.workflow_components.utils.ImproperTorsion] = {}
A dictionary of the improper torsions to be scanned grouped by the central atom in the torsion.
- property get_dihedrals: List[Union[openff.qcsubmit.workflow_components.utils.SingleTorsion, openff.qcsubmit.workflow_components.utils.DoubleTorsion, openff.qcsubmit.workflow_components.utils.ImproperTorsion]]
Return a list of all of the dihedrals tagged making it easy to loop over.
- property torsion_groups: List[Tuple[int, int]]
Return a list of all of the currently covered torsion symmetry groups. Note this only includes central bond atoms.
- property double_torsion_groups: List[Tuple[Tuple[int, int], Tuple[int, int]]]
Return a list of all of the currently covered pairs of torsion symmetry groups.
- property improper_groups: List[Tuple[int, int, int, int]]
Return a list of all of the currently covered improper torsion symmetry groups.
- add_torsion(torsion, symmetry_group, scan_range=None, scan_increment=[15], overwrite=False)[source]
Add a single torsion to the torsion indexer if this central bond has not already been tagged and the torsion is symmetry unique.
- add_double_torsion(torsion1, torsion2, symmetry_group1, symmetry_group2, scan_range1=None, scan_range2=None, scan_increment=[15, 15], overwrite=False)[source]
Add a double torsion to the indexer if this central bond combination has not been tagged and the torsion pair are symmetry unique.
- Parameters
- Return type
None
- add_improper(central_atom, improper, symmetry_group, scan_range=None, scan_increment=[15], overwrite=False)[source]
Add an improper torsion to the indexer if its central atom is not already covered and the improper is symmetry unique.
- update(torsion_indexer, reorder_mapping=None)[source]
Update the current torsion indexer with another.
- Parameters
torsion_indexer (openff.qcsubmit.workflow_components.utils.TorsionIndexer) – The other torsionindxer that should be used to update the current object.
reorder_mapping (Optional[Dict[int, int]]) – The mapping between the other and current molecule should the order need updating.
- Return type
None
- property n_torsions: int
Return the number of torsions highlighted.
- property n_double_torsions: int
Return the number of double torsions highlighted.
- property n_impropers: int
Return the number of imporpers highlighted.