![]() |
RDKit
Open-source cheminformatics and machine learning.
|
#include <Resonance.h>
Public Types | |
| enum | ResonanceFlags { ALLOW_INCOMPLETE_OCTETS = (1 << 0), ALLOW_CHARGE_SEPARATION = (1 << 1), KEKULE_ALL = (1 << 2), UNCONSTRAINED_CATIONS = (1 << 3), UNCONSTRAINED_ANIONS = (1 << 4) } |
Public Member Functions | |
| ResonanceMolSupplier (ROMol &mol, unsigned int flags=0, unsigned int maxStructs=1000) | |
| ~ResonanceMolSupplier () | |
| const ROMol & | mol () const |
| unsigned int | flags () const |
| unsigned int | getNumConjGrps () const |
| int | getBondConjGrpIdx (unsigned int bi) const |
| int | getAtomConjGrpIdx (unsigned int ai) const |
| void | setNumThreads (int numThreads=1) |
| void | enumerate () |
| bool | getIsEnumerated () |
| unsigned int | length () |
| void | reset () |
| bool | atEnd () |
| ROMol * | next () |
| void | moveTo (unsigned int idx) |
| ROMol * | operator[] (unsigned int idx) |
Definition at line 32 of file Resonance.h.
Definition at line 34 of file Resonance.h.
| RDKit::ResonanceMolSupplier::ResonanceMolSupplier | ( | ROMol & | mol, |
| unsigned int | flags = 0, |
||
| unsigned int | maxStructs = 1000 |
||
| ) |
| mol | - the starter molecule |
| flags | - flags which influence criteria to generate resonance structures |
| maxStructs | - maximum number of complete resonance structures generated |
| numThreads | - the number of threads used to carry out the resonance structure enumeration (defaults to 1; 0 selects the number of concurrent threads supported by the hardware; negative values are added to the number of concurrent threads supported by the hardware) |
Referenced by getIsEnumerated().
| RDKit::ResonanceMolSupplier::~ResonanceMolSupplier | ( | ) |
| bool RDKit::ResonanceMolSupplier::atEnd | ( | ) |
Returns true if there are no more resonance structures left
Referenced by getIsEnumerated().
| void RDKit::ResonanceMolSupplier::enumerate | ( | ) |
Ask ResonanceMolSupplier to enumerate resonance structures (automatically done as soon as any attempt to access them is made)
Referenced by getNumConjGrps().
|
inline |
Returns the flags the ResonanceMolSupplier was initialized with
Definition at line 76 of file Resonance.h.
| int RDKit::ResonanceMolSupplier::getAtomConjGrpIdx | ( | unsigned int | ai | ) | const |
Given an atom index, it returns the index of the conjugated group the atom belongs to, or -1 if it is not conjugated
Referenced by getNumConjGrps().
| int RDKit::ResonanceMolSupplier::getBondConjGrpIdx | ( | unsigned int | bi | ) | const |
Given a bond index, it returns the index of the conjugated group the bond belongs to, or -1 if it is not conjugated
Referenced by getNumConjGrps().
|
inline |
Returns true if resonance structure enumeration has already happened
Definition at line 98 of file Resonance.h.
References atEnd(), length(), mol(), moveTo(), next(), operator[](), reset(), and ResonanceMolSupplier().
|
inline |
Returns the number of individual conjugated groups in the molecule
Definition at line 79 of file Resonance.h.
References enumerate(), getAtomConjGrpIdx(), getBondConjGrpIdx(), and setNumThreads().
| unsigned int RDKit::ResonanceMolSupplier::length | ( | ) |
Returns the number of resonance structures in the ResonanceMolSupplier
Referenced by getIsEnumerated().
|
inline |
Returns a reference to the Kekulized form of the ROMol the ResonanceMolSupplier was initialized with
Definition at line 73 of file Resonance.h.
Referenced by getIsEnumerated().
| void RDKit::ResonanceMolSupplier::moveTo | ( | unsigned int | idx | ) |
Sets the ResonanceMolSupplier index to idx
Referenced by getIsEnumerated().
| ROMol* RDKit::ResonanceMolSupplier::next | ( | ) |
Returns a pointer to the next resonance structure as a ROMol, or NULL if there are no more resonance structures left. The caller is responsible for freeing memory associated to the pointer
Referenced by getIsEnumerated().
| ROMol* RDKit::ResonanceMolSupplier::operator[] | ( | unsigned int | idx | ) |
Returns a pointer to the resonance structure with index idx as a ROMol. The index generates complete resonance structures by combining ConjElectrons objects for the respective conjugated groups in a breadth-first fashion, in order to return the most stable complete resonance structures first. The caller is responsible for freeing memory associated to the pointer
Referenced by getIsEnumerated().
| void RDKit::ResonanceMolSupplier::reset | ( | ) |
Resets the ResonanceMolSupplier index
Referenced by getIsEnumerated().
| void RDKit::ResonanceMolSupplier::setNumThreads | ( | int | numThreads = 1 | ) |
Sets the number of threads to be used to enumerate resonance structures (defaults to 1; 0 selects the number of concurrent threads supported by the hardware; negative values are added to the number of concurrent threads supported by the hardware)
Referenced by getNumConjGrps().