12 #ifndef RD_EMBEDDER_H_GUARD
13 #define RD_EMBEDDER_H_GUARD
19 #include <boost/shared_ptr.hpp>
23 namespace DGeomHelpers {
117 unsigned int maxIterations{0};
120 bool clearConfs{
true};
121 bool useRandomCoords{
false};
122 double boxSizeMult{2.0};
123 bool randNegEig{
true};
124 unsigned int numZeroFail{1};
125 const std::map<int, RDGeom::Point3D> *coordMap{
nullptr};
126 double optimizerForceTol{1e-3};
127 bool ignoreSmoothingFailures{
false};
128 bool enforceChirality{
true};
129 bool useExpTorsionAnglePrefs{
false};
130 bool useBasicKnowledge{
false};
132 double basinThresh{5.0};
133 double pruneRmsThresh{-1.0};
134 bool onlyHeavyAtomsForRMS{
false};
135 unsigned int ETversion{1};
136 boost::shared_ptr<const DistGeom::BoundsMatrix>
boundsMat;
137 bool embedFragmentsSeparately{
true};
138 bool useSmallRingTorsions{
false};
139 bool useMacrocycleTorsions{
false};
140 bool useMacrocycle14config{
false};
141 std::shared_ptr<std::map<std::pair<unsigned int, unsigned int>,
double>>
CPCI;
142 void (*callback)(
unsigned int);
143 bool forceTransAmides{
true};
144 bool useSymmetryForPruning{
true};
145 double boundsMatForceScaling{1.0};
146 bool trackFailures{
false};
151 unsigned int maxIterations,
int numThreads,
int randomSeed,
152 bool clearConfs,
bool useRandomCoords,
double boxSizeMult,
153 bool randNegEig,
unsigned int numZeroFail,
154 const std::map<int, RDGeom::Point3D> *coordMap,
double optimizerForceTol,
155 bool ignoreSmoothingFailures,
bool enforceChirality,
156 bool useExpTorsionAnglePrefs,
bool useBasicKnowledge,
bool verbose,
157 double basinThresh,
double pruneRmsThresh,
bool onlyHeavyAtomsForRMS,
158 unsigned int ETversion = 1,
160 bool embedFragmentsSeparately =
true,
bool useSmallRingTorsions =
false,
161 bool useMacrocycleTorsions =
false,
bool useMacrocycle14config =
false,
162 std::shared_ptr<std::map<std::pair<unsigned int, unsigned int>,
double>>
164 void (*callback)(
unsigned int) =
nullptr)
165 : maxIterations(maxIterations),
166 numThreads(numThreads),
167 randomSeed(randomSeed),
168 clearConfs(clearConfs),
169 useRandomCoords(useRandomCoords),
170 boxSizeMult(boxSizeMult),
171 randNegEig(randNegEig),
172 numZeroFail(numZeroFail),
174 optimizerForceTol(optimizerForceTol),
175 ignoreSmoothingFailures(ignoreSmoothingFailures),
176 enforceChirality(enforceChirality),
177 useExpTorsionAnglePrefs(useExpTorsionAnglePrefs),
178 useBasicKnowledge(useBasicKnowledge),
180 basinThresh(basinThresh),
181 pruneRmsThresh(pruneRmsThresh),
182 onlyHeavyAtomsForRMS(onlyHeavyAtomsForRMS),
183 ETversion(ETversion),
184 boundsMat(boundsMat),
185 embedFragmentsSeparately(embedFragmentsSeparately),
186 useSmallRingTorsions(useSmallRingTorsions),
187 useMacrocycleTorsions(useMacrocycleTorsions),
188 useMacrocycle14config(useMacrocycle14config),
189 CPCI(std::move(CPCI)),
190 callback(callback) {}
199 unsigned int numConfs,
215 if (confIds.size()) {
293 ROMol &mol,
unsigned int maxIterations = 0,
int seed = -1,
294 bool clearConfs =
true,
bool useRandomCoords =
false,
295 double boxSizeMult = 2.0,
bool randNegEig =
true,
296 unsigned int numZeroFail = 1,
297 const std::map<int, RDGeom::Point3D> *coordMap =
nullptr,
298 double optimizerForceTol = 1e-3,
bool ignoreSmoothingFailures =
false,
299 bool enforceChirality =
true,
bool useExpTorsionAnglePrefs =
false,
300 bool useBasicKnowledge =
false,
bool verbose =
false,
301 double basinThresh = 5.0,
bool onlyHeavyAtomsForRMS =
false,
302 unsigned int ETversion = 1,
bool useSmallRingTorsions =
false,
303 bool useMacrocycleTorsions =
false,
bool useMacrocycle14config =
false) {
305 maxIterations, 1,
seed, clearConfs, useRandomCoords, boxSizeMult,
306 randNegEig, numZeroFail, coordMap, optimizerForceTol,
307 ignoreSmoothingFailures, enforceChirality, useExpTorsionAnglePrefs,
308 useBasicKnowledge, verbose, basinThresh, -1.0, onlyHeavyAtomsForRMS,
309 ETversion,
nullptr,
true, useSmallRingTorsions, useMacrocycleTorsions,
310 useMacrocycle14config);
391 ROMol &mol,
INT_VECT &res,
unsigned int numConfs = 10,
int numThreads = 1,
392 unsigned int maxIterations = 30,
int seed = -1,
bool clearConfs =
true,
393 bool useRandomCoords =
false,
double boxSizeMult = 2.0,
394 bool randNegEig =
true,
unsigned int numZeroFail = 1,
395 double pruneRmsThresh = -1.0,
396 const std::map<int, RDGeom::Point3D> *coordMap =
nullptr,
397 double optimizerForceTol = 1e-3,
bool ignoreSmoothingFailures =
false,
398 bool enforceChirality =
true,
bool useExpTorsionAnglePrefs =
false,
399 bool useBasicKnowledge =
false,
bool verbose =
false,
400 double basinThresh = 5.0,
bool onlyHeavyAtomsForRMS =
false,
401 unsigned int ETversion = 1,
bool useSmallRingTorsions =
false,
402 bool useMacrocycleTorsions =
false,
bool useMacrocycle14config =
false) {
404 maxIterations, numThreads,
seed, clearConfs, useRandomCoords, boxSizeMult,
405 randNegEig, numZeroFail, coordMap, optimizerForceTol,
406 ignoreSmoothingFailures, enforceChirality, useExpTorsionAnglePrefs,
407 useBasicKnowledge, verbose, basinThresh, pruneRmsThresh,
408 onlyHeavyAtomsForRMS, ETversion,
nullptr,
true, useSmallRingTorsions,
409 useMacrocycleTorsions, useMacrocycle14config);
414 ROMol &mol,
unsigned int numConfs = 10,
unsigned int maxIterations = 30,
415 int seed = -1,
bool clearConfs =
true,
bool useRandomCoords =
false,
416 double boxSizeMult = 2.0,
bool randNegEig =
true,
417 unsigned int numZeroFail = 1,
double pruneRmsThresh = -1.0,
418 const std::map<int, RDGeom::Point3D> *coordMap =
nullptr,
419 double optimizerForceTol = 1e-3,
bool ignoreSmoothingFailures =
false,
420 bool enforceChirality =
true,
bool useExpTorsionAnglePrefs =
false,
421 bool useBasicKnowledge =
false,
bool verbose =
false,
422 double basinThresh = 5.0,
bool onlyHeavyAtomsForRMS =
false,
423 unsigned int ETversion = 1,
bool useSmallRingTorsions =
false,
424 bool useMacrocycleTorsions =
false,
bool useMacrocycle14config =
false) {
426 maxIterations, 1,
seed, clearConfs, useRandomCoords, boxSizeMult,
427 randNegEig, numZeroFail, coordMap, optimizerForceTol,
428 ignoreSmoothingFailures, enforceChirality, useExpTorsionAnglePrefs,
429 useBasicKnowledge, verbose, basinThresh, pruneRmsThresh,
430 onlyHeavyAtomsForRMS, ETversion,
nullptr,
true, useSmallRingTorsions,
431 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
RDKIT_DISTGEOMHELPERS_EXPORT const EmbedParameters ETKDG
Parameters corresponding to Sereina Riniker's ETKDG approach.
RDKIT_DISTGEOMHELPERS_EXPORT void EmbedMultipleConfs(ROMol &mol, INT_VECT &res, unsigned int numConfs, EmbedParameters ¶ms)
Embed multiple conformations for a molecule.
@ MINIMIZE_FOURTH_DIMENSION
@ CHECK_TETRAHEDRAL_CENTERS
int EmbedMolecule(ROMol &mol, EmbedParameters ¶ms)
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.
std::vector< unsigned int > failures
boost::shared_ptr< const DistGeom::BoundsMatrix > boundsMat
std::shared_ptr< std::map< std::pair< unsigned int, unsigned int >, double > > CPCI
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)