![]() |
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 33 of file Resonance.h.
Definition at line 35 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)
|
inline |
Returns the flags the ResonanceMolSupplier was initialized with
Definition at line 77 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
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
|
inline |
Returns true if resonance structure enumeration has already happened
Definition at line 99 of file Resonance.h.
|
inline |
Returns the number of individual conjugated groups in the molecule
Definition at line 80 of file Resonance.h.
unsigned int RDKit::ResonanceMolSupplier::length | ( | ) |
Returns the number of resonance structures in the ResonanceMolSupplier
|
inline |
Returns a reference to the Kekulized form of the ROMol the ResonanceMolSupplier was initialized with
Definition at line 74 of file Resonance.h.
void RDKit::ResonanceMolSupplier::moveTo | ( | unsigned int | idx | ) |
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
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
void RDKit::ResonanceMolSupplier::reset | ( | ) |
Resets the ResonanceMolSupplier index
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)