17 #ifndef INCLUDE_MOLASSEMBLER_ATOM_STEREOPERMUTATOR_H
18 #define INCLUDE_MOLASSEMBLER_ATOM_STEREOPERMUTATOR_H
28 namespace Molassembler {
31 struct RankingInformation;
32 class AngstromPositions;
35 namespace Stereopermutators {
44 namespace DistanceGeometry {
92 std::vector<unsigned>(
97 std::vector<std::vector<SiteIndex>> siteGroups
134 [[deprecated("Prefer constructor without graph argument")]]
166 const ThermalizationPredicate& thermalization = {},
167 const std::vector<std::vector<SiteIndex>>& siteGroups = {}
207 static bool thermalized(
210 const RankingInformation& ranking,
234 void assign(boost::optional<unsigned> assignment,
235 const std::vector<std::vector<SiteIndex>>& siteGroups = {});
253 void assignRandom(Random::Engine& engine);
279 boost::optional<ShapeMap> fit(
280 const SiteCentroids& centroids,
281 const FeasiblesGenerator& feasibility = {},
282 const ThermalizationPredicate& thermalization = {}
300 boost::optional<ShapeMap> fit(
301 const AngstromPositions& wrapper,
302 const FeasiblesGenerator& feasibility = {},
303 const ThermalizationPredicate& thermalization = {}
306 [[deprecated(
"Prefer graph-less alternative parameters")]]
307 boost::optional<ShapeMap> fit(
309 const AngstromPositions& angstromWrapper
321 MASM_NO_EXPORT boost::optional<PropagatedState> propagate(
322 RankingInformation newRanking,
323 boost::optional<Shapes::Shape> shapeOption,
324 const FeasiblesGenerator& feasibility = {},
325 const ThermalizationPredicate& thermalization = {}
335 void propagateVertexRemoval(
AtomIndex removedIndex);
347 const FeasiblesGenerator& feasibility = {},
348 const ThermalizationPredicate& thermalization = {},
349 const std::vector<std::vector<SiteIndex>>& siteGroups = {}
352 [[deprecated(
"Prefer graph-less alternative parameters")]]
356 const std::vector<std::vector<SiteIndex>>& siteGroups = {}
360 void thermalize(
bool thermalization =
true);
379 double angle(SiteIndex i, SiteIndex j)
const;
388 boost::optional<unsigned> assigned()
const;
404 boost::optional<unsigned> indexOfPermutation()
const;
422 std::vector<MinimalChiralConstraint> minimalChiralConstraints(
bool enforce =
false)
const;
428 std::string info()
const;
434 std::string rankInfo()
const;
444 std::vector<std::vector<SiteIndex>> siteGroups()
const;
447 SiteCentroids sitePositions(
448 const AngstromPositions& wrapper,
449 const std::vector<std::pair<AtomIndex, AtomIndex>>& substitutions = {}
453 bool thermalized()
const;
460 MASM_NO_EXPORT
const Stereopermutators::Abstract& getAbstract()
const;
467 MASM_NO_EXPORT
const std::vector<unsigned>& getFeasible()
const;
473 const RankingInformation& getRanking()
const;
486 const ShapeMap& getShapePositionMap()
const;
509 unsigned numAssignments()
const;
532 unsigned numStereopermutations()
const;
546 bool operator == (
const AtomStereopermutator& other)
const;
548 bool operator != (
const AtomStereopermutator& other)
const;
558 bool operator < (
const AtomStereopermutator& other)
const;
563 std::unique_ptr<Impl> pImpl_;
std::array< boost::optional< SiteIndex >, 4 > MinimalChiralConstraint
Site index sequence defining a chiral constraint. If a site index is None, then it denotes the positi...
Definition: AtomStereopermutator.h:108
std::function< bool(AtomIndex, Shapes::Shape, const RankingInformation &)> ThermalizationPredicate
Predicate to decide whether an atom stereopermutator is thermalized.
Definition: AtomStereopermutator.h:88
Strongly typed index permutations.
bool thermalized() const
Returns whether the stereopermutations are thermalized.
Drives a PRNG.
Definition: Prng.h:24
ShapeResult shape(const PositionCollection &normalizedPositions, Shape shape)
Forwarding function to calculate the continuous shape measure.
std::tuple< RankingInformation, ShapeMap > PropagatedState
Old state dumped upon propagation.
Definition: AtomStereopermutator.h:102
Eigen::Matrix< double, 3, Eigen::Dynamic > SiteCentroids
Spatial positions of the centroids of sites.
Definition: AtomStereopermutator.h:85
Represents the connectivity of atoms of a molecule.
Definition: Graph.h:54
Class performing spatial modeling of molecules.
Definition: SpatialModel.h:40
Centralizes basic shape data in runtime types.
Handles the steric permutation of substituents of a non-terminal central atom.
Definition: AtomStereopermutator.h:79
std::function< std::vector< unsigned >(const Stereopermutators::Abstract &abstract, Shapes::Shape shape, AtomIndex placement, const RankingInformation &ranking, std::vector< std::vector< SiteIndex >> siteGroups) > FeasiblesGenerator
Generator function to list spatially feasible permutation indices.
Definition: AtomStereopermutator.h:99
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.
static auto thermalizationFunctor(const Graph &g)
Binds a graph instance into a functor invoking thermalized.
Definition: AtomStereopermutator.h:215
Temple::StrongIndex< vertex_index_tag, unsigned > Vertex
Index of a shape vertex.
Definition: Data.h:33
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
Data struct representing a chiral constraint.
Definition: DistanceGeometry.h:32