12#ifndef RD_EMBEDDER_H_GUARD
13#define RD_EMBEDDER_H_GUARD
19#include <boost/shared_ptr.hpp>
23namespace DGeomHelpers {
103 unsigned int maxIterations{0};
106 bool clearConfs{
true};
107 bool useRandomCoords{
false};
108 double boxSizeMult{2.0};
109 bool randNegEig{
true};
110 unsigned int numZeroFail{1};
111 const std::map<int, RDGeom::Point3D> *coordMap{
nullptr};
112 double optimizerForceTol{1e-3};
113 bool ignoreSmoothingFailures{
false};
114 bool enforceChirality{
true};
115 bool useExpTorsionAnglePrefs{
false};
116 bool useBasicKnowledge{
false};
118 double basinThresh{5.0};
119 double pruneRmsThresh{-1.0};
120 bool onlyHeavyAtomsForRMS{
false};
121 unsigned int ETversion{1};
122 boost::shared_ptr<const DistGeom::BoundsMatrix>
boundsMat;
123 bool embedFragmentsSeparately{
true};
124 bool useSmallRingTorsions{
false};
125 bool useMacrocycleTorsions{
false};
126 bool useMacrocycle14config{
false};
127 std::shared_ptr<std::map<std::pair<unsigned int, unsigned int>,
double>>
CPCI;
128 void (*callback)(
unsigned int);
129 bool forceTransAmides{
true};
130 bool useSymmetryForPruning{
true};
131 double boundsMatForceScaling{1.0};
134 unsigned int maxIterations,
int numThreads,
int randomSeed,
135 bool clearConfs,
bool useRandomCoords,
double boxSizeMult,
136 bool randNegEig,
unsigned int numZeroFail,
137 const std::map<int, RDGeom::Point3D> *coordMap,
double optimizerForceTol,
138 bool ignoreSmoothingFailures,
bool enforceChirality,
139 bool useExpTorsionAnglePrefs,
bool useBasicKnowledge,
bool verbose,
140 double basinThresh,
double pruneRmsThresh,
bool onlyHeavyAtomsForRMS,
141 unsigned int ETversion = 1,
143 bool embedFragmentsSeparately =
true,
bool useSmallRingTorsions =
false,
144 bool useMacrocycleTorsions =
false,
bool useMacrocycle14config =
false,
145 std::shared_ptr<std::map<std::pair<unsigned int, unsigned int>,
double>>
147 void (*callback)(
unsigned int) =
nullptr)
148 : maxIterations(maxIterations),
149 numThreads(numThreads),
150 randomSeed(randomSeed),
151 clearConfs(clearConfs),
152 useRandomCoords(useRandomCoords),
153 boxSizeMult(boxSizeMult),
154 randNegEig(randNegEig),
155 numZeroFail(numZeroFail),
157 optimizerForceTol(optimizerForceTol),
158 ignoreSmoothingFailures(ignoreSmoothingFailures),
159 enforceChirality(enforceChirality),
160 useExpTorsionAnglePrefs(useExpTorsionAnglePrefs),
161 useBasicKnowledge(useBasicKnowledge),
163 basinThresh(basinThresh),
164 pruneRmsThresh(pruneRmsThresh),
165 onlyHeavyAtomsForRMS(onlyHeavyAtomsForRMS),
166 ETversion(ETversion),
167 boundsMat(boundsMat),
168 embedFragmentsSeparately(embedFragmentsSeparately),
169 useSmallRingTorsions(useSmallRingTorsions),
170 useMacrocycleTorsions(useMacrocycleTorsions),
171 useMacrocycle14config(useMacrocycle14config),
172 CPCI(std::move(CPCI)),
173 callback(callback) {}
198 if (confIds.size()) {
276 ROMol &mol,
unsigned int maxIterations = 0,
int seed = -1,
277 bool clearConfs =
true,
bool useRandomCoords =
false,
278 double boxSizeMult = 2.0,
bool randNegEig =
true,
279 unsigned int numZeroFail = 1,
280 const std::map<int, RDGeom::Point3D> *coordMap =
nullptr,
281 double optimizerForceTol = 1e-3,
bool ignoreSmoothingFailures =
false,
282 bool enforceChirality =
true,
bool useExpTorsionAnglePrefs =
false,
283 bool useBasicKnowledge =
false,
bool verbose =
false,
284 double basinThresh = 5.0,
bool onlyHeavyAtomsForRMS =
false,
285 unsigned int ETversion = 1,
bool useSmallRingTorsions =
false,
286 bool useMacrocycleTorsions =
false,
bool useMacrocycle14config =
false) {
288 maxIterations, 1,
seed, clearConfs, useRandomCoords, boxSizeMult,
289 randNegEig, numZeroFail, coordMap, optimizerForceTol,
290 ignoreSmoothingFailures, enforceChirality, useExpTorsionAnglePrefs,
291 useBasicKnowledge, verbose, basinThresh, -1.0, onlyHeavyAtomsForRMS,
292 ETversion,
nullptr,
true, useSmallRingTorsions, useMacrocycleTorsions,
293 useMacrocycle14config);
374 ROMol &mol,
INT_VECT &res,
unsigned int numConfs = 10,
int numThreads = 1,
375 unsigned int maxIterations = 30,
int seed = -1,
bool clearConfs =
true,
376 bool useRandomCoords =
false,
double boxSizeMult = 2.0,
377 bool randNegEig =
true,
unsigned int numZeroFail = 1,
378 double pruneRmsThresh = -1.0,
379 const std::map<int, RDGeom::Point3D> *coordMap =
nullptr,
380 double optimizerForceTol = 1e-3,
bool ignoreSmoothingFailures =
false,
381 bool enforceChirality =
true,
bool useExpTorsionAnglePrefs =
false,
382 bool useBasicKnowledge =
false,
bool verbose =
false,
383 double basinThresh = 5.0,
bool onlyHeavyAtomsForRMS =
false,
384 unsigned int ETversion = 1,
bool useSmallRingTorsions =
false,
385 bool useMacrocycleTorsions =
false,
bool useMacrocycle14config =
false) {
387 maxIterations, numThreads,
seed, clearConfs, useRandomCoords, boxSizeMult,
388 randNegEig, numZeroFail, coordMap, optimizerForceTol,
389 ignoreSmoothingFailures, enforceChirality, useExpTorsionAnglePrefs,
390 useBasicKnowledge, verbose, basinThresh, pruneRmsThresh,
391 onlyHeavyAtomsForRMS, ETversion,
nullptr,
true, useSmallRingTorsions,
392 useMacrocycleTorsions, useMacrocycle14config);
397 ROMol &mol,
unsigned int numConfs = 10,
unsigned int maxIterations = 30,
398 int seed = -1,
bool clearConfs =
true,
bool useRandomCoords =
false,
399 double boxSizeMult = 2.0,
bool randNegEig =
true,
400 unsigned int numZeroFail = 1,
double pruneRmsThresh = -1.0,
401 const std::map<int, RDGeom::Point3D> *coordMap =
nullptr,
402 double optimizerForceTol = 1e-3,
bool ignoreSmoothingFailures =
false,
403 bool enforceChirality =
true,
bool useExpTorsionAnglePrefs =
false,
404 bool useBasicKnowledge =
false,
bool verbose =
false,
405 double basinThresh = 5.0,
bool onlyHeavyAtomsForRMS =
false,
406 unsigned int ETversion = 1,
bool useSmallRingTorsions =
false,
407 bool useMacrocycleTorsions =
false,
bool useMacrocycle14config =
false) {
409 maxIterations, 1,
seed, clearConfs, useRandomCoords, boxSizeMult,
410 randNegEig, numZeroFail, coordMap, optimizerForceTol,
411 ignoreSmoothingFailures, enforceChirality, useExpTorsionAnglePrefs,
412 useBasicKnowledge, verbose, basinThresh, pruneRmsThresh,
413 onlyHeavyAtomsForRMS, ETversion,
nullptr,
true, useSmallRingTorsions,
414 useMacrocycleTorsions, useMacrocycle14config);
Defines the primary molecule class ROMol as well as associated typedefs.
Class to store the distance bound.
#define RDKIT_DISTGEOMHELPERS_EXPORT
RDKIT_DISTGEOMHELPERS_EXPORT const EmbedParameters ETKDGv2
Parameters corresponding to Sereina Riniker's ETKDG approach - version 2.
RDKIT_DISTGEOMHELPERS_EXPORT const EmbedParameters ETDG
Parameters corresponding to Sereina Riniker's ETDG approach.
RDKIT_DISTGEOMHELPERS_EXPORT const EmbedParameters ETKDGv3
RDKIT_DISTGEOMHELPERS_EXPORT void updateEmbedParametersFromJSON(EmbedParameters ¶ms, const std::string &json)
update parameters from a JSON string
int EmbedMolecule(ROMol &mol, const EmbedParameters ¶ms)
RDKIT_DISTGEOMHELPERS_EXPORT void EmbedMultipleConfs(ROMol &mol, INT_VECT &res, unsigned int numConfs, const EmbedParameters ¶ms)
Embed multiple conformations for a molecule.
RDKIT_DISTGEOMHELPERS_EXPORT const EmbedParameters ETKDG
Parameters corresponding to Sereina Riniker's ETKDG approach.
RDKIT_DISTGEOMHELPERS_EXPORT const EmbedParameters srETKDGv3
RDKIT_DISTGEOMHELPERS_EXPORT const EmbedParameters KDG
Parameters corresponding to Sereina Riniker's KDG approach.
std::vector< int > INT_VECT
Parameter object for controlling embedding.
EmbedParameters(unsigned int maxIterations, int numThreads, int randomSeed, bool clearConfs, bool useRandomCoords, double boxSizeMult, bool randNegEig, unsigned int numZeroFail, const std::map< int, RDGeom::Point3D > *coordMap, double optimizerForceTol, bool ignoreSmoothingFailures, bool enforceChirality, bool useExpTorsionAnglePrefs, bool useBasicKnowledge, bool verbose, double basinThresh, double pruneRmsThresh, bool onlyHeavyAtomsForRMS, unsigned int ETversion=1, const DistGeom::BoundsMatrix *boundsMat=nullptr, bool embedFragmentsSeparately=true, bool useSmallRingTorsions=false, bool useMacrocycleTorsions=false, bool useMacrocycle14config=false, std::shared_ptr< std::map< std::pair< unsigned int, unsigned int >, double > > CPCI=nullptr, void(*callback)(unsigned int)=nullptr)
boost::shared_ptr< const DistGeom::BoundsMatrix > boundsMat
std::shared_ptr< std::map< std::pair< unsigned int, unsigned int >, double > > CPCI