RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
RDKit::CIPLabeler::Digraph Class Reference

#include <Digraph.h>

Public Member Functions

 Digraph ()=delete
 
 Digraph (const Digraph &)=delete
 
Digraphoperator= (const Digraph &)=delete
 
 Digraph (const CIPMol &mol, Atom *atom, bool atropsomerMode=false)
 
const CIPMolgetMol () const
 
NodegetOriginalRoot () const
 
NodegetCurrentRoot () const
 
int getNumNodes () const
 
std::vector< Node * > getNodes (Atom *atom) const
 
AtomgetRule6Ref () const
 
void setRule6Ref (Atom *ref)
 
void changeRoot (Node *newroot)
 
void expand (Node *beg)
 
NodeaddNode (std::vector< char > &&visit, Atom *atom, boost::rational< int > &&frac, int dist, int flags)
 

Detailed Description

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.

Definition at line 46 of file Digraph.h.

Constructor & Destructor Documentation

◆ Digraph() [1/3]

RDKit::CIPLabeler::Digraph::Digraph ( )
delete

◆ Digraph() [2/3]

RDKit::CIPLabeler::Digraph::Digraph ( const Digraph )
delete

◆ Digraph() [3/3]

RDKit::CIPLabeler::Digraph::Digraph ( const CIPMol mol,
Atom atom,
bool  atropsomerMode = false 
)

Member Function Documentation

◆ addNode()

Node & RDKit::CIPLabeler::Digraph::addNode ( std::vector< char > &&  visit,
Atom atom,
boost::rational< int > &&  frac,
int  dist,
int  flags 
)

◆ changeRoot()

void RDKit::CIPLabeler::Digraph::changeRoot ( Node newroot)

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.

Parameters
newrootthe new root

◆ expand()

void RDKit::CIPLabeler::Digraph::expand ( Node beg)

◆ getCurrentRoot()

Node * RDKit::CIPLabeler::Digraph::getCurrentRoot ( ) const

◆ getMol()

const CIPMol & RDKit::CIPLabeler::Digraph::getMol ( ) const

◆ getNodes()

std::vector< Node * > RDKit::CIPLabeler::Digraph::getNodes ( Atom atom) const

Get all nodes which refer to atom in order of distance from the root.

◆ getNumNodes()

int RDKit::CIPLabeler::Digraph::getNumNodes ( ) const

◆ getOriginalRoot()

Node * RDKit::CIPLabeler::Digraph::getOriginalRoot ( ) const

◆ getRule6Ref()

Atom * RDKit::CIPLabeler::Digraph::getRule6Ref ( ) const

Access the reference atom for Rule 6 (if one is set).

◆ operator=()

Digraph & RDKit::CIPLabeler::Digraph::operator= ( const Digraph )
delete

◆ setRule6Ref()

void RDKit::CIPLabeler::Digraph::setRule6Ref ( Atom ref)

Used exclusively for Rule 6, we set one atom as the reference.

Parameters
refreference atom

The documentation for this class was generated from the following file: