Molassembler  3.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 namespace DistanceGeometry {
20 namespace Detail {
21 
29 Eigen::MatrixXd gather(const Eigen::VectorXd& vectorizedPositions);
30 
36 AngstromPositions convertToAngstromPositions(const Eigen::MatrixXd& positions);
37 
45 Eigen::MatrixXd fitAndSetFixedPositions(
46  const Eigen::MatrixXd& positions,
47  const Configuration& configuration
48 );
49 
63 Molecule narrow(Molecule molecule, Random::Engine& engine);
64 
65 } // namespace Detail
66 
69  struct RotatableGroup {
70  AtomIndex side;
71  std::vector<AtomIndex> vertices;
72  };
73 
74  using GroupMapType = std::unordered_map<BondIndex, RotatableGroup, boost::hash<BondIndex>>;
75 
77  static GroupMapType make(
78  const std::vector<DihedralConstraint>& constraints,
79  const Molecule& molecule
80  );
81 
83  std::vector<ChiralConstraint> chiralConstraints;
84  std::vector<DihedralConstraint> dihedralConstraints;
85  GroupMapType rotatableGroups;
86 };
87 
95  const Molecule& molecule,
96  const Configuration& configuration
97 );
98 
100 Result<AngstromPositions> refine(
101  Eigen::MatrixXd embeddedPositions,
102  const DistanceBoundsMatrix& distanceBounds,
103  const Configuration& configuration,
104  const std::shared_ptr<MoleculeDGInformation>& DgDataPtr
105 );
106 
107 // @brief Individual conformer generation routine
108 Result<AngstromPositions> generateConformer(
109  const Molecule& molecule,
110  const Configuration& configuration,
111  std::shared_ptr<MoleculeDGInformation>& DgDataPtr,
112  bool regenerateDGDataEachStep,
113  Random::Engine& engine
114 );
115 
124 std::vector<
125  Result<AngstromPositions>
126 > run(
127  const Molecule& molecule,
128  unsigned numConformers,
129  const Configuration& configuration,
130  boost::optional<unsigned> seedOption
131 );
132 
133 } // namespace DistanceGeometry
134 } // namespace Molassembler
135 } // namespace Scine
136 
137 #endif
Models a molecule as a graph (connectivity of atoms) and a list of stereopermutators.
Definition: Molecule.h:77
Result< AngstromPositions > refine(Eigen::MatrixXd embeddedPositions, const DistanceBoundsMatrix &distanceBounds, const Configuration &configuration, const std::shared_ptr< MoleculeDGInformation > &DgDataPtr)
Distance Geometry refinement.
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:68
A configuration object for distance geometry runs with sane defaults.
Definition: Conformers.h:73
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
MoleculeDGInformation gatherDGInformation(const Molecule &molecule, const Configuration &configuration)
Collects intermediate conformational data about a Molecule using a spatial model. ...
std::vector< Result< AngstromPositions >> run(const Molecule &molecule, unsigned numConformers, const Configuration &configuration, boost::optional< unsigned > seedOption)
Main and parallel implementation of Distance Geometry. Generates an ensemble of 3D structures of a gi...
Eigen::MatrixXd BoundsMatrix
Type used to represent atom-pairwise distance bounds constructed from bounds on internal coordinates...
Definition: SpatialModel.h:67