Molassembler  3.0.0
Molecule graph and conformer library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RankingInformation.h
Go to the documentation of this file.
1 
8 #ifndef INCLUDE_MOLASSEMBLER_RANKING_INFORMATION_H
9 #define INCLUDE_MOLASSEMBLER_RANKING_INFORMATION_H
10 
11 #include "Molassembler/Types.h"
13 
14 #include <vector>
15 
16 namespace Scine {
17 namespace Molassembler {
18 
19 struct site_index_tag;
20 using SiteIndex = Temple::StrongIndex<site_index_tag, unsigned>;
21 
23 struct MASM_EXPORT RankingInformation {
26  struct Link;
27 
28  template<typename T>
29  using NestedList = std::vector<
30  std::vector<T>
31  >;
32 
35 
38 
42 
45 
57  static std::vector<unsigned> siteConstitutingAtomsRankedPositions(
58  const std::vector<AtomIndex>& siteAtomList,
59  const RankingInformation::RankedSubstituentsType& substituentRanking
60  );
61 
76  static RankedSitesType rankSites(
77  const SiteListType& sites,
78  const RankedSubstituentsType& substituentRanking
79  );
81 
86 
96 
108 
115  std::vector<Link> links;
117 
120 
126  void applyPermutation(const std::vector<AtomIndex>& permutation);
128 
131 
139  SiteIndex getSiteIndexOf(AtomIndex i) const;
140 
149  unsigned getRankedIndexOfSite(SiteIndex i) const;
150 
158  bool hasHapticSites() const;
160 
163  bool operator == (const RankingInformation& other) const;
164  bool operator != (const RankingInformation& other) const;
166 };
167 
174 
177  Link();
178 
183  Link(
184  std::pair<SiteIndex, SiteIndex> siteIndices,
185  std::vector<AtomIndex> sequence,
186  AtomIndex source
187  );
189 
193  std::pair<SiteIndex, SiteIndex> sites;
194 
205  std::vector<AtomIndex> cycleSequence;
207 
210 
214  void applyPermutation(const std::vector<AtomIndex>& permutation);
216 
220  bool operator == (const Link& other) const;
221  bool operator != (const Link& other) const;
222 
224  bool operator < (const Link& other) const;
226 };
227 
228 } // namespace Molassembler
229 } // namespace Scine
230 
231 #endif
std::vector< Link > links
A list of information on all links between binding sites.
Definition: RankingInformation.h:115
Defines basic types widely shared across the project.
Ranking data of substituents around a central vertex.
Definition: RankingInformation.h:23
Helper class to create strongly typed indices.
Type helper for creating strong index types that are type-level distinct from their fundamental types...
Definition: StrongIndex.h:37
NestedList< AtomIndex > RankedSubstituentsType
ASC ordered list (via ranking) of atom index lists (sub-list atoms equal)
Definition: RankingInformation.h:34
SiteListType sites
Binding site atom index groupings.
Definition: RankingInformation.h:95
std::size_t AtomIndex
Unsigned integer atom index type. Used to refer to particular atoms.
Definition: Types.h:51
Permutation applyPermutation(const Permutation &occupation, const Permutation &permutation)
Rotates a passed list of indices with a specified rotation vector.
std::vector< std::vector< AtomIndex >> sites(const PrivateGraph &graph, AtomIndex placement, const std::vector< AtomIndex > &excludeAdjacents={})
Differentiate adjacent vertices of a central index into sites.
RankedSubstituentsType substituentRanking
Sorted substituents grouped by priority ascending.
Definition: RankingInformation.h:85
NestedList< AtomIndex > SiteListType
An unordered list of sets of atom indices that constitute binding sites.
Definition: RankingInformation.h:37
std::vector< std::vector< T > > NestedList
ASC ordered list (via ranking) of atom index lists (sub-list atoms equal)
Definition: RankingInformation.h:31
RankedSitesType siteRanking
Site ranking.
Definition: RankingInformation.h:107
NestedList< SiteIndex > RankedSitesType
Ascending ordered list of binding site indices (sub-list site indices equal)
Definition: RankingInformation.h:40