![]() |
Chemical Data Processing Library Python API - Version 1.4.0
|
Enumerates the resonance structures of a molecular graph by redistributing π-electrons across the resonance-active bonds. More...
Inheritance diagram for CDPL.Chem.ResonanceStructureGenerator:Classes | |
| class | StructureData |
| Holds the per-atom formal charges and per-bond bond-orders that define a single resonance structure. More... | |
Public Member Functions | |
| None | __init__ () |
Constructs the ResonanceStructureGenerator instance. | |
| None | __init__ (ResonanceStructureGenerator gen) |
Constructs a copy of the ResonanceStructureGenerator instance gen. More... | |
| int | getObjectID () |
| Returns the numeric identifier (ID) of the wrapped C++ class instance. More... | |
| ResonanceStructureGenerator | assign (ResonanceStructureGenerator gen) |
| Replaces the state of this generator by a copy of the state of gen. More... | |
| bool | octetRuleViolationsMinimized () |
| Tells whether octet-rule violations are minimized. More... | |
| None | minimizeOctetRuleViolations (bool minimize) |
| Specifies whether resonance structures violating the octet rule shall be filtered out. More... | |
| bool | sp1GeometryViolationsMinimized () |
| Tells whether sp-hybridization-geometry violations are minimized. More... | |
| None | minimizeSP1GeometryViolations (bool minimize) |
| Specifies whether resonance structures with sp-hybridization-geometry violations shall be filtered out. More... | |
| bool | carbonBond12ChargesMinimized () |
| Tells whether 1,2-charge separations on adjacent carbon atoms are minimized. More... | |
| None | minimizeCarbonBond12Charges (bool minimize) |
| Specifies whether resonance structures with 1,2-charge separations on adjacent carbon atoms shall be filtered out. More... | |
| Util.BitSet | getOctetRuleCheckAtomTypes () |
| Returns the bit mask of atom types subjected to the octet-rule check during minimization. More... | |
| int | getChargeCountWindow () |
| Returns the configured charge-count window size. More... | |
| None | setChargeCountWindow (int win_size) |
| Sets the maximum allowed difference between the lowest and highest formal charge count of accepted resonance structures. More... | |
| int | getMaxNumGeneratedStructures () |
| Returns the upper limit on the number of resonance structures generated per molecule. More... | |
| None | setMaxNumGeneratedStructures (int max_num) |
| Sets the upper limit on the number of resonance structures generated per molecule. More... | |
| None | generate (MolecularGraph molgraph) |
| Generates all unique resonance structures of the molecular graph molgraph. More... | |
| int | getNumStructures () |
| Returns the number of generated resonance structures. More... | |
| StructureData | getStructureData (int idx) |
| Returns the resonance-structure record at index idx. More... | |
| StructureData | __getitem__ (int idx) |
| int | __len__ () |
Properties | |
| objectID = property(getObjectID) | |
| numStructures = property(getNumStructures) | |
| minOctetRuleViolations = property(octetRuleViolationsMinimized, minimizeOctetRuleViolations) | |
| minSP1GeometryViolations = property(sp1GeometryViolationsMinimized, minimizeSP1GeometryViolations) | |
| minCarbonBond12Charges = property(carbonBond12ChargesMinimized, minimizeCarbonBond12Charges) | |
| octetRuleCheckAtomTypes = property(getOctetRuleCheckAtomTypes) | |
| chargeCountWindow = property(getChargeCountWindow, setChargeCountWindow) | |
| maxNumGeneratedStructures = property(getMaxNumGeneratedStructures, setMaxNumGeneratedStructures) | |
Enumerates the resonance structures of a molecular graph by redistributing π-electrons across the resonance-active bonds.
For each generated resonance structure the per-atom formal charges and per-bond bond-orders are reported as a Chem.ResonanceStructureGenerator.StructureData record. Optional postprocessing minimizes octet-rule violations, sp-hybridization-geometry violations, and 1,2-charge separations on adjacent carbon atoms.
| None CDPL.Chem.ResonanceStructureGenerator.__init__ | ( | ResonanceStructureGenerator | gen | ) |
Constructs a copy of the ResonanceStructureGenerator instance gen.
| gen | The ResonanceStructureGenerator to copy. |
| int CDPL.Chem.ResonanceStructureGenerator.getObjectID | ( | ) |
Returns the numeric identifier (ID) of the wrapped C++ class instance.
Different Python ResonanceStructureGenerator 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 ResonanceStructureGenerator 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().
| ResonanceStructureGenerator CDPL.Chem.ResonanceStructureGenerator.assign | ( | ResonanceStructureGenerator | gen | ) |
Replaces the state of this generator by a copy of the state of gen.
| gen | The source ResonanceStructureGenerator. |
| bool CDPL.Chem.ResonanceStructureGenerator.octetRuleViolationsMinimized | ( | ) |
Tells whether octet-rule violations are minimized.
True if octet-rule violations are minimized, and False otherwise. | None CDPL.Chem.ResonanceStructureGenerator.minimizeOctetRuleViolations | ( | bool | minimize | ) |
Specifies whether resonance structures violating the octet rule shall be filtered out.
| minimize | If True, structures with octet-rule violations on the configured atom types are minimized. |
| bool CDPL.Chem.ResonanceStructureGenerator.sp1GeometryViolationsMinimized | ( | ) |
Tells whether sp-hybridization-geometry violations are minimized.
True if sp-geometry violations are minimized, and False otherwise. | None CDPL.Chem.ResonanceStructureGenerator.minimizeSP1GeometryViolations | ( | bool | minimize | ) |
Specifies whether resonance structures with sp-hybridization-geometry violations shall be filtered out.
| minimize | If True, sp-hybridization-geometry violations are minimized. |
| bool CDPL.Chem.ResonanceStructureGenerator.carbonBond12ChargesMinimized | ( | ) |
Tells whether 1,2-charge separations on adjacent carbon atoms are minimized.
True if 1,2-charged C−C resonance forms are minimized, and False otherwise. | None CDPL.Chem.ResonanceStructureGenerator.minimizeCarbonBond12Charges | ( | bool | minimize | ) |
Specifies whether resonance structures with 1,2-charge separations on adjacent carbon atoms shall be filtered out.
| minimize | If True, 1,2-charged C−C resonance forms are minimized. |
| Util.BitSet CDPL.Chem.ResonanceStructureGenerator.getOctetRuleCheckAtomTypes | ( | ) |
Returns the bit mask of atom types subjected to the octet-rule check during minimization.
| int CDPL.Chem.ResonanceStructureGenerator.getChargeCountWindow | ( | ) |
Returns the configured charge-count window size.
| None CDPL.Chem.ResonanceStructureGenerator.setChargeCountWindow | ( | int | win_size | ) |
Sets the maximum allowed difference between the lowest and highest formal charge count of accepted resonance structures.
| win_size | The new charge-count window size. |
| int CDPL.Chem.ResonanceStructureGenerator.getMaxNumGeneratedStructures | ( | ) |
Returns the upper limit on the number of resonance structures generated per molecule.
| None CDPL.Chem.ResonanceStructureGenerator.setMaxNumGeneratedStructures | ( | int | max_num | ) |
Sets the upper limit on the number of resonance structures generated per molecule.
| max_num | The new output-structure limit. |
| None CDPL.Chem.ResonanceStructureGenerator.generate | ( | MolecularGraph | molgraph | ) |
Generates all unique resonance structures of the molecular graph molgraph.
| molgraph | The molecular graph for which to generate the resonance structures. |
| int CDPL.Chem.ResonanceStructureGenerator.getNumStructures | ( | ) |
Returns the number of generated resonance structures.
| StructureData CDPL.Chem.ResonanceStructureGenerator.getStructureData | ( | int | idx | ) |
Returns the resonance-structure record at index idx.
| idx | The zero-based structure index. |
| Base.IndexError | if the number of resonance structures is zero or idx is not in the range [0, getNumStructures() - 1]. |
| StructureData CDPL.Chem.ResonanceStructureGenerator.__getitem__ | ( | int | idx | ) |
| idx |
| int CDPL.Chem.ResonanceStructureGenerator.__len__ | ( | ) |