Molassembler  1.0.0
Molecule graph and conformer library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ConformerGeneration.h
Go to the documentation of this file.
1 
11 #ifndef INCLUDE_MOLASSEMBLER_DISTANCE_GEOMETRY_CONFORMER_GENERATION_H
12 #define INCLUDE_MOLASSEMBLER_DISTANCE_GEOMETRY_CONFORMER_GENERATION_H
13 
15 #include "Molassembler/Log.h"
16 
17 namespace Scine {
18 namespace Molassembler {
19 
20 namespace outcome = OUTCOME_V2_NAMESPACE;
21 
22 namespace DistanceGeometry {
23 namespace Detail {
24 
32 Eigen::MatrixXd gather(const Eigen::VectorXd& vectorizedPositions);
33 
39 AngstromPositions convertToAngstromPositions(const Eigen::MatrixXd& positions);
40 
48 Eigen::MatrixXd fitAndSetFixedPositions(
49  const Eigen::MatrixXd& positions,
50  const Configuration& configuration
51 );
52 
66 Molecule narrow(Molecule molecule, Random::Engine& engine);
67 
68 } // namespace Detail
69 
72  struct RotatableGroup {
73  AtomIndex side;
74  std::vector<AtomIndex> vertices;
75  };
76 
77  using GroupMapType = std::unordered_map<BondIndex, RotatableGroup, boost::hash<BondIndex>>;
78 
80  static GroupMapType make(
81  const std::vector<DihedralConstraint>& constraints,
82  const Molecule& molecule
83  );
84 
86  std::vector<ChiralConstraint> chiralConstraints;
87  std::vector<DihedralConstraint> dihedralConstraints;
88  GroupMapType rotatableGroups;
89 };
90 
98  const Molecule& molecule,
99  const Configuration& configuration
100 );
101 
103 outcome::result<AngstromPositions> refine(
104  Eigen::MatrixXd embeddedPositions,
105  const DistanceBoundsMatrix& distanceBounds,
106  const Configuration& configuration,
107  const std::shared_ptr<MoleculeDGInformation>& DgDataPtr
108 );
109 
110 // @brief Individual conformer generation routine
111 outcome::result<AngstromPositions> generateConformer(
112  const Molecule& molecule,
113  const Configuration& configuration,
114  std::shared_ptr<MoleculeDGInformation>& DgDataPtr,
115  bool regenerateDGDataEachStep,
116  Random::Engine& engine
117 );
118 
127 std::vector<
128  outcome::result<AngstromPositions>
129 > run(
130  const Molecule& molecule,
131  unsigned numConformers,
132  const Configuration& configuration,
133  const boost::optional<unsigned> seedOption
134 );
135 
136 } // namespace DistanceGeometry
137 } // namespace Molassembler
138 } // namespace Scine
139 
140 #endif
Models a molecule as a graph (connectivity of atoms) and a list of stereopermutators.
Definition: Molecule.h:73
static GroupMapType make(const std::vector< DihedralConstraint > &constraints, const Molecule &molecule)
Records freely rotatable groups with dihedral constraints.
Drives a PRNG.
Definition: Prng.h:24
Intermediate conformational data about a Molecule given by a spatial model.
Definition: ConformerGeneration.h:71
A configuration object for distance geometry runs with sane defaults.
Definition: Conformers.h:75
Convert a Molecule to atom-pair distance bounds and chiral constraints.
Basic Logging functionality for debugging.
std::size_t AtomIndex
Unsigned integer atom index type. Used to refer to particular atoms.
Definition: Types.h:51
std::vector< outcome::result< AngstromPositions >> run(const Molecule &molecule, unsigned numConformers, const Configuration &configuration, const boost::optional< unsigned > seedOption)
Main and parallel implementation of Distance Geometry. Generates an ensemble of 3D structures of a gi...
MoleculeDGInformation gatherDGInformation(const Molecule &molecule, const Configuration &configuration)
Collects intermediate conformational data about a Molecule using a spatial model. ...
outcome::result< AngstromPositions > refine(Eigen::MatrixXd embeddedPositions, const DistanceBoundsMatrix &distanceBounds, const Configuration &configuration, const std::shared_ptr< MoleculeDGInformation > &DgDataPtr)
Distance Geometry refinement.
Eigen::MatrixXd BoundsMatrix
Type used to represent atom-pairwise distance bounds constructed from bounds on internal coordinates...
Definition: SpatialModel.h:66