12 #ifndef INCLUDE_MOLASSEMBLER_STEREOPERMUTATION_COMPOSITES_H
13 #define INCLUDE_MOLASSEMBLER_STEREOPERMUTATION_COMPOSITES_H
21 #include "boost/optional.hpp"
24 namespace Molassembler {
25 namespace Stereopermutations {
77 std::size_t passIdentifier
99 std::vector<Shapes::Vertex> findReductionMapping(
Shapes::Vertex reducedFusedVertex)
const;
115 [[nodiscard]] std::vector<Shapes::Vertex> transformToCanonical();
123 void revert(
const std::vector<Shapes::Vertex>& reversionMapping);
138 return std::make_tuple(
141 rotateOccupation(findReductionMapping(reducedVertex))
153 EclipsedAndStaggered,
155 BetweenEclipsedAndStaggered
160 using DihedralTuple = std::tuple<Shapes::Vertex, Shapes::Vertex, double>;
161 using VertexPair = std::pair<Shapes::Vertex, Shapes::Vertex>;
163 bool close(
const std::vector<DihedralTuple>& comparisonDihedrals)
const;
178 static bool isDuplicate(
201 double deduplicationDegrees
206 double deduplicationDegrees=15
212 std::pair<Shapes::Permutation, Shapes::Permutation> reversionMappings;
213 std::pair<AngleGroup, AngleGroup> angleGroups;
214 std::pair<Eigen::MatrixXd, Eigen::MatrixXd>
coordinates;
231 Alignment alignment = Alignment::Eclipsed
239 Temple::Math::toRadians(1.0)
250 static std::vector<Shapes::Vertex> generateRotation(
253 const std::vector<Shapes::Vertex>& changedVertices
256 static std::vector<Shapes::Vertex> rotation(
259 const std::vector<Shapes::Vertex>& perpendicularPlaneVertices
265 void applyIdentifierPermutation(
const std::vector<std::size_t>& permutation);
268 void updateIdentifiers(F f) {
271 for(
auto& orientationState : orientations_) {
272 orientationState.identifier = f(orientationState.identifier);
280 const PermutationsList& allPermutations()
const;
286 bool isIsotropic()
const;
289 std::pair<unsigned, unsigned> orders()
const;
297 unsigned order()
const;
300 unsigned rotationalAxisSymmetryOrder()
const;
306 const Temple::OrderedPair<OrientationState>& orientations()
const;
309 unsigned rankingEquivalentBase(
unsigned permutation)
const;
312 std::vector<unsigned> nonEquivalentPermutationIndices()
const;
319 unsigned countNonEquivalentPermutations()
const;
325 Alignment alignment()
const;
331 PermutationsList::const_iterator begin()
const;
332 PermutationsList::const_iterator end()
const;
338 bool operator < (
const Composite& other)
const;
340 bool operator == (
const Composite& other)
const;
342 bool operator != (
const Composite& other)
const;
372 static double perpendicularSubstituentAngle(
373 double angleFromBoundShapeVertex,
374 double angleBetweenSubstituents
Alignment
Relative orientation of substituent groups along the dihedral.
Definition: Composites.h:147
Definition: Composites.h:177
Temple::OrderedPair< OrientationState > orientations_
Stores the relative orientation with which the permutations were generated.
Definition: Composites.h:349
double angle
The angle from this vertex group to the fused position in radians.
Definition: Composites.h:41
Generates all operators using a method returning a tuple.
Definition: OperatorSuppliers.h:78
Alignment alignment_
Stores with which Alignment the stereopermutations were generated.
Definition: Composites.h:355
Base class to describe substituent arrangements in shapes.
ShapeResult shape(const PositionCollection &normalizedPositions, Shape shape)
Forwarding function to calculate the continuous shape measure.
A group of shape vertices at an angle from the fused position.
Definition: Composites.h:39
auto tie() const
Full tuple-like lexicographical comparison of members in order of declaration.
Definition: Composites.h:135
std::vector< WideHashType > generate(const PrivateGraph &inner, boost::optional< const StereopermutatorList & > stereopermutatorsOption, AtomEnvironmentComponents bitmask)
Generates the hashes for every atom in a molecule's components.
Class representing a single rotational permutation.
Definition: Composites.h:159
PURITY_STRONG unsigned order(PointGroup group)
Returns the number of symmetry elements in a point group.
Encompasses the orientation of a shape along a fused bond.
Definition: Composites.h:56
Centralizes basic shape data in runtime types.
A class that imitates std::pair<T, U>, but whose template arguments are homogeneous and the stored va...
Definition: OrderedPair.h:36
constexpr Get< 1 > second
Calls std::get<1> on any argument it is invoked with.
Definition: Functor.h:125
PermutationsList stereopermutations_
List of dihedral sets that comprise all spatial arrangements.
Definition: Composites.h:352
Stereopermutation::Occupation occupation
Ranking occupation of shape vertices of this shape.
Definition: Composites.h:62
std::vector< Permutation > PermutationsList
Relative orientation of substituent groups along the dihedral.
Definition: Composites.h:175
Alignment alignment
Alignment used to generate this permutation.
Definition: Composites.h:168
constexpr Get< 0 > first
Calls std::get<0> on any argument it is invoked with.
Definition: Functor.h:123
bool isotropic
Whether the ranking characters indicate that this group of shape vertices is isotropic.
Definition: Composites.h:48
Defines symmetry names and total count.
Coordinates coordinates(Shape shape)
Fetch a shape's idealized coordiantes.
Shape
Enumeration of all contained symmetry names.
Definition: Shapes.h:28
Shapes::Shape shape
The shape of either positional shape.
Definition: Composites.h:58
boost::optional< VertexPair > rankingEquivalentTo
Shape vertices this permutation is ranking equivalent to, if applicable.
Definition: Composites.h:172
std::size_t identifier
An identifier to the shape source.
Definition: Composites.h:70
Shapes::Vertex fusedVertex
The shape vertex of the local shape that the other is fused at.
Definition: Composites.h:60
VertexPair alignedVertices
Shape vertices aligned for this set of dihedrals.
Definition: Composites.h:166
An ordered homogeneous pair-like class.
std::vector< DihedralTuple > dihedrals
Set of dihedrals between all relevant vertices along the bond.
Definition: Composites.h:170
Helpers for comparing floating point values.
std::vector< Shapes::Vertex > vertices
The shape vertices making up this group.
Definition: Composites.h:43
Represents the composite of two shapes joined by a bond at arbitrary shape vertices.
Definition: Composites.h:34