Molassembler  1.0.0
Molecule graph and conformer library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Scine::Molassembler::Cycles Class Reference

Wrapper class to make working with RDL in C++ more pleasant. More...

#include <Cycles.h>

Data Structures

class  AllCyclesIterator
 Iterator for all relevant cycles of the graph. More...
 
class  UrfIdsCycleIterator
 Iterator for cycles of specific universal ring families. More...
 

Public Member Functions

Special member functions
 Cycles (const Graph &sourceGraph, bool ignoreEtaBonds=true)
 Constructor from outer graph. More...
 
 Cycles (const PrivateGraph &innerGraph, bool ignoreEtaBonds=true)
 
Information
unsigned numCycleFamilies () const
 Returns the number of unique ring families (URFs) More...
 
unsigned numCycleFamilies (AtomIndex index) const
 Returns the number of unique ring families (URFs) an index is involved in. More...
 
unsigned numCycleFamilies (const BondIndex &bond) const
 Returns the number of unique ring families (URFs) a bond is in. More...
 
unsigned numRelevantCycles () const
 Returns the number of relevant cycles (RCs) More...
 
unsigned numRelevantCycles (AtomIndex index) const
 Returns the number of relevant cycles (RCs) More...
 
unsigned numRelevantCycles (const BondIndex &index) const
 Returns the number of relevant cycles (RCs) a bond is in. More...
 
RDL_data * dataPtr () const
 Provide access to calculated data.
 
Iterators
AllCyclesIterator begin () const
 
AllCyclesIterator end () const
 
Ranges
IteratorRange
< UrfIdsCycleIterator
containing (AtomIndex atom) const
 Range of relevant cycles containing an atom. More...
 
IteratorRange
< UrfIdsCycleIterator
containing (const BondIndex &bond) const
 Range of relevant cycles containing a bond. More...
 
IteratorRange
< UrfIdsCycleIterator
containing (const std::vector< BondIndex > &bonds) const
 Range of relevant cycles containing several bonds. More...
 
Operators
bool operator== (const Cycles &other) const
 Must be copy of another to compare equal. Constructed from same graph does not suffice.
 
bool operator!= (const Cycles &other) const
 Must be copy of another to compare equal. Constructed from same graph does not suffice.
 

Private Attributes

std::shared_ptr< RdlDataPtrs > rdlPtr_
 
std::unordered_map< BondIndex,
std::vector< unsigned >
, boost::hash< BondIndex > > 
urfMap_
 

Detailed Description

Wrapper class to make working with RDL in C++ more pleasant.

Calculated data from a graph is movable, copyable and assignable in all the usual ways, and is therefore suited for caching. Equality comparison of this type and its nested types follows same-base, not equal-base logic of comparison due to management of the C pointer types and the associated allocated memory using shared_ptrs.

Note
Keep in mind that if a node is part of a URF, that does NOT imply that it is also part of each RC of that URF.

Constructor & Destructor Documentation

Scine::Molassembler::Cycles::Cycles ( const Graph sourceGraph,
bool  ignoreEtaBonds = true 
)

Constructor from outer graph.

Complexity Approximately linear in the number of bonds in cycles

Scine::Molassembler::Cycles::Cycles ( const PrivateGraph innerGraph,
bool  ignoreEtaBonds = true 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Member Function Documentation

IteratorRange<UrfIdsCycleIterator> Scine::Molassembler::Cycles::containing ( AtomIndex  atom) const

Range of relevant cycles containing an atom.

Complexity \(O(U)\) where \(U\) is the number of unique ring families of the molecule

IteratorRange<UrfIdsCycleIterator> Scine::Molassembler::Cycles::containing ( const BondIndex bond) const

Range of relevant cycles containing a bond.

Complexity \(\Theta(1)\)

IteratorRange<UrfIdsCycleIterator> Scine::Molassembler::Cycles::containing ( const std::vector< BondIndex > &  bonds) const

Range of relevant cycles containing several bonds.

Complexity \(\Theta(B)\) where \(B\) is the number of bonds in the parameters

unsigned Scine::Molassembler::Cycles::numCycleFamilies ( ) const

Returns the number of unique ring families (URFs)

Complexity \(\Theta(1)\)

unsigned Scine::Molassembler::Cycles::numCycleFamilies ( AtomIndex  index) const

Returns the number of unique ring families (URFs) an index is involved in.

Complexity \(\Theta(U)\) where \(U\) is the number of unique ring families in the molecule

unsigned Scine::Molassembler::Cycles::numCycleFamilies ( const BondIndex bond) const

Returns the number of unique ring families (URFs) a bond is in.

Complexity \(\Theta(U)\) where \(U\) is the number of unique ring families in the molecule

unsigned Scine::Molassembler::Cycles::numRelevantCycles ( ) const

Returns the number of relevant cycles (RCs)

Complexity \(\Theta(1)\)

unsigned Scine::Molassembler::Cycles::numRelevantCycles ( AtomIndex  index) const

Returns the number of relevant cycles (RCs)

Complexity \(\Theta(U)\) where \(U\) is the number of unique ring families in the molecule

unsigned Scine::Molassembler::Cycles::numRelevantCycles ( const BondIndex index) const

Returns the number of relevant cycles (RCs) a bond is in.

Complexity \(\Theta(U)\) where \(U\) is the number of unique ring families in the molecule


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