Class to compute the set of abstract permutations from ranking and shape. More...
#include <AbstractPermutations.h>
Public Member Functions | |
Constructors | |
Abstract ()=default | |
Empty initializer, all data members are nulled. | |
Abstract (const RankingInformation &ranking, Shapes::Shape shape) | |
Generates the set of abstract stereopermutations and intermediate data. More... | |
Static Public Member Functions | |
Static functions | |
static RankingInformation::RankedSitesType | canonicalize (RankingInformation::RankedSitesType rankedSites) |
Stably re-sort ranked site indices in decreasing set size. More... | |
static std::vector< char > | transferToSymbolicCharacters (const RankingInformation::RankedSitesType &canonicalSites) |
Condense site ranking information into canonical characters for symbolic computation. More... | |
static Stereopermutations::Stereopermutation::OrderedLinks | selfReferentialTransform (const std::vector< RankingInformation::Link > &rankingLinks, const RankingInformation::RankedSitesType &canonicalSites) |
Make site-index based links self-referential within canonical sites. More... | |
static std::vector< char > | makeStereopermutationCharacters (const RankingInformation::RankedSitesType &canonicalSites, const std::vector< char > &canonicalStereopermutationCharacters, const Temple::StrongIndexFlatMap< Shapes::Vertex, SiteIndex > &sitesAtShapeVertices) |
Generates the reduced character representation of sites at their current shape positions. More... | |
Data Fields | |
Data members | |
RankingInformation::RankedSitesType | canonicalSites |
Stably resorted (by set size) site ranking. | |
std::vector< char > | symbolicCharacters |
Character representation of bonding case. | |
Stereopermutations::Stereopermutation::OrderedLinks | selfReferentialLinks |
Self-referential representation of links. | |
Stereopermutations::Uniques | permutations |
Vector of rotationally unique stereopermutations with associated weights. | |
Class to compute the set of abstract permutations from ranking and shape.
Scine::Molassembler::Stereopermutators::Abstract::Abstract | ( | const RankingInformation & | ranking, |
Shapes::Shape | shape | ||
) |
Generates the set of abstract stereopermutations and intermediate data.
Complexity The generation of permutations dominates: \(\Theta(S!)\)
ranking | Ranking object indicating chemical differences between substituents and sites |
shape | Shape name |
|
static |
Stably re-sort ranked site indices in decreasing set size.
Necessary to avoid treating e.g. AAB and ABB separately, although the resulting assignments are identical.
Complexity \(N \log N\)
Example:
* rankedSites = {5, 8}, {3}, {1, 2, 4} * canonicalize(rankedSites) = {1, 2, 4}, {5, 8}, {3} *
|
static |
Generates the reduced character representation of sites at their current shape positions.
Complexity \(O(S^2)\) worst case
|
static |
Make site-index based links self-referential within canonical sites.
Complexity \(\Theta(L)\)
Example:
* links = {sites = {5, 8}} * * self-refential idx: 0 1 2 3 4 5 * canonicalSites = {1, 2, 4}, {5, 8}, {3} (this is output from canonicalize) * * selfReferentialTransform(links, canonicalSites) = {3, 4} *
|
static |
Condense site ranking information into canonical characters for symbolic computation.
Use the output of canonicalize here as input:
Complexity \(\Theta(N)\)
Example:
* rankedSites = {5, 8}, {3}, {1, 2, 4} * canonical = canonicalize(rankedSites = {1, 2, 4}, {5, 8}, {3} * transferToSymbolicCharacetrs(canonical) = A, A, A, B, B, C *