RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
Embedder.h
Go to the documentation of this file.
1//
2// Copyright (C) 2004-2026 Greg Landrum and other RDKit contributors
3//
4// @@ All Rights Reserved @@
5// This file is part of the RDKit.
6// The contents are covered by the terms of the BSD license
7// which is included in the file license.txt, found at the root
8// of the RDKit source tree.
9//
10
11#include <RDGeneral/export.h>
12#include <memory>
13#ifndef RD_EMBEDDER_H_GUARD
14#define RD_EMBEDDER_H_GUARD
15
16#include <RDGeneral/RDLog.h>
17#include <map>
18#include <utility>
19#include <vector>
20#include <GraphMol/ROMol.h>
21#include <boost/shared_ptr.hpp>
22#include "ZMatrixBuilder.h"
23
24namespace DistGeom {
25class BoundsMatrix;
26class ChiralSet;
27using VECT_CHIRALSET = std::vector<boost::shared_ptr<ChiralSet>>;
28} // namespace DistGeom
29
30namespace RDGeom {
31class Point3D;
32}
33
34namespace RDKit {
35namespace DGeomHelpers {
36
55
61
62enum class EmbedFF : std::uint8_t {
63 UFF = 0,
64 MMFF = 1,
65};
66
67//! Parameter object for controlling embedding
68/*!
69 numConfs Number of conformations to be generated
70 numThreads Sets the number of threads to use (more than one thread
71 will only be used if the RDKit was build with multithread
72 support) If set to zero, the max supported by the system will
73 be used.
74 maxIterations Max. number of times the embedding will be tried if
75 coordinates are not obtained successfully. The default
76 value is 10x the number of atoms.
77 randomSeed provides a seed for the random number generator (so that
78 the same coordinates can be obtained for a
79 molecule on multiple runs) If -1, the
80 RNG will not be seeded.
81 clearConfs Clear all existing conformations on the molecule
82 useRandomCoords Start the embedding from random coordinates instead of
83 using eigenvalues of the distance matrix.
84 boxSizeMult Determines the size of the box that is used for
85 random coordinates. If this is a positive number, the
86 side length will equal the largest element of the distance
87 matrix times \c boxSizeMult. If this is a negative number,
88 the side length will equal \c -boxSizeMult (i.e. independent
89 of the elements of the distance matrix).
90 randNegEig Picks coordinates at random when a embedding process produces
91 negative eigenvalues
92 numZeroFail Fail embedding if we find this many or more zero eigenvalues
93 (within a tolerance)
94 pruneRmsThresh Retain only the conformations out of 'numConfs' after
95 embedding that are at least this far apart from each other.
96 RMSD is computed on the heavy atoms.
97 Prunining is greedy; i.e. the first embedded conformation is
98 retained and from then on only those that are at least
99 \c pruneRmsThresh away from already
100 retained conformations are kept. The pruning is done
101 after embedding and bounds violation minimization.
102 No pruning by default.
103 coordMap a map of int to Point3D, between atom IDs and their locations
104 their locations. If this container is provided, the
105 coordinates are used to set distance constraints on the
106 embedding. The resulting conformer(s) should have distances
107 between the specified atoms that reproduce those between the
108 points in \c coordMap. Because the embedding produces a
109 molecule in an arbitrary reference frame, an alignment step
110 is required to actually reproduce the provided coordinates.
111 optimizerForceTol set the tolerance on forces in the DGeom optimizer
112 (this shouldn't normally be altered in client code).
113 ignoreSmoothingFailures try to embed the molecule even if triangle bounds
114 smoothing fails
115 enforceChirality enforce the correct chirality if chiral centers are present
116 useExpTorsionAnglePrefs impose experimental torsion-angle preferences
117 useBasicKnowledge impose "basic knowledge" terms such as flat
118 aromatic rings, ketones, etc.
119 ETversion version of the experimental torsion-angle preferences
120 verbose print output of experimental torsion-angle preferences
121 basinThresh set the basin threshold for the DGeom force field,
122 (this shouldn't normally be altered in client code).
123 onlyHeavyAtomsForRMS only use the heavy atoms when doing RMS filtering
124 boundsMat custom bound matrix to specify upper and lower bounds of atom
125 pairs
126 embedFragmentsSeparately embed each fragment of molecule in turn
127 useSmallRingTorsions optional torsions to improve small ring conformer
128 sampling
129 useMacrocycleTorsions optional torsions to improve macrocycle conformer
130 sampling
131 useMacrocycle14config This forces amides and esters to be trans in
132 macrocycles. This does not affect chain amides / esters!
133 timeout time out in seconds
134 CPCI custom columbic interactions between atom pairs
135 callback void pointer to a function for reporting progress,
136 will be called with the current iteration number.
137 forceTransAmides This forces chain amides and esters to be trans.
138 This does not affect amides / esters in macrocycles!
139
140 useSymmetryForPruning use molecule symmetry when doing the RMSD pruning.
141 NOTE that for reasons of computational efficiency,
142 setting this will also set onlyHeavyAtomsForRMS to
143 true.
144 trackFailures keep track of which checks during the embedding process fail
145 failures if trackFailures is true, this is used to track the number
146 of times each embedding check fails
147 enableSequentialRandomSeeds handle the random number seeds so that
148 conformer generation can be restarted
149 embedFF Force Field to use to determine ideal 1-2 and 1-3 distances.
150*/
152 unsigned int maxIterations{0};
154 int randomSeed{-1};
155 bool clearConfs{true};
156 bool useRandomCoords{false};
157 double boxSizeMult{2.0};
158 bool randNegEig{true};
159 unsigned int numZeroFail{1};
160 const std::map<int, RDGeom::Point3D> *coordMap{nullptr};
161 double optimizerForceTol{1e-3};
165 bool useBasicKnowledge{false};
166 bool verbose{false};
167 double basinThresh{5.0};
168 double pruneRmsThresh{-1.0};
170 unsigned int ETversion{2};
171 boost::shared_ptr<const DistGeom::BoundsMatrix> boundsMat{nullptr};
176 unsigned int timeout{0};
179 std::shared_ptr<std::map<std::pair<unsigned int, unsigned int>, double>> CPCI{
180 nullptr};
181 void (*callback)(unsigned int){nullptr};
186 bool trackFailures{false};
187 std::vector<unsigned int> failures{};
191};
192
193//! update parameters from a JSON string
195 EmbedParameters &params, const std::string &json);
196
197//! export parameters to JSON string
199 const EmbedParameters &params);
200
201//! Embed multiple conformations for a molecule
203 unsigned int numConfs,
204 EmbedParameters &params);
205inline INT_VECT EmbedMultipleConfs(ROMol &mol, unsigned int numConfs,
206 EmbedParameters &params) {
207 INT_VECT res;
208 EmbedMultipleConfs(mol, res, numConfs, params);
209 return res;
210}
211
212//! Compute an embedding (in 3D) for the specified molecule using Distance
213/// Geometry
214inline int EmbedMolecule(ROMol &mol, EmbedParameters &params) {
215 INT_VECT confIds;
216 EmbedMultipleConfs(mol, confIds, 1, params);
217
218 int res;
219 if (confIds.size()) {
220 res = confIds[0];
221 } else {
222 res = -1;
223 }
224 return res;
225}
226
227//! Compute an embedding (in 3D) for the specified molecule using Distance
228/// Geometry
229/*!
230 The following operations are performed (in order) here:
231 -# Build a distance bounds matrix based on the topology, including 1-5
232 distances but not VDW scaling
233 -# Triangle smooth this bounds matrix
234 -# If step 2 fails - repeat step 1, this time without 1-5 bounds and with vdW
235 scaling, and repeat step 2
236 -# Pick a distance matrix at random using the bounds matrix
237 -# Compute initial coordinates from the distance matrix
238 -# Repeat steps 3 and 4 until maxIterations is reached or embedding is
239 successful
240 -# Adjust initial coordinates by minimizing a Distance Violation error
241 function
242 **NOTE**: if the molecule has multiple fragments, they will be embedded
243 separately,
244 this means that they will likely occupy the same region of space.
245 \param mol Molecule of interest
246 \param maxIterations Max. number of times the embedding will be tried if
247 coordinates are not obtained successfully. The default
248 value is 10x the number of atoms.
249 \param seed provides a seed for the random number generator (so that
250 the same coordinates can be obtained for a molecule on
251 multiple runs). If negative, the RNG will not be seeded.
252 \param clearConfs Clear all existing conformations on the molecule
253 \param useRandomCoords Start the embedding from random coordinates instead of
254 using eigenvalues of the distance matrix.
255 \param boxSizeMult Determines the size of the box that is used for
256 random coordinates. If this is a positive number, the
257 side length will equal the largest element of the
258 distance matrix times \c boxSizeMult. If this is a
259 negative number, the side length will equal
260 \c -boxSizeMult (i.e. independent of the elements of the
261 distance matrix).
262 \param randNegEig Picks coordinates at random when a embedding process
263 produces negative eigenvalues
264 \param numZeroFail Fail embedding if we find this many or more zero
265 eigenvalues (within a tolerance)
266 \param coordMap a map of int to Point3D, between atom IDs and their locations
267 their locations. If this container is provided, the
268 coordinates are used to set distance constraints on the
269 embedding. The resulting conformer(s) should have distances
270 between the specified atoms that reproduce those between the
271 points in \c coordMap. Because the embedding produces a
272 molecule in an arbitrary reference frame, an alignment step
273 is required to actually reproduce the provided coordinates.
274 \param optimizerForceTol set the tolerance on forces in the distgeom optimizer
275 (this shouldn't normally be altered in client code).
276 \param ignoreSmoothingFailures try to embed the molecule even if triangle
277 bounds smoothing fails
278 \param enforceChirality enforce the correct chirality if chiral centers are
279 present
280 \param useExpTorsionAnglePrefs impose experimental torsion-angle preferences
281 \param useBasicKnowledge impose "basic knowledge" terms such as flat
282 aromatic rings, ketones, etc.
283 \param verbose print output of experimental torsion-angle preferences
284 \param basinThresh set the basin threshold for the DGeom force field,
285 (this shouldn't normally be altered in client code).
286 \param onlyHeavyAtomsForRMS only use the heavy atoms when doing RMS filtering
287 \param ETversion version of torsion preferences to use
288 \param useSmallRingTorsions optional torsions to improve small ring
289 conformer sampling
290 \param useMacrocycleTorsions optional torsions to improve macrocycle
291 conformer sampling
292 \param useMacrocycle14config If 1-4 distances bound heuristics for
293 macrocycles is used
294
295 \return ID of the conformer added to the molecule, -1 if the emdedding failed
296*/
297inline int EmbedMolecule(
298 ROMol &mol, unsigned int maxIterations = 0, int seed = -1,
299 bool clearConfs = true, bool useRandomCoords = false,
300 double boxSizeMult = 2.0, bool randNegEig = true,
301 unsigned int numZeroFail = 1,
302 const std::map<int, RDGeom::Point3D> *coordMap = nullptr,
303 double optimizerForceTol = 1e-3, bool ignoreSmoothingFailures = false,
304 bool enforceChirality = true, bool useExpTorsionAnglePrefs = false,
305 bool useBasicKnowledge = false, bool verbose = false,
306 double basinThresh = 5.0, bool onlyHeavyAtomsForRMS = false,
307 unsigned int ETversion = 2, bool useSmallRingTorsions = false,
308 bool useMacrocycleTorsions = true, bool useMacrocycle14config = true) {
309 EmbedParameters params{.maxIterations = maxIterations,
310 .randomSeed = seed,
311 .clearConfs = clearConfs,
312 .useRandomCoords = useRandomCoords,
313 .boxSizeMult = boxSizeMult,
314 .randNegEig = randNegEig,
315 .numZeroFail = numZeroFail,
316 .coordMap = coordMap,
317 .optimizerForceTol = optimizerForceTol,
318 .ignoreSmoothingFailures = ignoreSmoothingFailures,
319 .enforceChirality = enforceChirality,
320 .useExpTorsionAnglePrefs = useExpTorsionAnglePrefs,
321 .useBasicKnowledge = useBasicKnowledge,
322 .verbose = verbose,
323 .basinThresh = basinThresh,
324 .onlyHeavyAtomsForRMS = onlyHeavyAtomsForRMS,
325 .ETversion = ETversion,
326 .useSmallRingTorsions = useSmallRingTorsions,
327 .useMacrocycleTorsions = useMacrocycleTorsions,
328 .useMacrocycle14config = useMacrocycle14config};
329
330 return EmbedMolecule(mol, params);
331};
332
333//*! Embed multiple conformations for a molecule
334/*!
335 This is kind of equivalent to calling EmbedMolecule multiple times - just that
336 the bounds
337 matrix is computed only once from the topology
338 **NOTE**: if the molecule has multiple fragments, they will be embedded
339 separately,
340 this means that they will likely occupy the same region of space.
341 \param mol Molecule of interest
342 \param res Used to return the resulting conformer ids
343 \param numConfs Number of conformations to be generated
344 \param numThreads Sets the number of threads to use (more than one thread
345 will only be used if the RDKit was built with
346 multithread
347 support). If set to zero, the max supported by the
348 system
349 will be used.
350 \param maxIterations Max. number of times the embedding will be tried if
351 coordinates are not obtained successfully. The default
352 value is 10x the number of atoms.
353 \param seed provides a seed for the random number generator (so that
354 the same coordinates can be obtained for a molecule on
355 multiple runs). If negative, the RNG will not be seeded.
356 \param clearConfs Clear all existing conformations on the molecule
357 \param useRandomCoords Start the embedding from random coordinates instead of
358 using eigenvalues of the distance matrix.
359 \param boxSizeMult Determines the size of the box that is used for
360 random coordinates. If this is a positive number, the
361 side length will equal the largest element of the
362 distance matrix times \c boxSizeMult. If this is a
363 negative number, the side length will equal
364 \c -boxSizeMult (i.e. independent of the elements of the
365 distance matrix).
366 \param randNegEig Picks coordinates at random when a embedding process
367 produces negative eigenvalues
368 \param numZeroFail Fail embedding if we find this many or more zero
369 eigenvalues (within a tolerance)
370 \param pruneRmsThresh Retain only the conformations out of 'numConfs' after
371 embedding that are at least this far apart from each
372 other. RMSD is computed on the heavy atoms.
373 Pruning is greedy; i.e. the first embedded conformation
374 is retained and from then on only those that are at
375 least
376 pruneRmsThresh away from already retained conformations
377 are kept. The pruning is done after embedding and
378 bounds violation minimization. No pruning by default.
379 \param coordMap a map of int to Point3D, between atom IDs and their locations
380 their locations. If this container is provided, the
381 coordinates are used to set distance constraints on the
382 embedding. The resulting conformer(s) should have distances
383 between the specified atoms that reproduce those between the
384 points in \c coordMap. Because the embedding produces a
385 molecule in an arbitrary reference frame, an alignment step
386 is required to actually reproduce the provided coordinates.
387 \param optimizerForceTol set the tolerance on forces in the DGeom optimizer
388 (this shouldn't normally be altered in client code).
389 \param ignoreSmoothingFailures try to embed the molecule even if triangle
390 bounds smoothing fails
391 \param enforceChirality enforce the correct chirality if chiral centers are
392 present
393 \param useExpTorsionAnglePrefs impose experimental torsion-angle preferences
394 \param useBasicKnowledge impose "basic knowledge" terms such as flat
395 aromatic rings, ketones, etc.
396 \param verbose print output of experimental torsion-angle preferences
397 \param basinThresh set the basin threshold for the DGeom force field,
398 (this shouldn't normally be altered in client code).
399 \param onlyHeavyAtomsForRMS only use the heavy atoms when doing RMS filtering
400 \param ETversion version of torsion preferences to use
401 \param useSmallRingTorsions optional torsions to improve small ring
402 conformer sampling
403 \param useMacrocycleTorsions optional torsions to improve macrocycle
404 conformer sampling
405 \param useMacrocycle14config If 1-4 distances bound heuristics for
406 macrocycles is used
407
408*/
410 ROMol &mol, INT_VECT &res, unsigned int numConfs = 10, int numThreads = 1,
411 unsigned int maxIterations = 30, int seed = -1, bool clearConfs = true,
412 bool useRandomCoords = false, double boxSizeMult = 2.0,
413 bool randNegEig = true, unsigned int numZeroFail = 1,
414 double pruneRmsThresh = -1.0,
415 const std::map<int, RDGeom::Point3D> *coordMap = nullptr,
416 double optimizerForceTol = 1e-3, bool ignoreSmoothingFailures = false,
417 bool enforceChirality = true, bool useExpTorsionAnglePrefs = false,
418 bool useBasicKnowledge = false, bool verbose = false,
419 double basinThresh = 5.0, bool onlyHeavyAtomsForRMS = false,
420 unsigned int ETversion = 2, bool useSmallRingTorsions = false,
421 bool useMacrocycleTorsions = true, bool useMacrocycle14config = true,
422 unsigned int timeout = 0) {
423 EmbedParameters params{.maxIterations = maxIterations,
424 .numThreads = numThreads,
425 .randomSeed = seed,
426 .clearConfs = clearConfs,
427 .useRandomCoords = useRandomCoords,
428 .boxSizeMult = boxSizeMult,
429 .randNegEig = randNegEig,
430 .numZeroFail = numZeroFail,
431 .coordMap = coordMap,
432 .optimizerForceTol = optimizerForceTol,
433 .ignoreSmoothingFailures = ignoreSmoothingFailures,
434 .enforceChirality = enforceChirality,
435 .useExpTorsionAnglePrefs = useExpTorsionAnglePrefs,
436 .useBasicKnowledge = useBasicKnowledge,
437 .verbose = verbose,
438 .basinThresh = basinThresh,
439 .pruneRmsThresh = pruneRmsThresh,
440 .onlyHeavyAtomsForRMS = onlyHeavyAtomsForRMS,
441 .ETversion = ETversion,
442 .useSmallRingTorsions = useSmallRingTorsions,
443 .useMacrocycleTorsions = useMacrocycleTorsions,
444 .useMacrocycle14config = useMacrocycle14config,
445 .timeout = timeout};
446 EmbedMultipleConfs(mol, res, numConfs, params);
447};
448//! \overload
450 ROMol &mol, unsigned int numConfs = 10, unsigned int maxIterations = 30,
451 int seed = -1, bool clearConfs = true, bool useRandomCoords = false,
452 double boxSizeMult = 2.0, bool randNegEig = true,
453 unsigned int numZeroFail = 1, double pruneRmsThresh = -1.0,
454 const std::map<int, RDGeom::Point3D> *coordMap = nullptr,
455 double optimizerForceTol = 1e-3, bool ignoreSmoothingFailures = false,
456 bool enforceChirality = true, bool useExpTorsionAnglePrefs = false,
457 bool useBasicKnowledge = false, bool verbose = false,
458 double basinThresh = 5.0, bool onlyHeavyAtomsForRMS = false,
459 unsigned int ETversion = 2, bool useSmallRingTorsions = false,
460 bool useMacrocycleTorsions = false, bool useMacrocycle14config = false,
461 unsigned int timeout = 0) {
462 EmbedParameters params{.maxIterations = maxIterations,
463 .numThreads = 1,
464 .randomSeed = seed,
465 .clearConfs = clearConfs,
466 .useRandomCoords = useRandomCoords,
467 .boxSizeMult = boxSizeMult,
468 .randNegEig = randNegEig,
469 .numZeroFail = numZeroFail,
470 .coordMap = coordMap,
471 .optimizerForceTol = optimizerForceTol,
472 .ignoreSmoothingFailures = ignoreSmoothingFailures,
473 .enforceChirality = enforceChirality,
474 .useExpTorsionAnglePrefs = useExpTorsionAnglePrefs,
475 .useBasicKnowledge = useBasicKnowledge,
476 .verbose = verbose,
477 .basinThresh = basinThresh,
478 .pruneRmsThresh = pruneRmsThresh,
479 .onlyHeavyAtomsForRMS = onlyHeavyAtomsForRMS,
480 .ETversion = ETversion,
481 .useSmallRingTorsions = useSmallRingTorsions,
482 .useMacrocycleTorsions = useMacrocycleTorsions,
483 .useMacrocycle14config = useMacrocycle14config,
484 .timeout = timeout};
485 INT_VECT res;
486 EmbedMultipleConfs(mol, res, numConfs, params);
487 return res;
488};
489
490// Overloads for serialization to JSON
491inline std::ostream &operator<<(std::ostream &os,
492 const InitialEmbeddingMode &mode) {
493 switch (mode) {
495 os << "DG_EMBEDDING";
496 return os;
498 os << "INTERNAL_COORDINATE_EMBEDDING";
499 return os;
501 os << "RANDOM_COORDINATE_EMBEDDING";
502 return os;
503 }
504 return os;
505}
506
507inline std::istream &operator>>(std::istream &is, InitialEmbeddingMode &mode) {
508 std::string val;
509 if (is >> val) {
510 if (val == "DG_EMBEDDING") {
512 } else if (val == "INTERNAL_COORDINATE_EMBEDDING") {
514 } else if (val == "RANDOM_COORDINATE_EMBEDDING") {
516 } else {
517 is.setstate(std::ios::failbit);
518 }
519 }
520 return is;
521}
522// Overload for JSON Serialization.
523inline std::ostream &operator<<(std::ostream &os, const EmbedFF &eff) {
524 switch (eff) {
525 case EmbedFF::MMFF:
526 os << "MMFF";
527 return os;
528 case EmbedFF::UFF:
529 [[fallthrough]];
530 default:
531 os << "UFF";
532 return os;
533 }
534 os << static_cast<int>(eff);
535 return os;
536}
537inline std::istream &operator>>(std::istream &is, EmbedFF &eff) {
538 eff = EmbedFF::UFF;
539
540 std::string val;
541 if (is >> val) {
542 if (val == "MMFF") {
543 eff = EmbedFF::MMFF;
544 } else if (val != "UFF") {
546 << "Provided embedForceField " << val
547 << " in JSON is not valid. Choose between UFF and MMFF. Falling back to UFF."
548 << std::endl;
549 }
550 }
551 return is;
552}
553
554//! Parameters corresponding to plain Distance Geometry
555RDKIT_DISTGEOMHELPERS_EXPORT extern const EmbedParameters DG;
556//! Parameters corresponding to Sereina Riniker's KDG approach
557RDKIT_DISTGEOMHELPERS_EXPORT extern const EmbedParameters KDG;
558//! Parameters corresponding to Sereina Riniker's ETDG approach
559RDKIT_DISTGEOMHELPERS_EXPORT extern const EmbedParameters ETDG;
560//! Parameters corresponding to Sereina Riniker's ETDG approach - version 2
561RDKIT_DISTGEOMHELPERS_EXPORT extern const EmbedParameters ETDGv2;
562//! Parameters corresponding to Sereina Riniker's ETKDG approach
563RDKIT_DISTGEOMHELPERS_EXPORT extern const EmbedParameters ETKDG;
564//! Parameters corresponding to Sereina Riniker's ETKDG approach - version 2
565RDKIT_DISTGEOMHELPERS_EXPORT extern const EmbedParameters ETKDGv2;
566//! Parameters corresponding improved ETKDG by Wang, Witek, Landrum and Riniker
567//! (10.1021/acs.jcim.0c00025) - the macrocycle part
568RDKIT_DISTGEOMHELPERS_EXPORT extern const EmbedParameters ETKDGv3;
569//! Parameters corresponding improved ETKDG by Wang, Witek, Landrum and Riniker
570//! (10.1021/acs.jcim.0c00025) - the small ring part
571RDKIT_DISTGEOMHELPERS_EXPORT extern const EmbedParameters srETKDGv3;
572
573RDKIT_DISTGEOMHELPERS_EXPORT extern const EmbedParameters ETKDGv4;
574} // namespace DGeomHelpers
575} // namespace RDKit
576
577#endif
#define BOOST_LOG(__arg__)
Definition RDLog.h:109
RDKIT_RDGENERAL_EXPORT RDLogger rdWarningLog
Defines the primary molecule class ROMol as well as associated typedefs.
Class to store the distance bound.
Class used to store a quartet of points and chiral volume bounds on them.
Definition ChiralSet.h:29
#define RDKIT_DISTGEOMHELPERS_EXPORT
Definition export.h:161
std::vector< boost::shared_ptr< ChiralSet > > VECT_CHIRALSET
Definition Embedder.h:27
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 const EmbedParameters DG
Parameters corresponding to plain Distance Geometry.
RDKIT_DISTGEOMHELPERS_EXPORT void updateEmbedParametersFromJSON(EmbedParameters &params, 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 &params)
Embed multiple conformations for a molecule.
RDKIT_DISTGEOMHELPERS_EXPORT std::string embedParametersToJSON(const EmbedParameters &params)
export parameters to JSON string
int EmbedMolecule(ROMol &mol, EmbedParameters &params)
Definition Embedder.h:214
RDKIT_DISTGEOMHELPERS_EXPORT const EmbedParameters srETKDGv3
RDKIT_DISTGEOMHELPERS_EXPORT const EmbedParameters KDG
Parameters corresponding to Sereina Riniker's KDG approach.
RDKIT_DISTGEOMHELPERS_EXPORT const EmbedParameters ETDGv2
Parameters corresponding to Sereina Riniker's ETDG approach - version 2.
RDKIT_DISTGEOMHELPERS_EXPORT const EmbedParameters ETKDGv4
std::ostream & operator<<(std::ostream &os, const InitialEmbeddingMode &mode)
Definition Embedder.h:491
std::istream & operator>>(std::istream &is, InitialEmbeddingMode &mode)
Definition Embedder.h:507
Std stuff.
std::vector< int > INT_VECT
Definition types.h:223
Parameter object for controlling embedding.
Definition Embedder.h:151
InitialEmbeddingMode initialEmbeddingMode
Definition Embedder.h:178
void(* callback)(unsigned int)
Definition Embedder.h:181
std::vector< unsigned int > failures
Definition Embedder.h:187
const std::map< int, RDGeom::Point3D > * coordMap
Definition Embedder.h:160
boost::shared_ptr< const DistGeom::BoundsMatrix > boundsMat
Definition Embedder.h:171
std::shared_ptr< std::map< std::pair< unsigned int, unsigned int >, double > > CPCI
Definition Embedder.h:179