Molassembler  3.0.0
Molecule graph and conformer library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Scine::Molassembler::Stereopermutations::Composite Class Reference

Represents the composite of two shapes joined by a bond at arbitrary shape vertices. More...

#include <Composites.h>

Data Structures

struct  AngleGroup
 A group of shape vertices at an angle from the fused position. More...
 
struct  OrientationState
 Encompasses the orientation of a shape along a fused bond. More...
 
struct  Permutation
 Class representing a single rotational permutation. More...
 
struct  PermutationGenerator
 

Public Types

Member types
enum  Alignment { Alignment::Eclipsed, Alignment::Staggered, Alignment::EclipsedAndStaggered, Alignment::BetweenEclipsedAndStaggered }
 Relative orientation of substituent groups along the dihedral. More...
 
using PermutationsList = std::vector< Permutation >
 Relative orientation of substituent groups along the dihedral.
 

Public Member Functions

Constructors
 Composite (OrientationState first, OrientationState second, Alignment alignment=Alignment::Eclipsed)
 Constructor calculating all permutations. More...
 
Modification
void applyIdentifierPermutation (const std::vector< std::size_t > &permutation)
 
template<typename F >
void updateIdentifiers (F f)
 
Information
const PermutationsListallPermutations () const
 Returns all permutations, including ranking-duplicates.
 
bool isIsotropic () const
 Returns whether the Composite is isotropic overall. More...
 
std::pair< unsigned, unsigned > orders () const
 Returns the number of relevant substituent shape vertices for each side.
 
unsigned order () const
 Returns the higher number of relevant substituent shape vertices of both sides. More...
 
unsigned rotationalAxisSymmetryOrder () const
 Rotational axis symmetry element order.
 
const Temple::OrderedPair
< OrientationState > & 
orientations () const
 Returns the orientation state of the composite. More...
 
unsigned rankingEquivalentBase (unsigned permutation) const
 Index of the ranking equivalent base to a permutation.
 
std::vector< unsigned > nonEquivalentPermutationIndices () const
 List of all base permutation indices (without ranking-equivalents)
 
unsigned countNonEquivalentPermutations () const
 Returns the number of non-ranking-equivalent permutations for this Composite. More...
 
Alignment alignment () const
 Returns the alignment with which the Composite was generated with. More...
 
Iterators
PermutationsList::const_iterator begin () const
 Through-iteration of all generated dihedral permutations.
 
PermutationsList::const_iterator end () const
 Through-iteration of all generated dihedral permutations.
 
Operators
bool operator< (const Composite &other) const
 Less-than comparison by orientations()
 
bool operator== (const Composite &other) const
 Equality comparison by orientations()
 
bool operator!= (const Composite &other) const
 Inequality comparison by orientations()
 

Static Private Member Functions

static double perpendicularSubstituentAngle (double angleFromBoundShapeVertex, double angleBetweenSubstituents)
 Calculates the angle between two substituents that have the same angle from the bound shape vertices in a plane perpendicular to their shared axis. More...
 

Private Attributes

Private state
Temple::OrderedPair
< OrientationState
orientations_
 Stores the relative orientation with which the permutations were generated.
 
PermutationsList stereopermutations_
 List of dihedral sets that comprise all spatial arrangements.
 
Alignment alignment_
 Stores with which Alignment the stereopermutations were generated.
 

Static members

static constexpr
Temple::Floating::ExpandedAbsoluteEqualityComparator
< double > 
fpComparator
 1° absolute tolerance floating point comparison helper for angle groups More...
 
static std::vector
< Shapes::Vertex
generateRotation (Shapes::Shape shape, Shapes::Vertex fixedVertex, const std::vector< Shapes::Vertex > &changedVertices)
 Generates a shape rotation subject to constraints. More...
 
static std::vector
< Shapes::Vertex
rotation (Shapes::Shape shape, Shapes::Vertex fixedVertex, const std::vector< Shapes::Vertex > &perpendicularPlaneVertices)
 1° absolute tolerance floating point comparison helper for angle groups
 

Detailed Description

Represents the composite of two shapes joined by a bond at arbitrary shape vertices.

Acts as a container-like type for the generated stereopermutations after construction.

Member Enumeration Documentation

Relative orientation of substituent groups along the dihedral.

Enumerator
Eclipsed 

At least two substituents eclipse one another along the axis.

Staggered 

At least one pair of substituents are staggered along the axis.

EclipsedAndStaggered 

Both eclipsed and staggered alignments.

BetweenEclipsedAndStaggered 

Offset exactly halfway between eclipsed and staggered alignments.

Constructor & Destructor Documentation

Scine::Molassembler::Stereopermutations::Composite::Composite ( OrientationState  first,
OrientationState  second,
Alignment  alignment = Alignment::Eclipsed 
)

Constructor calculating all permutations.

Complexity \(O(S!)\) where S is the size of the larger shape of the two OrientationState instances

Postcondition
Each permutations' dihedrals are sorted (lexicographically)

Member Function Documentation

Alignment Scine::Molassembler::Stereopermutations::Composite::alignment ( ) const

Returns the alignment with which the Composite was generated with.

Complexity \(\Theta(1)\)

unsigned Scine::Molassembler::Stereopermutations::Composite::countNonEquivalentPermutations ( ) const

Returns the number of non-ranking-equivalent permutations for this Composite.

Complexity \(\Theta(1)\)

static std::vector<Shapes::Vertex> Scine::Molassembler::Stereopermutations::Composite::generateRotation ( Shapes::Shape  shape,
Shapes::Vertex  fixedVertex,
const std::vector< Shapes::Vertex > &  changedVertices 
)
static

Generates a shape rotation subject to constraints.

Parameters
shapeThe shape in which the rotation is sought
fixedVertexThe shape vertex in shape that is kept constant
changedVerticesThe shape vertices which must change in the sought rotation
bool Scine::Molassembler::Stereopermutations::Composite::isIsotropic ( ) const

Returns whether the Composite is isotropic overall.

Complexity \(\Theta(1)\)

unsigned Scine::Molassembler::Stereopermutations::Composite::order ( ) const

Returns the higher number of relevant substituent shape vertices of both sides.

E.g. In a combination of EquilateralTriangle and Tetrahedron, the order is three.

const Temple::OrderedPair<OrientationState>& Scine::Molassembler::Stereopermutations::Composite::orientations ( ) const

Returns the orientation state of the composite.

Complexity \(\Theta(1)\)

static double Scine::Molassembler::Stereopermutations::Composite::perpendicularSubstituentAngle ( double  angleFromBoundShapeVertex,
double  angleBetweenSubstituents 
)
staticprivate

Calculates the angle between two substituents that have the same angle from the bound shape vertices in a plane perpendicular to their shared axis.

The axis is defined by the bound shape position and the central point of the shape. shape positions with identical angles from the bound shape position are situated together in a plane perpendicular to the axis. The angle between these shape positions via the intersection with the axis in that plane is calculated by this function.

Warning
Do not call this with angleFromBoundShapeVertex == M_PI as the geometrical idea collapses.

Field Documentation

constexpr Temple::Floating::ExpandedAbsoluteEqualityComparator<double> Scine::Molassembler::Stereopermutations::Composite::fpComparator
static
Initial value:
{
Temple::Math::toRadians(1.0)
}

1° absolute tolerance floating point comparison helper for angle groups


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