Molassembler  3.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
Stereopermutations::Stereopermutation::Occupation 
transferToOccupation (const RankingInformation::RankedSitesType &canonicalSites)
 Condense site ranking information into abstract rank indices for symbolic computation. More...
 
static
Stereopermutations::Stereopermutation::OrderedLinks 
selfReferentialTransform (const std::vector< RankingInformation::Link > &rankingLinks, const RankingInformation::RankedSitesType &canonicalSites)
 Make site-index based links shape-vertex self-referential. More...
 
static
Stereopermutations::Stereopermutation::Occupation 
makeOccupation (const RankingInformation::RankedSitesType &canonicalSites, const Stereopermutations::Stereopermutation::Occupation &canonicalOccupation, const Temple::StrongIndexPermutation< 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.
 
Stereopermutations::Stereopermutation::Occupation occupation
 Abstract 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 Stereopermutations::Stereopermutation::Occupation Scine::Molassembler::Stereopermutators::Abstract::makeOccupation ( const RankingInformation::RankedSitesType canonicalSites,
const Stereopermutations::Stereopermutation::Occupation canonicalOccupation,
const Temple::StrongIndexPermutation< 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 shape-vertex self-referential.

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 Stereopermutations::Stereopermutation::Occupation Scine::Molassembler::Stereopermutators::Abstract::transferToOccupation ( const RankingInformation::RankedSitesType canonicalSites)
static

Condense site ranking information into abstract rank indices 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}
* transferToOccupation(canonical) = {0, 0, 0, 1, 1, 2}
*                                (= AAABBC)
* 

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