![]() |
Chemical Data Processing Library Python API - Version 1.4.0
|
Finds torsion rules from a ConfGen.TorsionLibrary instance that match a given rotatable bond. More...
Inheritance diagram for CDPL.ConfGen.TorsionRuleMatcher:Public Member Functions | |
| None | __init__ () |
Constructs the TorsionRuleMatcher instance without an associated torsion library. | |
| None | __init__ (TorsionLibrary lib) |
Constructs the TorsionRuleMatcher instance and associates it with lib. More... | |
| None | findUniqueMappingsOnly (bool unique) |
| Specifies whether only unique substructure mappings shall be reported during matching. More... | |
| bool | findUniqueMappingsOnly () |
| Tells whether only unique substructure mappings are reported during matching. More... | |
| None | findAllRuleMappings (bool all) |
| Specifies whether all matching rules shall be reported (instead of just the most-specific one). More... | |
| bool | findAllRuleMappings () |
| Tells whether all matching rules are reported during matching. More... | |
| None | stopAtFirstMatchingRule (bool stop) |
| Specifies whether the matching process shall stop at the first rule that produces matches. More... | |
| bool | stopAtFirstMatchingRule () |
| Tells whether matching stops at the first rule that produces matches. More... | |
| None | setTorsionLibrary (TorsionLibrary lib) |
| Sets the torsion library to query. More... | |
| TorsionLibrary | getTorsionLibrary () |
| Returns the currently associated torsion library. More... | |
| int | getNumMatches () |
| Returns the number of stored torsion rule matches found by calls to findMatches(). More... | |
| TorsionRuleMatch | getMatch (int idx) |
| Returns a reference to the stored torsion rule match object at index idx. More... | |
| bool | findMatches (Chem.Bond bond, Chem.MolecularGraph molgraph, bool append=False) |
| Searches the associated torsion library for rules that match the bond bond of the molecular graph molgraph. More... | |
| int | getObjectID () |
| Returns the numeric identifier (ID) of the wrapped C++ class instance. More... | |
| TorsionRuleMatch | __getitem__ (int idx) |
| int | __len__ () |
Properties | |
| objectID = property(getObjectID) | |
| numMatches = property(getNumMatches) | |
| uniqueMappingsOnly = property(findUniqueMappingsOnly, findUniqueMappingsOnly) | |
| allRuleMappings = property(findAllRuleMappings, findAllRuleMappings) | |
| onlyFirstMatchingRule = property(stopAtFirstMatchingRule, stopAtFirstMatchingRule) | |
| torsionLibrary = property(getTorsionLibrary, setTorsionLibrary) | |
Finds torsion rules from a ConfGen.TorsionLibrary instance that match a given rotatable bond.
For a queried bond in a molecular graph the matcher iterates the configured torsion library (top-down through torsion categories) and reports every rule whose central bond pattern matches the queried bond. Each match is stored as a ConfGen.TorsionRuleMatch object providing the four matching atoms, the matched rule and the underlying atom/bond mapping.
| None CDPL.ConfGen.TorsionRuleMatcher.__init__ | ( | TorsionLibrary | lib | ) |
Constructs the TorsionRuleMatcher instance and associates it with lib.
| lib | The torsion library to query. |
| None CDPL.ConfGen.TorsionRuleMatcher.findUniqueMappingsOnly | ( | bool | unique | ) |
Specifies whether only unique substructure mappings shall be reported during matching.
| unique | If True, only one of multiple equivalent mappings is reported per rule. |
| bool CDPL.ConfGen.TorsionRuleMatcher.findUniqueMappingsOnly | ( | ) |
Tells whether only unique substructure mappings are reported during matching.
True if only unique mappings are reported, and False otherwise. | None CDPL.ConfGen.TorsionRuleMatcher.findAllRuleMappings | ( | bool | all | ) |
Specifies whether all matching rules shall be reported (instead of just the most-specific one).
| all | If True, every matching rule across all categories is reported. |
| bool CDPL.ConfGen.TorsionRuleMatcher.findAllRuleMappings | ( | ) |
Tells whether all matching rules are reported during matching.
True if all matching rules are reported, and False otherwise. | None CDPL.ConfGen.TorsionRuleMatcher.stopAtFirstMatchingRule | ( | bool | stop | ) |
Specifies whether the matching process shall stop at the first rule that produces matches.
| stop | If True, matching stops as soon as a rule yields at least one match. |
| bool CDPL.ConfGen.TorsionRuleMatcher.stopAtFirstMatchingRule | ( | ) |
Tells whether matching stops at the first rule that produces matches.
True if matching stops at the first matching rule, and False otherwise. | None CDPL.ConfGen.TorsionRuleMatcher.setTorsionLibrary | ( | TorsionLibrary | lib | ) |
Sets the torsion library to query.
| lib | The new torsion library. |
| TorsionLibrary CDPL.ConfGen.TorsionRuleMatcher.getTorsionLibrary | ( | ) |
Returns the currently associated torsion library.
| int CDPL.ConfGen.TorsionRuleMatcher.getNumMatches | ( | ) |
Returns the number of stored torsion rule matches found by calls to findMatches().
| TorsionRuleMatch CDPL.ConfGen.TorsionRuleMatcher.getMatch | ( | int | idx | ) |
Returns a reference to the stored torsion rule match object at index idx.
| idx | The zero-based index of the torsion rule match object to return. |
| Base.IndexError | if no torsion rule matches are available or idx is not in the range [0, getNumMatches() - 1]. |
| bool CDPL.ConfGen.TorsionRuleMatcher.findMatches | ( | Chem.Bond | bond, |
| Chem.MolecularGraph | molgraph, | ||
| bool | append = False |
||
| ) |
Searches the associated torsion library for rules that match the bond bond of the molecular graph molgraph.
| bond | The rotatable bond for which matching torsion rules are sought. |
| molgraph | The molecular graph the bond belongs to. |
| append | If True, new matches are appended to the previously stored ones. Otherwise, stored matches are cleared first. |
True if at least one matching rule was found, and False otherwise. | int CDPL.ConfGen.TorsionRuleMatcher.getObjectID | ( | ) |
Returns the numeric identifier (ID) of the wrapped C++ class instance.
Different Python TorsionRuleMatcher instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two TorsionRuleMatcher instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().
| TorsionRuleMatch CDPL.ConfGen.TorsionRuleMatcher.__getitem__ | ( | int | idx | ) |
| idx |
| int CDPL.ConfGen.TorsionRuleMatcher.__len__ | ( | ) |