Molassembler  1.2.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  );
95 
96  struct Functor {
97  explicit Functor(const Graph& g) : graph(g) {}
98 
113  std::vector<unsigned> operator() (
114  const Abstract& abstract,
115  Shapes::Shape shape,
116  AtomIndex placement,
117  const RankingInformation& ranking
118  ) const;
119 
120  const Graph& graph;
121  };
122 
123  struct Unchecked {
124  std::vector<unsigned> operator() (
125  const Abstract& abstract,
126  Shapes::Shape shape,
127  AtomIndex placement,
128  const RankingInformation& ranking
129  ) const;
130  };
131 
133  static boost::optional<unsigned> findRotationallySuperposableAssignment(
134  const Stereopermutations::Stereopermutation& permutation,
135  Shapes::Shape shape,
136  const Abstract& abstract,
137  const std::vector<unsigned>& feasibles
138  );
140 };
141 
142 } // namespace Stereopermutators
143 } // namespace Molassembler
144 } // namespace Scine
145 
146 #endif
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
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)
Determine whether a stereopermutation is possibly feasible.
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
std::vector< unsigned > operator()(const Abstract &abstract, Shapes::Shape shape, AtomIndex placement, const RankingInformation &ranking) const
Determines the subset of stereopermutations that are feasible in three dimensions.
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.
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