8 #ifndef INCLUDE_MOLASSEMBLER_DIRECTED_CONFORMER_GENERATOR_H
9 #define INCLUDE_MOLASSEMBLER_DIRECTED_CONFORMER_GENERATOR_H
15 #include "boost/variant/variant_fwd.hpp"
17 #include <unordered_map>
24 namespace Molassembler {
103 constexpr
static std::uint8_t unknownDecision = std::numeric_limits<std::uint8_t>::max();
108 AtomStereopermutatorPreconditionsUnmet,
110 HasAssignedBondStereopermutator,
112 HasTerminalConstitutingAtom,
184 static boost::variant<IgnoreReason, BondStereopermutator> considerBond(
220 const DecisionList& a,
221 const DecisionList& b,
222 const DecisionList& bounds
248 const BondList& bondsToConsider = {}
254 DirectedConformerGenerator(DirectedConformerGenerator&& other) noexcept;
255 DirectedConformerGenerator& operator = (DirectedConformerGenerator&& other) noexcept;
256 DirectedConformerGenerator(const DirectedConformerGenerator& other) = delete;
257 DirectedConformerGenerator& operator = (const DirectedConformerGenerator& other) = delete;
258 ~DirectedConformerGenerator();
281 DecisionList generateNewDecisionList(Random::Engine& engine =
randomnessEngine());
293 bool insert(const DecisionList& decisionList);
303 bool contains(const DecisionList& decisionList) const;
309 BondStereopermutator::Alignment alignment() const;
318 const BondList& bondList() const;
330 unsigned decisionListSetSize() const;
339 unsigned idealEnsembleSize() const;
354 const DecisionList& decisionList,
355 const DistanceGeometry::Configuration& configuration = DistanceGeometry::Configuration {},
370 const DecisionList& decisionList,
372 const DistanceGeometry::Configuration& configuration = DistanceGeometry::Configuration {},
380 Molecule conformationMolecule(
const DecisionList& decisionList)
const;
402 DecisionList getDecisionList(
403 const Utils::AtomCollection& atomCollection,
423 DecisionList getDecisionList(
424 const Utils::PositionCollection& positions,
433 unsigned dihedralRetries = 3;
485 void enumerateRandom(
487 const EnumerationSettings& settings = {}
491 Relabeler relabeler()
const;
498 std::vector<int> binMidpointIntegers(
const DecisionList& decision)
const;
501 std::vector<std::pair<int, int>> binBounds(
const DecisionList& decision)
const;
506 std::unique_ptr<Impl> pImpl_;
523 std::vector<AtomIndex> is;
526 std::vector<AtomIndex> ls;
527 unsigned symmetryOrder;
529 using Interval = std::pair<double, double>;
530 using Intervals = std::vector<Interval>;
539 const std::vector<double>& dihedrals,
541 unsigned symmetryOrder = 1
544 static std::pair<double, double> makeBounds(
double phi,
double tolerance);
545 static std::pair<int, int> integerBounds(
const std::pair<double, double>& bounds);
567 std::vector<Intervals>
bins(
double delta=M_PI / 6)
const;
578 std::vector<std::vector<unsigned>>
binIndices(
579 const std::vector<Intervals>& allBins
584 const std::vector<std::vector<unsigned>>&
binIndices,
585 const std::vector<Intervals>& allBins
590 std::vector<std::pair<int, int>>
592 const std::vector<std::vector<unsigned>>&
binIndices,
593 const std::vector<Intervals>& allBins
598 std::vector<DihedralInfo> sequences;
599 std::vector<std::vector<double>> observedDihedrals;
Models a molecule as a graph (connectivity of atoms) and a list of stereopermutators.
Definition: Molecule.h:77
A configuration object for distance geometry runs with sane defaults.
Definition: Conformers.h:73
At least one pair of substituents are staggered along the axis.
Result< Utils::PositionCollection > generateConformation(const Molecule &molecule, unsigned seed, const DistanceGeometry::Configuration &configuration=DistanceGeometry::Configuration{})
Generate a 3D structure of a Molecule.
std::vector< unsigned > distance(AtomIndex source, const Graph &graph)
Calculates the graph distance from a single atom index to all others.
Choose whichever assignment best represents the geometry directly.
Positions must be close to the idealized assignment geometry.
std::size_t AtomIndex
Unsigned integer atom index type. Used to refer to particular atoms.
Definition: Types.h:51
Handle rotational arrangements of adjacent atom-centered shapes.
Type used to refer to particular bonds. Orders first < second.
Definition: Types.h:54
Centralizes the main customization points of the library's behavior.
FittingMode
Differentiates how viable assignments are chosen during fitting.
Definition: BondStereopermutator.h:67
Random::Engine & randomnessEngine()
Randomness source for the entire library.
Alignment
How dihedrals are aligned in the generation of stereopermutations.
Definition: BondStereopermutator.h:53
Result< Utils::PositionCollection > generateRandomConformation(const Molecule &molecule, const DistanceGeometry::Configuration &configuration=DistanceGeometry::Configuration{})
Generate a 3D structure of a Molecule.