Classes | Typedefs | Enumerations | Functions | Variables

Canon Namespace Reference

Classes

union  MolStackUnion
 used to store components in the molecular stack More...
class  MolStackElem
 these are the actual elements in the molecular stack More...

Typedefs

typedef std::vector< MolStackElemMolStack
typedef std::pair< int,
std::pair< int, RDKit::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...

Functions

PossibleType makePossible (int rank, int atomIdx, RDKit::Bond *bond)
 returns a PossibleType
int _possibleComp (const PossibleType &arg1, const PossibleType &arg2)
 compare two PossibleTypes
void canonicalizeFragment (RDKit::ROMol &mol, int atomIdx, std::vector< AtomColors > &colors, std::vector< int > &ranks, MolStack &molStack)
 constructs the canonical traversal order for a molecular fragment

Variables

const int MAX_NATOMS = 5000
 used in the canonical traversal code
const int MAX_CYCLES = 99
 used in the canonical traversal code

Typedef Documentation

typedef std::vector<MolStackElem> Canon::MolStack

Definition at line 88 of file Canon.h.

typedef std::pair< int, std::pair< int, RDKit::Bond * > > Canon::PossibleType

used to represent possible branches from an atom

Definition at line 92 of file Canon.h.


Enumeration Type Documentation

used in traversals of the molecule

Enumerator:
WHITE_NODE 
GREY_NODE 

not visited

BLACK_NODE 

visited, but not finished

Definition at line 24 of file Canon.h.

used to indicate types of entries in the molecular stack:

Enumerator:
MOL_STACK_ATOM 

an Atom

MOL_STACK_BOND 

a Bond

MOL_STACK_RING 

a ring closure

MOL_STACK_BRANCH_OPEN 

beginning of a branch

MOL_STACK_BRANCH_CLOSE 

end of a branch

Definition at line 31 of file Canon.h.


Function Documentation

int Canon::_possibleComp ( const PossibleType &  arg1,
const PossibleType &  arg2 
)

compare two PossibleTypes

void Canon::canonicalizeFragment ( RDKit::ROMol mol,
int  atomIdx,
std::vector< AtomColors > &  colors,
std::vector< int > &  ranks,
MolStack &  molStack 
)

constructs the canonical traversal order for a molecular fragment

Parameters:
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
PossibleType Canon::makePossible ( int  rank,
int  atomIdx,
RDKit::Bond bond 
)

returns a PossibleType


Variable Documentation

const int Canon::MAX_CYCLES = 99

used in the canonical traversal code

Definition at line 21 of file Canon.h.

const int Canon::MAX_NATOMS = 5000

used in the canonical traversal code

Definition at line 20 of file Canon.h.