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

Core graph-level algorithms (not requiring stereopermutator information) More...

Functions

std::vector
< RankingInformation::Link
siteLinks (const PrivateGraph &graph, const AtomStereopermutator &stereopermutatorA, const AtomStereopermutator &stereopermutatorB)
 Find links between two adjacent stereopermutators, returns unordered links. More...
 
std::vector
< RankingInformation::Link
siteLinks (const PrivateGraph &graph, AtomIndex source, const std::vector< std::vector< AtomIndex > > &sites, const std::vector< AtomIndex > &excludeAdjacents)
 Find links between substituent atoms, returns ordered links. More...
 
std::vector< std::vector
< AtomIndex >> 
sites (const PrivateGraph &graph, AtomIndex placement, const std::vector< AtomIndex > &excludeAdjacents={})
 Differentiate adjacent vertices of a central index into sites. More...
 
void updateEtaBonds (PrivateGraph &graph)
 For each atom, determine sites and set eta bond for haptic sites. More...
 
std::vector< unsigned > distance (AtomIndex a, const PrivateGraph &graph)
 Calculates the graph distance from an atom to all other atoms of the molecule. More...
 

Detailed Description

Core graph-level algorithms (not requiring stereopermutator information)

Function Documentation

std::vector<unsigned> Scine::Molassembler::GraphAlgorithms::distance ( AtomIndex  a,
const PrivateGraph &  graph 
)

Calculates the graph distance from an atom to all other atoms of the molecule.

Complexity \(\Theta(N)\)

Parameters
aThe atom from which to calculate distances
graphThe graph
Returns
A list of graph distances for each atom of the graph
std::vector<RankingInformation::Link> Scine::Molassembler::GraphAlgorithms::siteLinks ( const PrivateGraph &  graph,
const AtomStereopermutator &  stereopermutatorA,
const AtomStereopermutator &  stereopermutatorB 
)

Find links between two adjacent stereopermutators, returns unordered links.

Complexity \(\Theta(R)\) where \(R\) is the number of relevant cycles containing both stereopermutators' central indices

std::vector<RankingInformation::Link> Scine::Molassembler::GraphAlgorithms::siteLinks ( const PrivateGraph &  graph,
AtomIndex  source,
const std::vector< std::vector< AtomIndex > > &  sites,
const std::vector< AtomIndex > &  excludeAdjacents 
)

Find links between substituent atoms, returns ordered links.

Complexity \(O(S^2)\) where \(S\) is the number of substituents of the central vertex

std::vector< std::vector<AtomIndex>> Scine::Molassembler::GraphAlgorithms::sites ( const PrivateGraph &  graph,
AtomIndex  placement,
const std::vector< AtomIndex > &  excludeAdjacents = {} 
)

Differentiate adjacent vertices of a central index into sites.

A site is made up of all immediately group-internally-adjacent substituents of a central index. The reverse subdivision starting from a ligand may be more intuitive: A ligand may be multidentate and have varying hapticity at any shape position. It consists of bonding atoms (those connecting to the central metal) and non-bonding atoms (which may make up a linker or other extraneous groups). Bonding atoms can be subdivided into connected components that are separated by non-bonding atoms, each of which make up a possibly haptic group. These are called sites because they each take up a site of the central index's coordination shape.

Complexity \(\Theta(S)\) where \(S\) is the number of substituents of the central vertex

Postcondition
Each site's list of constituting atom indices is sorted.
void Scine::Molassembler::GraphAlgorithms::updateEtaBonds ( PrivateGraph &  graph)

For each atom, determine sites and set eta bond for haptic sites.

Cycle through all atoms, determine the sites and set the eta bond type for atoms constituting haptic ligand sites.

Complexity \(\Theta(N)\)