10 #ifndef INCLUDE_SHAPE_PROPERTIES_H
11 #define INCLUDE_SHAPE_PROPERTIES_H
18 namespace Molassembler {
22 namespace Properties {
24 constexpr
double floatingPointEqualityThreshold [[gnu::unused]] = 1e-4;
42 unsigned rotationFunctionIndex
91 const boost::optional<Vertex>& vertexOption
102 const Eigen::Vector3d& i,
103 const Eigen::Vector3d& j,
104 const Eigen::Vector3d& k,
105 const Eigen::Vector3d& l
119 const std::vector<Vertex>& indexMapping
132 const boost::optional<Vertex>& indexOptional,
133 const std::vector<Vertex>& indexMapping
148 const std::vector<Vertex>& indexMapping
160 const std::vector<Vertex>& indices
176 const std::vector<Vertex>& mapping
183 std::vector<Vertex> indexMapping;
184 double angularDistortion;
185 double chiralDistortion;
188 std::vector<Vertex> passIndexMapping,
189 double passAngularDistortion,
190 double passChiralDistortion
229 Vertex positionInSourceShape
241 double angularDistortion;
242 double chiralDistortion;
248 double passAngleDistortion,
249 double passChiralDistortion
264 const std::vector<DistortionInfo>& distortions
275 unsigned nIdenticalLigands
286 unsigned nIdenticalLigands
std::set< std::vector< Vertex >> generateAllRotations(Shape shape, const std::vector< Vertex > &indices)
Generates all rotations of a sequence of indices within a shape.
A grouping of index mappings of equal angular and chiral distortion.
Definition: Properties.h:233
Permutation inverseRotation(const Permutation &rotation)
Generate the inverse rotation to a shape's rotation.
boost::optional< Vertex > propagateIndexOptionalThroughMapping(const boost::optional< Vertex > &indexOptional, const std::vector< Vertex > &indexMapping)
Propagates an index optional through an index mapping.
double calculateAngleDistortion(Shape from, Shape to, const std::vector< Vertex > &indexMapping)
Calculates angular distorition for an index mapping between shapes.
#define PURITY_WEAK
Definition: Preprocessor.h:36
Data type grouping distortions between shapes.
Definition: Properties.h:182
ShapeResult shape(const PositionCollection &normalizedPositions, Shape shape)
Forwarding function to calculate the continuous shape measure.
std::vector< char > positionGroupCharacters(Shape shape)
Generate a character representation of a shape's position groups.
Centralizes basic shape data in runtime types.
std::vector< Vertex > applyIndexMapping(Shape to, const std::vector< Vertex > &mapping)
Transform shape positions through a mapping.
PURITY_WEAK std::vector< std::vector< Vertex > > positionGroups(Shape shape)
Group shape vertices according to whether they can be interconverted by rotation. ...
std::vector< Vertex > Permutation
Representation of a shape vertex permutation.
Definition: Data.h:35
std::vector< Vertex > applyRotation(const Permutation &occupation, Shape shape, unsigned rotationFunctionIndex)
Rotates a passed list of indices of a specific shape.
Eigen::Vector3d getCoordinates(Shape shape, const boost::optional< Vertex > &vertexOption)
Gets the coordinates of an indexOptional for a specific shape.
Permutation applyPermutation(const Permutation &occupation, const Permutation &permutation)
Rotates a passed list of indices with a specified rotation vector.
std::vector< DistortionInfo > ligandLossTransitionMappings(Shape from, Shape to, Vertex positionInSourceShape)
Calculates ideal index mappings for ligand loss transitions.
PURITY_WEAK unsigned numUnlinkedStereopermutations(Shape shape, unsigned nIdenticalLigands)
Calculates the number of stereopermutations in a specific shape and a number of identical ligands...
double getTetrahedronVolume(const Eigen::Vector3d &i, const Eigen::Vector3d &j, const Eigen::Vector3d &k, const Eigen::Vector3d &l)
Tetrahedron volume spanned by four positions.
Shape
Enumeration of all contained symmetry names.
Definition: Shapes.h:28
double calculateChiralDistortion(Shape from, Shape to, const std::vector< Vertex > &indexMapping)
Calculates chiral distortion for a transition between shapes.
std::vector< std::vector< Vertex > > indexMappings
A list of index mappings that share the same angularDistortion and chiralDistortion.
Definition: Properties.h:240
PURITY_WEAK Shape mostSymmetric(std::vector< Shape > selection)
Yields the shape with the most rotations from a selection.
PURITY_WEAK bool hasMultipleUnlinkedStereopermutations(Shape shape, unsigned nIdenticalLigands)
Calculates if there are multiple unlinked stereopermutations in a specific shape for a number of iden...
std::vector< DistortionInfo > shapeTransitionMappings(Shape from, Shape to)
Calculates ideal index mappings for +1, 0 size transitions.
ShapeTransitionGroup selectBestTransitionMappings(const std::vector< DistortionInfo > &distortions)
Selects the best transition mapping from many DistortionInfos.
unsigned rotationPeriodicity(Shape shape, const Permutation &rotation)
Calculate the periodicty of a shape's index rotation.