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 | setProgressCallback (ResonanceMolSupplierCallback *callback) |
ResonanceMolSupplierCallback * | getProgressCallback () const |
bool | wasCanceled () const |
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 86 of file Resonance.h.
Definition at line 88 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) |
RDKit::ResonanceMolSupplier::~ResonanceMolSupplier | ( | ) |
bool RDKit::ResonanceMolSupplier::atEnd | ( | ) |
Returns true if there are no more resonance structures left
void RDKit::ResonanceMolSupplier::enumerate | ( | ) |
Ask ResonanceMolSupplier to enumerate resonance structures (automatically done as soon as any attempt to access them is made)
Returns the flags the ResonanceMolSupplier was initialized with
Definition at line 135 of file Resonance.h.
Given an atom index, it returns the index of the conjugated group the atom belongs to, or -1 if it is not conjugated
Given a bond index, it returns the index of the conjugated group the bond belongs to, or -1 if it is not conjugated
|
inline |
Returns true if resonance structure enumeration has already happened
Definition at line 175 of file Resonance.h.
Returns the number of individual conjugated groups in the molecule
Definition at line 138 of file Resonance.h.
|
inline |
Get the pointer to the ResonanceMolSupplierCallback subclass instance (do not delete it, has the ResonanceMolSupplier takes ownership of the pointer), or nullptr if none was set.
Definition at line 161 of file Resonance.h.
Returns the number of resonance structures in the ResonanceMolSupplier
Returns a reference to the Kekulized form of the ROMol the ResonanceMolSupplier was initialized with
Definition at line 132 of file Resonance.h.
Sets the ResonanceMolSupplier index to idx
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
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
void RDKit::ResonanceMolSupplier::reset | ( | ) |
Resets the ResonanceMolSupplier index
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)
void RDKit::ResonanceMolSupplier::setProgressCallback | ( | ResonanceMolSupplierCallback * | callback | ) |
Pass a pointer to an instance of a class derived from ResonanceMolSupplierCallback, which must implement the callback() method. The ResonanceMolSupplier takes ownership of the pointer, which must not be deleted.
|
inline |
Returns true if the resonance structure generation was canceled before completion due to the ResMolSupplierProgressCallback having returned false.
Definition at line 168 of file Resonance.h.