12#ifndef RD_EMBEDDER_H_GUARD
13#define RD_EMBEDDER_H_GUARD
19#include <boost/shared_ptr.hpp>
23namespace DGeomHelpers {
119 unsigned int maxIterations{0};
122 bool clearConfs{
true};
123 bool useRandomCoords{
false};
124 double boxSizeMult{2.0};
125 bool randNegEig{
true};
126 unsigned int numZeroFail{1};
127 const std::map<int, RDGeom::Point3D> *coordMap{
nullptr};
128 double optimizerForceTol{1e-3};
129 bool ignoreSmoothingFailures{
false};
130 bool enforceChirality{
true};
131 bool useExpTorsionAnglePrefs{
false};
132 bool useBasicKnowledge{
false};
134 double basinThresh{5.0};
135 double pruneRmsThresh{-1.0};
136 bool onlyHeavyAtomsForRMS{
false};
137 unsigned int ETversion{1};
138 boost::shared_ptr<const DistGeom::BoundsMatrix>
boundsMat;
139 bool embedFragmentsSeparately{
true};
140 bool useSmallRingTorsions{
false};
141 bool useMacrocycleTorsions{
false};
142 bool useMacrocycle14config{
false};
143 std::shared_ptr<std::map<std::pair<unsigned int, unsigned int>,
double>>
CPCI;
144 void (*callback)(
unsigned int);
145 bool forceTransAmides{
true};
146 bool useSymmetryForPruning{
true};
147 double boundsMatForceScaling{1.0};
148 bool trackFailures{
false};
150 bool enableSequentialRandomSeeds{
false};
154 unsigned int maxIterations,
int numThreads,
int randomSeed,
155 bool clearConfs,
bool useRandomCoords,
double boxSizeMult,
156 bool randNegEig,
unsigned int numZeroFail,
157 const std::map<int, RDGeom::Point3D> *coordMap,
double optimizerForceTol,
158 bool ignoreSmoothingFailures,
bool enforceChirality,
159 bool useExpTorsionAnglePrefs,
bool useBasicKnowledge,
bool verbose,
160 double basinThresh,
double pruneRmsThresh,
bool onlyHeavyAtomsForRMS,
161 unsigned int ETversion = 1,
163 bool embedFragmentsSeparately =
true,
bool useSmallRingTorsions =
false,
164 bool useMacrocycleTorsions =
false,
bool useMacrocycle14config =
false,
165 std::shared_ptr<std::map<std::pair<unsigned int, unsigned int>,
double>>
167 void (*callback)(
unsigned int) =
nullptr)
168 : maxIterations(maxIterations),
169 numThreads(numThreads),
170 randomSeed(randomSeed),
171 clearConfs(clearConfs),
172 useRandomCoords(useRandomCoords),
173 boxSizeMult(boxSizeMult),
174 randNegEig(randNegEig),
175 numZeroFail(numZeroFail),
177 optimizerForceTol(optimizerForceTol),
178 ignoreSmoothingFailures(ignoreSmoothingFailures),
179 enforceChirality(enforceChirality),
180 useExpTorsionAnglePrefs(useExpTorsionAnglePrefs),
181 useBasicKnowledge(useBasicKnowledge),
183 basinThresh(basinThresh),
184 pruneRmsThresh(pruneRmsThresh),
185 onlyHeavyAtomsForRMS(onlyHeavyAtomsForRMS),
186 ETversion(ETversion),
187 boundsMat(boundsMat),
188 embedFragmentsSeparately(embedFragmentsSeparately),
189 useSmallRingTorsions(useSmallRingTorsions),
190 useMacrocycleTorsions(useMacrocycleTorsions),
191 useMacrocycle14config(useMacrocycle14config),
192 CPCI(std::move(CPCI)),
193 callback(callback) {}
296 ROMol &mol,
unsigned int maxIterations = 0,
int seed = -1,
297 bool clearConfs =
true,
bool useRandomCoords =
false,
298 double boxSizeMult = 2.0,
bool randNegEig =
true,
299 unsigned int numZeroFail = 1,
300 const std::map<int, RDGeom::Point3D> *coordMap =
nullptr,
301 double optimizerForceTol = 1
e-3,
bool ignoreSmoothingFailures =
false,
302 bool enforceChirality =
true,
bool useExpTorsionAnglePrefs =
false,
303 bool useBasicKnowledge =
false,
bool verbose =
false,
304 double basinThresh = 5.0,
bool onlyHeavyAtomsForRMS =
false,
305 unsigned int ETversion = 1,
bool useSmallRingTorsions =
false,
306 bool useMacrocycleTorsions =
false,
bool useMacrocycle14config =
false) {
308 maxIterations, 1, seed, clearConfs, useRandomCoords, boxSizeMult,
309 randNegEig, numZeroFail, coordMap, optimizerForceTol,
310 ignoreSmoothingFailures, enforceChirality, useExpTorsionAnglePrefs,
311 useBasicKnowledge, verbose, basinThresh, -1.0, onlyHeavyAtomsForRMS,
312 ETversion,
nullptr,
true, useSmallRingTorsions, useMacrocycleTorsions,
313 useMacrocycle14config);
395 unsigned int maxIterations = 30,
int seed = -1,
bool clearConfs =
true,
396 bool useRandomCoords =
false,
double boxSizeMult = 2.0,
397 bool randNegEig =
true,
unsigned int numZeroFail = 1,
398 double pruneRmsThresh = -1.0,
399 const std::map<int, RDGeom::Point3D> *coordMap =
nullptr,
400 double optimizerForceTol = 1
e-3,
bool ignoreSmoothingFailures =
false,
401 bool enforceChirality =
true,
bool useExpTorsionAnglePrefs =
false,
402 bool useBasicKnowledge =
false,
bool verbose =
false,
403 double basinThresh = 5.0,
bool onlyHeavyAtomsForRMS =
false,
404 unsigned int ETversion = 1,
bool useSmallRingTorsions =
false,
405 bool useMacrocycleTorsions =
false,
bool useMacrocycle14config =
false) {
407 maxIterations, numThreads, seed, clearConfs, useRandomCoords, boxSizeMult,
408 randNegEig, numZeroFail, coordMap, optimizerForceTol,
409 ignoreSmoothingFailures, enforceChirality, useExpTorsionAnglePrefs,
410 useBasicKnowledge, verbose, basinThresh, pruneRmsThresh,
411 onlyHeavyAtomsForRMS, ETversion,
nullptr,
true, useSmallRingTorsions,
412 useMacrocycleTorsions, useMacrocycle14config);
417 ROMol &mol,
unsigned int numConfs = 10,
unsigned int maxIterations = 30,
418 int seed = -1,
bool clearConfs =
true,
bool useRandomCoords =
false,
419 double boxSizeMult = 2.0,
bool randNegEig =
true,
420 unsigned int numZeroFail = 1,
double pruneRmsThresh = -1.0,
421 const std::map<int, RDGeom::Point3D> *coordMap =
nullptr,
422 double optimizerForceTol = 1
e-3,
bool ignoreSmoothingFailures =
false,
423 bool enforceChirality =
true,
bool useExpTorsionAnglePrefs =
false,
424 bool useBasicKnowledge =
false,
bool verbose =
false,
425 double basinThresh = 5.0,
bool onlyHeavyAtomsForRMS =
false,
426 unsigned int ETversion = 1,
bool useSmallRingTorsions =
false,
427 bool useMacrocycleTorsions =
false,
bool useMacrocycle14config =
false) {
429 maxIterations, 1, seed, clearConfs, useRandomCoords, boxSizeMult,
430 randNegEig, numZeroFail, coordMap, optimizerForceTol,
431 ignoreSmoothingFailures, enforceChirality, useExpTorsionAnglePrefs,
432 useBasicKnowledge, verbose, basinThresh, pruneRmsThresh,
433 onlyHeavyAtomsForRMS, ETversion,
nullptr,
true, useSmallRingTorsions,
434 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
bool rdvalue_is(const RDValue_cast_t)
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)
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