Molassembler  3.0.0
Molecule graph and conformer library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Stereopermutation.h
Go to the documentation of this file.
1 
11 #ifndef INCLUDE_MOLASSEMBLER_STEREOPERMUTATIONS_STEREOPERMUTATION_H
12 #define INCLUDE_MOLASSEMBLER_STEREOPERMUTATIONS_STEREOPERMUTATION_H
13 
16 
17 namespace Scine {
18 namespace Molassembler {
19 
21 namespace Stereopermutations {
22 
24 struct rank_tag;
27 
36 class MASM_EXPORT Stereopermutation : public Temple::Crtp::LexicographicComparable<Stereopermutation> {
37 public:
42 
44  using Link = std::pair<Shapes::Vertex, Shapes::Vertex>;
45 
47  using OrderedLinks = std::vector<Link>;
49 
52 
56  static Occupation permuteOccupation(
57  const Occupation& occupation,
58  const Shapes::Permutation& permutation
59  );
60 
61  static Occupation occupationFromChars(const std::string& chars);
62 
67  static OrderedLinks permuteLinks(
68  const OrderedLinks& links,
69  const Shapes::Permutation& permutation
70  );
72 
80 
84  Stereopermutation() = default;
93  Occupation passOccupation,
94  OrderedLinks passLinks = {}
95  );
97 
100 
104  Stereopermutation applyPermutation(const Shapes::Permutation& permutation) const;
105 
107  std::string toString() const;
109 
113  inline auto tie() const {
114  return std::tie(occupation, links);
115  }
117 };
118 
119 PURITY_WEAK MASM_EXPORT std::size_t hash_value(const Stereopermutation& assignment);
120 
121 } // namespace Stereopermutations
122 } // namespace Molassembler
123 } // namespace Scine
124 
125 #endif
Strongly typed index permutations.
std::pair< Shapes::Vertex, Shapes::Vertex > Link
Type used to represent a link between shape vertices.
Definition: Stereopermutation.h:44
Generates all operators using a method returning a tuple.
Definition: OperatorSuppliers.h:78
Type helper for creating strong index types that are type-level distinct from their fundamental types...
Definition: StrongIndex.h:37
Represent abstract stereopermutation around atom center.
Definition: Stereopermutation.h:36
#define PURITY_WEAK
Definition: Preprocessor.h:36
Occupation occupation
Occupation of shape vertices by site rank.
Definition: Stereopermutation.h:76
Centralizes basic shape data in runtime types.
std::vector< Vertex > Permutation
Representation of a shape vertex permutation.
Definition: Data.h:36
Permutation applyPermutation(const Permutation &occupation, const Permutation &permutation)
Rotates a passed list of indices with a specified rotation vector.
auto tie() const
Yields members tied to tuple for crtp operator suppliers.
Definition: Stereopermutation.h:113
std::vector< Link > OrderedLinks
Unordered type, but kept ordered by member functions.
Definition: Stereopermutation.h:47
OrderedLinks links
Links between shape vertices.
Definition: Stereopermutation.h:78