12#ifndef RD_EMBEDDER_H_GUARD
13#define RD_EMBEDDER_H_GUARD
19#include <boost/shared_ptr.hpp>
23namespace DGeomHelpers {
123 unsigned int maxIterations{0};
126 bool clearConfs{
true};
127 bool useRandomCoords{
false};
128 double boxSizeMult{2.0};
129 bool randNegEig{
true};
130 unsigned int numZeroFail{1};
131 const std::map<int, RDGeom::Point3D> *coordMap{
nullptr};
132 double optimizerForceTol{1e-3};
133 bool ignoreSmoothingFailures{
false};
134 bool enforceChirality{
true};
135 bool useExpTorsionAnglePrefs{
false};
136 bool useBasicKnowledge{
false};
138 double basinThresh{5.0};
139 double pruneRmsThresh{-1.0};
140 bool onlyHeavyAtomsForRMS{
true};
141 unsigned int ETversion{1};
142 boost::shared_ptr<const DistGeom::BoundsMatrix>
boundsMat;
143 bool embedFragmentsSeparately{
true};
144 bool useSmallRingTorsions{
false};
145 bool useMacrocycleTorsions{
false};
146 bool useMacrocycle14config{
false};
147 unsigned int timeout{0};
148 std::shared_ptr<std::map<std::pair<unsigned int, unsigned int>,
double>>
CPCI;
149 void (*callback)(
unsigned int);
150 bool forceTransAmides{
true};
151 bool useSymmetryForPruning{
true};
152 double boundsMatForceScaling{1.0};
153 bool trackFailures{
false};
155 bool enableSequentialRandomSeeds{
false};
156 bool symmetrizeConjugatedTerminalGroupsForPruning{
true};
160 unsigned int maxIterations,
int numThreads,
int randomSeed,
161 bool clearConfs,
bool useRandomCoords,
double boxSizeMult,
162 bool randNegEig,
unsigned int numZeroFail,
163 const std::map<int, RDGeom::Point3D> *coordMap,
double optimizerForceTol,
164 bool ignoreSmoothingFailures,
bool enforceChirality,
165 bool useExpTorsionAnglePrefs,
bool useBasicKnowledge,
bool verbose,
166 double basinThresh,
double pruneRmsThresh,
bool onlyHeavyAtomsForRMS,
167 unsigned int ETversion = 2,
169 bool embedFragmentsSeparately =
true,
bool useSmallRingTorsions =
false,
170 bool useMacrocycleTorsions =
false,
bool useMacrocycle14config =
false,
171 unsigned int timeout = 0,
172 std::shared_ptr<std::map<std::pair<unsigned int, unsigned int>,
double>>
174 void (*callback)(
unsigned int) =
nullptr)
175 : maxIterations(maxIterations),
176 numThreads(numThreads),
177 randomSeed(randomSeed),
178 clearConfs(clearConfs),
179 useRandomCoords(useRandomCoords),
180 boxSizeMult(boxSizeMult),
181 randNegEig(randNegEig),
182 numZeroFail(numZeroFail),
184 optimizerForceTol(optimizerForceTol),
185 ignoreSmoothingFailures(ignoreSmoothingFailures),
186 enforceChirality(enforceChirality),
187 useExpTorsionAnglePrefs(useExpTorsionAnglePrefs),
188 useBasicKnowledge(useBasicKnowledge),
190 basinThresh(basinThresh),
191 pruneRmsThresh(pruneRmsThresh),
192 onlyHeavyAtomsForRMS(onlyHeavyAtomsForRMS),
193 ETversion(ETversion),
194 boundsMat(boundsMat),
195 embedFragmentsSeparately(embedFragmentsSeparately),
196 useSmallRingTorsions(useSmallRingTorsions),
197 useMacrocycleTorsions(useMacrocycleTorsions),
198 useMacrocycle14config(useMacrocycle14config),
200 CPCI(std::move(CPCI)),
201 callback(callback) {}
305 ROMol &mol,
unsigned int maxIterations = 0,
int seed = -1,
306 bool clearConfs =
true,
bool useRandomCoords =
false,
307 double boxSizeMult = 2.0,
bool randNegEig =
true,
308 unsigned int numZeroFail = 1,
309 const std::map<int, RDGeom::Point3D> *coordMap =
nullptr,
310 double optimizerForceTol = 1
e-3,
bool ignoreSmoothingFailures =
false,
311 bool enforceChirality =
true,
bool useExpTorsionAnglePrefs =
false,
312 bool useBasicKnowledge =
false,
bool verbose =
false,
313 double basinThresh = 5.0,
bool onlyHeavyAtomsForRMS =
false,
314 unsigned int ETversion = 2,
bool useSmallRingTorsions =
false,
315 bool useMacrocycleTorsions =
true,
bool useMacrocycle14config =
true) {
317 maxIterations, 1, seed, clearConfs, useRandomCoords, boxSizeMult,
318 randNegEig, numZeroFail, coordMap, optimizerForceTol,
319 ignoreSmoothingFailures, enforceChirality, useExpTorsionAnglePrefs,
320 useBasicKnowledge, verbose, basinThresh, -1.0, onlyHeavyAtomsForRMS,
321 ETversion,
nullptr,
true, useSmallRingTorsions, useMacrocycleTorsions,
322 useMacrocycle14config);
404 unsigned int maxIterations = 30,
int seed = -1,
bool clearConfs =
true,
405 bool useRandomCoords =
false,
double boxSizeMult = 2.0,
406 bool randNegEig =
true,
unsigned int numZeroFail = 1,
407 double pruneRmsThresh = -1.0,
408 const std::map<int, RDGeom::Point3D> *coordMap =
nullptr,
409 double optimizerForceTol = 1
e-3,
bool ignoreSmoothingFailures =
false,
410 bool enforceChirality =
true,
bool useExpTorsionAnglePrefs =
false,
411 bool useBasicKnowledge =
false,
bool verbose =
false,
412 double basinThresh = 5.0,
bool onlyHeavyAtomsForRMS =
false,
413 unsigned int ETversion = 2,
bool useSmallRingTorsions =
false,
414 bool useMacrocycleTorsions =
true,
bool useMacrocycle14config =
true,
415 unsigned int timeout = 0) {
417 maxIterations, numThreads, seed, clearConfs, useRandomCoords, boxSizeMult,
418 randNegEig, numZeroFail, coordMap, optimizerForceTol,
419 ignoreSmoothingFailures, enforceChirality, useExpTorsionAnglePrefs,
420 useBasicKnowledge, verbose, basinThresh, pruneRmsThresh,
421 onlyHeavyAtomsForRMS, ETversion,
nullptr,
true, useSmallRingTorsions,
422 useMacrocycleTorsions, useMacrocycle14config, timeout);
427 ROMol &mol,
unsigned int numConfs = 10,
unsigned int maxIterations = 30,
428 int seed = -1,
bool clearConfs =
true,
bool useRandomCoords =
false,
429 double boxSizeMult = 2.0,
bool randNegEig =
true,
430 unsigned int numZeroFail = 1,
double pruneRmsThresh = -1.0,
431 const std::map<int, RDGeom::Point3D> *coordMap =
nullptr,
432 double optimizerForceTol = 1
e-3,
bool ignoreSmoothingFailures =
false,
433 bool enforceChirality =
true,
bool useExpTorsionAnglePrefs =
false,
434 bool useBasicKnowledge =
false,
bool verbose =
false,
435 double basinThresh = 5.0,
bool onlyHeavyAtomsForRMS =
false,
436 unsigned int ETversion = 2,
bool useSmallRingTorsions =
false,
437 bool useMacrocycleTorsions =
false,
bool useMacrocycle14config =
false,
438 unsigned int timeout = 0) {
440 maxIterations, 1, seed, clearConfs, useRandomCoords, boxSizeMult,
441 randNegEig, numZeroFail, coordMap, optimizerForceTol,
442 ignoreSmoothingFailures, enforceChirality, useExpTorsionAnglePrefs,
443 useBasicKnowledge, verbose, basinThresh, pruneRmsThresh,
444 onlyHeavyAtomsForRMS, ETversion,
nullptr,
true, useSmallRingTorsions,
445 useMacrocycleTorsions, useMacrocycle14config, timeout);
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.
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=2, const DistGeom::BoundsMatrix *boundsMat=nullptr, bool embedFragmentsSeparately=true, bool useSmallRingTorsions=false, bool useMacrocycleTorsions=false, bool useMacrocycle14config=false, unsigned int timeout=0, std::shared_ptr< std::map< std::pair< unsigned int, unsigned int >, double > > CPCI=nullptr, void(*callback)(unsigned int)=nullptr)