Core graph-level algorithms (not requiring stereopermutator information) More...
Data Structures | |
struct | EditDistanceForest |
Forest data structure to calculate exact graph edit distance with. 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... | |
std::vector< AtomIndex > | shortestPaths (AtomIndex a, const PrivateGraph &graph) |
Generates the shortest paths to each vertex in the graph. More... | |
std::vector< AtomIndex > | bfsUniqueDescendants (AtomIndex source, const std::vector< AtomIndex > &descendants, const PrivateGraph &graph) |
Marks each vertex in the graph a unique descendant of a set of vertices adjacent to a starting vertex. More... | |
Core graph-level algorithms (not requiring stereopermutator information)
std::vector<AtomIndex> Scine::Molassembler::GraphAlgorithms::bfsUniqueDescendants | ( | AtomIndex | source, |
const std::vector< AtomIndex > & | descendants, | ||
const PrivateGraph & | graph | ||
) |
Marks each vertex in the graph a unique descendant of a set of vertices adjacent to a starting vertex.
source | BFS source |
descendants | Vertices to classify each vertex a descendant of |
graph | Graph to visit |
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)\)
a | The atom from which to calculate distances |
graph | The graph |
std::vector<AtomIndex> Scine::Molassembler::GraphAlgorithms::shortestPaths | ( | AtomIndex | a, |
const PrivateGraph & | graph | ||
) |
Generates the shortest paths to each vertex in the graph.
Complexity \(\Theta(N)\)
a | Source vertex |
graph | 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
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)\)