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) |
Information | |
const PermutationsList & | allPermutations () 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 (const 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 | |
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.
Relative orientation of substituent groups along the dihedral.
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
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 |
Generates a shape rotation subject to constraints.
shape | The shape in which the rotation is sought |
fixedVertex | The shape vertex in shape that is kept constant |
changedVertices | The 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)\)
|
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.
|
static |
1° absolute tolerance floating point comparison helper for angle groups