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

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.
 

Detailed Description

Class to compute the set of abstract permutations from ranking and shape.

Constructor & Destructor Documentation

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!)\)

Parameters
rankingRanking object indicating chemical differences between substituents and sites
shapeShape name

Member Function Documentation

static RankingInformation::RankedSitesType Scine::Molassembler::Stereopermutators::Abstract::canonicalize ( RankingInformation::RankedSitesType  rankedSites)
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 std::vector<char> Scine::Molassembler::Stereopermutators::Abstract::makeStereopermutationCharacters ( const RankingInformation::RankedSitesType canonicalSites,
const std::vector< char > &  canonicalStereopermutationCharacters,
const Temple::StrongIndexFlatMap< Shapes::Vertex, SiteIndex > &  sitesAtShapeVertices 
)
static

Generates the reduced character representation of sites at their current shape positions.

Complexity \(O(S^2)\) worst case

static Stereopermutations::Stereopermutation::OrderedLinks Scine::Molassembler::Stereopermutators::Abstract::selfReferentialTransform ( const std::vector< RankingInformation::Link > &  rankingLinks,
const RankingInformation::RankedSitesType canonicalSites 
)
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 std::vector<char> Scine::Molassembler::Stereopermutators::Abstract::transferToSymbolicCharacters ( const RankingInformation::RankedSitesType canonicalSites)
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
* 

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