RDKit
Open-source cheminformatics and machine learning.
|
Namespaces | |
namespace | detail |
Classes | |
class | AtomCompareFunctor |
struct | bondholder |
struct | canon_atom |
class | ChiralAtomCompareFunctor |
class | MolStackElem |
these are the actual elements in the molecular stack More... | |
union | MolStackUnion |
used to store components in the molecular stack More... | |
class | SpecialChiralityAtomCompareFunctor |
class | SpecialSymmetryAtomCompareFunctor |
Typedefs | |
typedef std::vector< MolStackElem > | MolStack |
typedef std::tuple< int, int, Bond * > | PossibleType |
used to represent possible branches from an atom | |
Enumerations | |
enum | AtomColors { WHITE_NODE = 0 , GREY_NODE , BLACK_NODE } |
used in traversals of the molecule More... | |
enum | MolStackTypes { MOL_STACK_ATOM = 0 , MOL_STACK_BOND , MOL_STACK_RING , MOL_STACK_BRANCH_OPEN , MOL_STACK_BRANCH_CLOSE } |
used to indicate types of entries in the molecular stack: More... | |
Variables | |
const int | MAX_NATOMS = 5000 |
used in the canonical traversal code | |
const int | MAX_CYCLES = 1000 |
used in the canonical traversal code | |
const int | MAX_BONDTYPE = 32 |
used in the canonical traversal code | |
const unsigned int | ATNUM_CLASS_OFFSET = 10000 |
typedef std::vector<MolStackElem> RDKit::Canon::MolStack |
typedef std::tuple<int, int, Bond *> RDKit::Canon::PossibleType |
RDKIT_GRAPHMOL_EXPORT void RDKit::Canon::ActivatePartitions | ( | unsigned int | nAtoms, |
int * | order, | ||
int * | count, | ||
int & | activeset, | ||
int * | next, | ||
int * | changed | ||
) |
void RDKit::Canon::BreakTies | ( | const ROMol & | mol, |
canon_atom * | atoms, | ||
CompareFunc | compar, | ||
int | mode, | ||
int * | order, | ||
int * | count, | ||
int & | activeset, | ||
int * | next, | ||
int * | changed, | ||
char * | touchedPartitions | ||
) |
Definition at line 746 of file new_canon.h.
References RDKit::Canon::canon_atom::degree, RDKit::ROMol::getNumAtoms(), RDKit::Canon::canon_atom::index, RDKit::Canon::canon_atom::nbrIds, RDKit::rdvalue_is(), and RefinePartitions().
RDKIT_GRAPHMOL_EXPORT void RDKit::Canon::canonicalizeEnhancedStereo | ( | ROMol & | mol, |
const std::vector< unsigned int > * | atomRanks = nullptr |
||
) |
Canonicalizes the atom stereo labels in enhanced stereo groups.
For example, after calling this function the chiral centers in the molecules C[C@H](F)Cl |&1:1|
and C[C@@H](F)Cl |&1:1|
will have the same chiral tags.
RDKIT_GRAPHMOL_EXPORT void RDKit::Canon::canonicalizeFragment | ( | ROMol & | mol, |
int | atomIdx, | ||
std::vector< AtomColors > & | colors, | ||
const std::vector< unsigned int > & | ranks, | ||
MolStack & | molStack, | ||
const boost::dynamic_bitset<> * | bondsInPlay = nullptr , |
||
const std::vector< std::string > * | bondSymbols = nullptr , |
||
bool | doIsomericSmiles = false , |
||
bool | doRandom = false , |
||
bool | doChiralInversions = true |
||
) |
constructs the canonical traversal order for a molecular fragment
mol | the ROMol we're working on |
atomIdx | the index of the atom to start the traversal from |
colors | the traversal status of each atom in mol |
ranks | the assigned rank of each atom in mol |
molStack | the current traversal stack (used to return the results) |
Notes
mol
will, in general, be modified by this operation as bond directions and the like are changed to fit the canonical traversal order RDKIT_GRAPHMOL_EXPORT bool RDKit::Canon::chiralAtomNeedsTagInversion | ( | const RDKit::ROMol & | mol, |
const RDKit::Atom * | atom, | ||
bool | isAtomFirst, | ||
size_t | numClosures | ||
) |
Check if a chiral atom needs to have its tag flipped after reading or before writing SMILES
RDKIT_GRAPHMOL_EXPORT void RDKit::Canon::chiralRankMolAtoms | ( | const ROMol & | mol, |
std::vector< unsigned int > & | res | ||
) |
RDKIT_GRAPHMOL_EXPORT void RDKit::Canon::CreateSinglePartition | ( | unsigned int | nAtoms, |
int * | order, | ||
int * | count, | ||
canon_atom * | atoms | ||
) |
RDKIT_GRAPHMOL_EXPORT void RDKit::Canon::initCanonAtoms | ( | const ROMol & | mol, |
std::vector< Canon::canon_atom > & | atoms, | ||
bool | includeChirality = true |
||
) |
RDKIT_GRAPHMOL_EXPORT void RDKit::Canon::rankFragmentAtoms | ( | const ROMol & | mol, |
std::vector< unsigned int > & | res, | ||
const boost::dynamic_bitset<> & | atomsInPlay, | ||
const boost::dynamic_bitset<> & | bondsInPlay, | ||
const std::vector< std::string > * | atomSymbols, | ||
const std::vector< std::string > * | bondSymbols, | ||
bool | breakTies, | ||
bool | includeChirality, | ||
bool | includeIsotope, | ||
bool | includeAtomMaps | ||
) |
Referenced by rankFragmentAtoms().
|
inline |
Definition at line 820 of file new_canon.h.
References rankFragmentAtoms(), and RDKit::rdvalue_is().
RDKIT_GRAPHMOL_EXPORT void RDKit::Canon::rankMolAtoms | ( | const ROMol & | mol, |
std::vector< unsigned int > & | res, | ||
bool | breakTies = true , |
||
bool | includeChirality = true , |
||
bool | includeIsotopes = true , |
||
bool | includeAtomMaps = true |
||
) |
void RDKit::Canon::RefinePartitions | ( | const ROMol & | mol, |
canon_atom * | atoms, | ||
CompareFunc | compar, | ||
int | mode, | ||
int * | order, | ||
int * | count, | ||
int & | activeset, | ||
int * | next, | ||
int * | changed, | ||
char * | touchedPartitions | ||
) |
Definition at line 649 of file new_canon.h.
References RDKit::Canon::canon_atom::degree, RDKit::ROMol::getNumAtoms(), RDKit::hanoisort(), RDKit::Canon::canon_atom::index, RDKit::Canon::canon_atom::nbrIds, and RDKit::rdvalue_is().
Referenced by BreakTies().
RDKIT_GRAPHMOL_EXPORT void RDKit::Canon::updateAtomNeighborIndex | ( | canon_atom * | atoms, |
std::vector< bondholder > & | nbrs | ||
) |
RDKIT_GRAPHMOL_EXPORT void RDKit::Canon::updateAtomNeighborNumSwaps | ( | canon_atom * | atoms, |
std::vector< bondholder > & | nbrs, | ||
unsigned int | atomIdx, | ||
std::vector< std::pair< unsigned int, unsigned int > > & | result | ||
) |
Definition at line 522 of file new_canon.h.
Referenced by RDKit::Canon::ChiralAtomCompareFunctor::operator()().