RDKit
Open-source cheminformatics and machine learning.
|
#include <Digraph.h>
Public Member Functions | |
Digraph ()=delete | |
Digraph (const Digraph &)=delete | |
Digraph & | operator= (const Digraph &)=delete |
Digraph (const CIPMol &mol, Atom *atom, bool atropsomerMode=false) | |
const CIPMol & | getMol () const |
Node * | getOriginalRoot () const |
Node * | getCurrentRoot () const |
int | getNumNodes () const |
std::vector< Node * > | getNodes (Atom *atom) const |
Atom * | getRule6Ref () const |
void | setRule6Ref (Atom *ref) |
void | changeRoot (Node *newroot) |
void | expand (Node *beg) |
Node & | addNode (std::vector< char > &&visit, Atom *atom, boost::rational< int > &&frac, int dist, int flags) |
A class to hold directed acyclic graphs representing the molecule.
The root of the DAG is one of the foci of the configuration for which the label is being calculated. The tmproot may be set to other nodes that may become relevant in the calculation.
|
delete |
RDKit::CIPLabeler::Digraph::Digraph | ( | const CIPMol & | mol, |
Atom * | atom, | ||
bool | atropsomerMode = false |
||
) |
Node & RDKit::CIPLabeler::Digraph::addNode | ( | std::vector< char > && | visit, |
Atom * | atom, | ||
boost::rational< int > && | frac, | ||
int | dist, | ||
int | flags | ||
) |
Sets the root node of this digraph by flipping the directions of edges as required.
This is more efficient than building a new Digraph, but is only valid for neighboring Nodes.
newroot | the new root |
Node * RDKit::CIPLabeler::Digraph::getCurrentRoot | ( | ) | const |
Get all nodes which refer to atom
in order of distance from the root.
int RDKit::CIPLabeler::Digraph::getNumNodes | ( | ) | const |
Node * RDKit::CIPLabeler::Digraph::getOriginalRoot | ( | ) | const |
Atom * RDKit::CIPLabeler::Digraph::getRule6Ref | ( | ) | const |
Access the reference atom for Rule 6 (if one is set).
Used exclusively for Rule 6, we set one atom as the reference.
ref | reference atom |