Molassembler  3.0.0
Molecule graph and conformer library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
FeasiblePermutations.h
Go to the documentation of this file.
1 
8 #ifndef INCLUDE_MOLASSEMBLER_STEREOPERMUTATIONS_FEASIBLE_PERMUTATIONS_H
9 #define INCLUDE_MOLASSEMBLER_STEREOPERMUTATIONS_FEASIBLE_PERMUTATIONS_H
10 
12 #include "Molassembler/Options.h"
14 
16 
17 namespace Scine {
18 namespace Molassembler {
19 
20 class PrivateGraph;
21 
22 namespace Stereopermutators {
23 
24 // Forward-declarations
25 struct Abstract;
26 
30  using ConeAngleType = std::vector<
31  boost::optional<DistanceGeometry::ValueBounds>
32  >;
34 
36  AtomIndex placement,
37  const RankingInformation& ranking,
38  const PrivateGraph& graph
39  );
40 
44  std::vector<DistanceGeometry::ValueBounds> siteDistances;
45 
47  ConeAngleType coneAngles;
49 };
50 
51 struct Feasible {
54  using ConeAngleType = std::vector<
55  boost::optional<DistanceGeometry::ValueBounds>
56  >;
58 
61 
68  static bool linkPossiblyFeasible(
69  const RankingInformation::Link& link,
70  AtomIndex placement,
71  const ConeAngleType& cones,
72  const RankingInformation& ranking,
74  const SiteToShapeVertexMap& shapeVertexMap,
75  const Graph& graph
76  );
77 
86  static bool possiblyFeasible(
87  const Stereopermutations::Stereopermutation& stereopermutation,
88  AtomIndex placement,
89  const RankingInformation::RankedSitesType& canonicalSites,
90  const ConeAngleType& coneAngles,
91  const RankingInformation& ranking,
92  Shapes::Shape shape,
93  const Graph& graph,
94  std::vector<std::vector<SiteIndex>> siteGroups = {}
95  );
96 
97  struct Functor {
98  explicit Functor(const Graph& g) : graph(g) {}
99 
115  std::vector<unsigned> operator() (
116  const Abstract& abstract,
117  Shapes::Shape shape,
118  AtomIndex placement,
119  const RankingInformation& ranking,
120  std::vector<std::vector<SiteIndex>> siteGroups = {}
121  ) const;
122 
123  const Graph& graph;
124  };
125 
126  struct Unchecked {
127  std::vector<unsigned> operator() (
128  const Abstract& abstract,
129  Shapes::Shape shape,
130  AtomIndex placement,
131  const RankingInformation& ranking,
132  std::vector<std::vector<SiteIndex>> siteGroups
133  ) const;
134  };
135 
137  static boost::optional<unsigned> findRotationallySuperposableAssignment(
138  const Stereopermutations::Stereopermutation& permutation,
139  Shapes::Shape shape,
140  const Abstract& abstract,
141  const std::vector<unsigned>& feasibles
142  );
144 };
145 
146 } // namespace Stereopermutators
147 } // namespace Molassembler
148 } // namespace Scine
149 
150 #endif
std::vector< unsigned > operator()(const Abstract &abstract, Shapes::Shape shape, AtomIndex placement, const RankingInformation &ranking, std::vector< std::vector< SiteIndex >> siteGroups={}) const
Determines the subset of stereopermutations that are feasible in three dimensions.
Ranking data of substituents around a central vertex.
Definition: RankingInformation.h:23
std::vector< DistanceGeometry::ValueBounds > siteDistances
Mapping from site index to modeled site plane distance.
Definition: FeasiblePermutations.h:44
Represent abstract stereopermutation around atom center.
Definition: Stereopermutation.h:36
Base class to describe substituent arrangements in shapes.
ShapeResult shape(const PositionCollection &normalizedPositions, Shape shape)
Forwarding function to calculate the continuous shape measure.
Represents the connectivity of atoms of a molecule.
Definition: Graph.h:54
std::size_t AtomIndex
Unsigned integer atom index type. Used to refer to particular atoms.
Definition: Types.h:51
Data struct for storing a numeric interval.
Library internal graph class wrapping BGL types.
Definition: PrivateGraph.h:26
Centralizes the main customization points of the library&#39;s behavior.
Class to compute the set of abstract permutations from ranking and shape.
Definition: AbstractPermutations.h:24
Shape
Enumeration of all contained symmetry names.
Definition: Shapes.h:28
Definition: FeasiblePermutations.h:51
static boost::optional< unsigned > findRotationallySuperposableAssignment(const Stereopermutations::Stereopermutation &permutation, Shapes::Shape shape, const Abstract &abstract, const std::vector< unsigned > &feasibles)
Find a rotationally superposable assignment to a permutation.
Calculate shape position maps.
static bool linkPossiblyFeasible(const RankingInformation::Link &link, AtomIndex placement, const ConeAngleType &cones, const RankingInformation &ranking, Shapes::Shape shape, const SiteToShapeVertexMap &shapeVertexMap, const Graph &graph)
Determine whether a link is possibly feasible.
static bool possiblyFeasible(const Stereopermutations::Stereopermutation &stereopermutation, AtomIndex placement, const RankingInformation::RankedSitesType &canonicalSites, const ConeAngleType &coneAngles, const RankingInformation &ranking, Shapes::Shape shape, const Graph &graph, std::vector< std::vector< SiteIndex >> siteGroups={})
Determine whether a stereopermutation is possibly feasible.
ConeAngleType coneAngles
Mapping from site index to cone angle optional.
Definition: FeasiblePermutations.h:47
NestedList< SiteIndex > RankedSitesType
Ascending ordered list of binding site indices (sub-list site indices equal)
Definition: RankingInformation.h:40