12#ifndef RD_EMBEDDER_H_GUARD
13#define RD_EMBEDDER_H_GUARD
19#include <boost/shared_ptr.hpp>
23namespace DGeomHelpers {
121 unsigned int maxIterations{0};
124 bool clearConfs{
true};
125 bool useRandomCoords{
false};
126 double boxSizeMult{2.0};
127 bool randNegEig{
true};
128 unsigned int numZeroFail{1};
129 const std::map<int, RDGeom::Point3D> *coordMap{
nullptr};
130 double optimizerForceTol{1e-3};
131 bool ignoreSmoothingFailures{
false};
132 bool enforceChirality{
true};
133 bool useExpTorsionAnglePrefs{
false};
134 bool useBasicKnowledge{
false};
136 double basinThresh{5.0};
137 double pruneRmsThresh{-1.0};
138 bool onlyHeavyAtomsForRMS{
true};
139 unsigned int ETversion{1};
140 boost::shared_ptr<const DistGeom::BoundsMatrix>
boundsMat;
141 bool embedFragmentsSeparately{
true};
142 bool useSmallRingTorsions{
false};
143 bool useMacrocycleTorsions{
false};
144 bool useMacrocycle14config{
false};
145 std::shared_ptr<std::map<std::pair<unsigned int, unsigned int>,
double>>
CPCI;
146 void (*callback)(
unsigned int);
147 bool forceTransAmides{
true};
148 bool useSymmetryForPruning{
true};
149 double boundsMatForceScaling{1.0};
150 bool trackFailures{
false};
152 bool enableSequentialRandomSeeds{
false};
153 bool symmetrizeConjugatedTerminalGroupsForPruning{
true};
157 unsigned int maxIterations,
int numThreads,
int randomSeed,
158 bool clearConfs,
bool useRandomCoords,
double boxSizeMult,
159 bool randNegEig,
unsigned int numZeroFail,
160 const std::map<int, RDGeom::Point3D> *coordMap,
double optimizerForceTol,
161 bool ignoreSmoothingFailures,
bool enforceChirality,
162 bool useExpTorsionAnglePrefs,
bool useBasicKnowledge,
bool verbose,
163 double basinThresh,
double pruneRmsThresh,
bool onlyHeavyAtomsForRMS,
164 unsigned int ETversion = 2,
166 bool embedFragmentsSeparately =
true,
bool useSmallRingTorsions =
false,
167 bool useMacrocycleTorsions =
false,
bool useMacrocycle14config =
false,
168 std::shared_ptr<std::map<std::pair<unsigned int, unsigned int>,
double>>
170 void (*callback)(
unsigned int) =
nullptr)
171 : maxIterations(maxIterations),
172 numThreads(numThreads),
173 randomSeed(randomSeed),
174 clearConfs(clearConfs),
175 useRandomCoords(useRandomCoords),
176 boxSizeMult(boxSizeMult),
177 randNegEig(randNegEig),
178 numZeroFail(numZeroFail),
180 optimizerForceTol(optimizerForceTol),
181 ignoreSmoothingFailures(ignoreSmoothingFailures),
182 enforceChirality(enforceChirality),
183 useExpTorsionAnglePrefs(useExpTorsionAnglePrefs),
184 useBasicKnowledge(useBasicKnowledge),
186 basinThresh(basinThresh),
187 pruneRmsThresh(pruneRmsThresh),
188 onlyHeavyAtomsForRMS(onlyHeavyAtomsForRMS),
189 ETversion(ETversion),
190 boundsMat(boundsMat),
191 embedFragmentsSeparately(embedFragmentsSeparately),
192 useSmallRingTorsions(useSmallRingTorsions),
193 useMacrocycleTorsions(useMacrocycleTorsions),
194 useMacrocycle14config(useMacrocycle14config),
195 CPCI(std::move(CPCI)),
196 callback(callback) {}
300 ROMol &mol,
unsigned int maxIterations = 0,
int seed = -1,
301 bool clearConfs =
true,
bool useRandomCoords =
false,
302 double boxSizeMult = 2.0,
bool randNegEig =
true,
303 unsigned int numZeroFail = 1,
304 const std::map<int, RDGeom::Point3D> *coordMap =
nullptr,
305 double optimizerForceTol = 1
e-3,
bool ignoreSmoothingFailures =
false,
306 bool enforceChirality =
true,
bool useExpTorsionAnglePrefs =
false,
307 bool useBasicKnowledge =
false,
bool verbose =
false,
308 double basinThresh = 5.0,
bool onlyHeavyAtomsForRMS =
false,
309 unsigned int ETversion = 2,
bool useSmallRingTorsions =
false,
310 bool useMacrocycleTorsions =
true,
bool useMacrocycle14config =
true) {
312 maxIterations, 1, seed, clearConfs, useRandomCoords, boxSizeMult,
313 randNegEig, numZeroFail, coordMap, optimizerForceTol,
314 ignoreSmoothingFailures, enforceChirality, useExpTorsionAnglePrefs,
315 useBasicKnowledge, verbose, basinThresh, -1.0, onlyHeavyAtomsForRMS,
316 ETversion,
nullptr,
true, useSmallRingTorsions, useMacrocycleTorsions,
317 useMacrocycle14config);
399 unsigned int maxIterations = 30,
int seed = -1,
bool clearConfs =
true,
400 bool useRandomCoords =
false,
double boxSizeMult = 2.0,
401 bool randNegEig =
true,
unsigned int numZeroFail = 1,
402 double pruneRmsThresh = -1.0,
403 const std::map<int, RDGeom::Point3D> *coordMap =
nullptr,
404 double optimizerForceTol = 1
e-3,
bool ignoreSmoothingFailures =
false,
405 bool enforceChirality =
true,
bool useExpTorsionAnglePrefs =
false,
406 bool useBasicKnowledge =
false,
bool verbose =
false,
407 double basinThresh = 5.0,
bool onlyHeavyAtomsForRMS =
false,
408 unsigned int ETversion = 2,
bool useSmallRingTorsions =
false,
409 bool useMacrocycleTorsions =
true,
bool useMacrocycle14config =
true) {
411 maxIterations, numThreads, seed, clearConfs, useRandomCoords, boxSizeMult,
412 randNegEig, numZeroFail, coordMap, optimizerForceTol,
413 ignoreSmoothingFailures, enforceChirality, useExpTorsionAnglePrefs,
414 useBasicKnowledge, verbose, basinThresh, pruneRmsThresh,
415 onlyHeavyAtomsForRMS, ETversion,
nullptr,
true, useSmallRingTorsions,
416 useMacrocycleTorsions, useMacrocycle14config);
421 ROMol &mol,
unsigned int numConfs = 10,
unsigned int maxIterations = 30,
422 int seed = -1,
bool clearConfs =
true,
bool useRandomCoords =
false,
423 double boxSizeMult = 2.0,
bool randNegEig =
true,
424 unsigned int numZeroFail = 1,
double pruneRmsThresh = -1.0,
425 const std::map<int, RDGeom::Point3D> *coordMap =
nullptr,
426 double optimizerForceTol = 1
e-3,
bool ignoreSmoothingFailures =
false,
427 bool enforceChirality =
true,
bool useExpTorsionAnglePrefs =
false,
428 bool useBasicKnowledge =
false,
bool verbose =
false,
429 double basinThresh = 5.0,
bool onlyHeavyAtomsForRMS =
false,
430 unsigned int ETversion = 2,
bool useSmallRingTorsions =
false,
431 bool useMacrocycleTorsions =
false,
bool useMacrocycle14config =
false) {
433 maxIterations, 1, seed, clearConfs, useRandomCoords, boxSizeMult,
434 randNegEig, numZeroFail, coordMap, optimizerForceTol,
435 ignoreSmoothingFailures, enforceChirality, useExpTorsionAnglePrefs,
436 useBasicKnowledge, verbose, basinThresh, pruneRmsThresh,
437 onlyHeavyAtomsForRMS, ETversion,
nullptr,
true, useSmallRingTorsions,
438 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=2, 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