RDKit
Open-source cheminformatics and machine learning.
O3AAlignMolecules.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // Copyright (C) 2013-2014 Paolo Tosco
4 //
5 // @@ All Rights Reserved @@
6 // This file is part of the RDKit.
7 // The contents are covered by the terms of the BSD license
8 // which is included in the file license.txt, found at the root
9 // of the RDKit source tree.
10 //
11 #include <RDGeneral/export.h>
12 #ifndef _RD_O3AALIGNMOLECULES_H_
13 #define _RD_O3AALIGNMOLECULES_H_
14 
15 #include <RDGeneral/Invariant.h>
16 #include <Geometry/Transform3D.h>
17 #include <Geometry/point.h>
18 #include <Numerics/Vector.h>
19 #include <GraphMol/ROMol.h>
20 #include <GraphMol/Conformer.h>
23 #include <vector>
24 #include <cmath>
25 #include <boost/shared_ptr.hpp>
26 #include <boost/multi_array.hpp>
27 #include <boost/dynamic_bitset.hpp>
28 
29 namespace RDKit {
30 namespace MolAlign {
34  void *prbProp;
35  void *refProp;
36  int coeff;
37  int weight;
38  bool useMMFFSim;
39 };
40 inline bool isDoubleZero(const double x) {
41  return ((x < 1.0e-10) && (x > -1.0e-10));
42 };
43 
44 class O3AConstraintVect;
45 
46 //! A class to define alignment constraints. Each constraint
47 //! is defined by a pair of atom indexes (one for the probe,
48 //! one for the reference) and a weight. Constraints can
49 //! can be added via the O3AConstraintVect class.
51  friend class O3AConstraintVect;
52 
53  public:
54  double getPrbIdx() { return d_prbIdx; }
55  double getRefIdx() { return d_refIdx; }
56  double getWeight() { return d_weight; }
57 
58  private:
59  unsigned int d_idx;
60  unsigned int d_prbIdx;
61  unsigned int d_refIdx;
62  double d_weight;
63 };
64 
65 //! A class to store a vector of alignment constraints. Each constraint
66 //! is defined by an O3AConstraint object. Each time the append()
67 //! method is invoked, the vector is sorted to make lookup faster.
68 //! Hence, constraints are not necessarily stored in the same order
69 //! they were appended.
71  public:
72  O3AConstraintVect() : d_count(0){};
74  void append(unsigned int prbIdx, unsigned int refIdx, double weight) {
75  O3AConstraint *o3aConstraint = new O3AConstraint();
76  o3aConstraint->d_idx = d_count;
77  o3aConstraint->d_prbIdx = prbIdx;
78  o3aConstraint->d_refIdx = refIdx;
79  o3aConstraint->d_weight = weight;
80  d_o3aConstraintVect.push_back(
81  boost::shared_ptr<O3AConstraint>(o3aConstraint));
82  std::sort(d_o3aConstraintVect.begin(), d_o3aConstraintVect.end(),
83  d_compareO3AConstraint);
84  ++d_count;
85  }
86  std::vector<boost::shared_ptr<O3AConstraint>>::size_type size() {
87  return d_o3aConstraintVect.size();
88  }
89  O3AConstraint *operator[](unsigned int i) {
90  return d_o3aConstraintVect[i].get();
91  }
92 
93  private:
94  unsigned int d_count;
95  std::vector<boost::shared_ptr<O3AConstraint>> d_o3aConstraintVect;
96  static bool d_compareO3AConstraint(boost::shared_ptr<O3AConstraint> a,
97  boost::shared_ptr<O3AConstraint> b) {
98  return (
99  (a->d_prbIdx != b->d_prbIdx)
100  ? (a->d_prbIdx < b->d_prbIdx)
101  : ((a->d_refIdx != b->d_refIdx)
102  ? (a->d_refIdx < b->d_refIdx)
103  : ((a->d_weight != b->d_weight) ? (a->d_weight > b->d_weight)
104  : (a->d_idx < b->d_idx))));
105  };
106 };
107 
108 const int O3_DUMMY_COST = 100000;
109 const int O3_LARGE_NEGATIVE_WEIGHT = -1e9;
111 const unsigned int O3_MAX_H_BINS = 20;
112 const unsigned int O3_MAX_SDM_ITERATIONS = 100;
113 const unsigned int O3_MAX_SDM_THRESHOLD_ITER = 3;
114 const double O3_RANDOM_TRANS_COEFF = 5.0;
115 const double O3_THRESHOLD_DIFF_DISTANCE = 0.1;
116 const double O3_SDM_THRESHOLD_START = 0.7;
117 const double O3_SDM_THRESHOLD_STEP = 0.3;
118 const double O3_CHARGE_WEIGHT = 10.0;
119 const double O3_CRIPPEN_WEIGHT = 10.0;
120 const double O3_RMSD_THRESHOLD = 1.0e-04;
121 const double O3_SCORE_THRESHOLD = 0.01;
122 const double O3_SCORING_FUNCTION_ALPHA = 5.0;
123 const double O3_SCORING_FUNCTION_BETA = 0.5;
124 const double O3_CHARGE_COEFF = 5.0;
125 const double O3_CRIPPEN_COEFF = 1.0;
126 const int O3_MAX_WEIGHT_COEFF = 5;
127 enum {
129  O3_ACCURACY_MASK = (1 << 0 | 1 << 1),
130  O3_LOCAL_ONLY = (1 << 2)
131 };
132 
134  public:
135  MolHistogram(const ROMol &mol, const double *dmat, bool cleanupDmat = false);
137  inline int get(const unsigned int y, const unsigned int x) const {
138  PRECONDITION(y < d_h.shape()[0], "Invalid index on MolHistogram");
139  PRECONDITION(x < d_h.shape()[1], "Invalid index on MolHistogram");
140  return d_h[y][x];
141  }
142 
143  private:
144  boost::multi_array<int, 2> d_h;
145 };
146 
148  public:
149  LAP(unsigned int dim)
150  : d_rowSol(dim),
151  d_colSol(dim),
152  d_free(dim),
153  d_colList(dim),
154  d_matches(dim),
155  d_d(dim),
156  d_v(dim),
157  d_pred(dim),
158  d_cost(boost::extents[dim][dim]){};
159  ~LAP(){};
160  int getCost(const unsigned int i, const unsigned int j) {
161  PRECONDITION(i < d_cost.shape()[0], "Invalid index on LAP.cost");
162  PRECONDITION(j < d_cost.shape()[1], "Invalid index on LAP.cost");
163  return d_cost[i][j];
164  }
165  int getRowSol(const unsigned int i) {
166  PRECONDITION(i < d_rowSol.size(), "Invalid index on LAP.rowSol");
167  return d_rowSol[i];
168  }
169  void computeMinCostPath(const int dim);
170  void computeCostMatrix(const ROMol &prbMol, const MolHistogram &prbHist,
171  const ROMol &refMol, const MolHistogram &refHist,
172  O3AConstraintVect *o3aConstraintVect,
173  int (*costFunc)(const unsigned int, const unsigned int,
174  double, void *),
175  void *data, const unsigned int n_bins = O3_MAX_H_BINS);
176 
177  private:
178  std::vector<int> d_rowSol;
179  std::vector<int> d_colSol;
180  std::vector<int> d_free;
181  std::vector<int> d_colList;
182  std::vector<int> d_matches;
183  std::vector<int> d_d;
184  std::vector<int> d_v;
185  std::vector<int> d_pred;
186  boost::multi_array<int, 2> d_cost;
187 };
188 
190  public:
191  // constructor
192  SDM(const Conformer *prbConf = NULL, const Conformer *refConf = NULL,
193  O3AConstraintVect *o3aConstraintVect = NULL)
194  : d_prbConf(prbConf),
195  d_refConf(refConf),
196  d_o3aConstraintVect(o3aConstraintVect){};
197  // copy constructor
198  SDM(const SDM &other)
199  : d_prbConf(other.d_prbConf),
200  d_refConf(other.d_refConf),
201  d_o3aConstraintVect(other.d_o3aConstraintVect),
202  d_SDMPtrVect(other.d_SDMPtrVect.size()) {
203  for (unsigned int i = 0; i < d_SDMPtrVect.size(); ++i) {
204  d_SDMPtrVect[i] = boost::shared_ptr<SDMElement>(new SDMElement());
205  memcpy(d_SDMPtrVect[i].get(), other.d_SDMPtrVect[i].get(),
206  sizeof(SDMElement));
207  }
208  };
209  // assignment operator
210  SDM &operator=(const SDM &other) {
211  d_prbConf = other.d_prbConf;
212  d_refConf = other.d_refConf;
213  d_o3aConstraintVect = other.d_o3aConstraintVect;
214  d_SDMPtrVect.resize(other.d_SDMPtrVect.size());
215  for (unsigned int i = 0; i < d_SDMPtrVect.size(); ++i) {
216  d_SDMPtrVect[i] = boost::shared_ptr<SDMElement>(new SDMElement());
217  memcpy(d_SDMPtrVect[i].get(), other.d_SDMPtrVect[i].get(),
218  sizeof(SDMElement));
219  }
220 
221  return *this;
222  };
223  // destructor
224  ~SDM(){};
225  void fillFromDist(double threshold,
226  const boost::dynamic_bitset<> &refHvyAtoms,
227  const boost::dynamic_bitset<> &prbHvyAtoms);
228  void fillFromLAP(LAP &lap);
229  double scoreAlignment(double (*scoringFunc)(const unsigned int,
230  const unsigned int, void *),
231  void *data);
232  void prepareMatchWeightsVect(RDKit::MatchVectType &matchVect,
233  RDNumeric::DoubleVector &weights,
234  double (*weightFunc)(const unsigned int,
235  const unsigned int, void *),
236  void *data);
237  unsigned int size() { return d_SDMPtrVect.size(); }
238 
239  private:
240  typedef struct SDMElement {
241  unsigned int idx[2];
242  int score;
243  int cost;
244  double sqDist;
245  O3AConstraint *o3aConstraint;
246  } SDMElement;
247  const Conformer *d_prbConf;
248  const Conformer *d_refConf;
249  O3AConstraintVect *d_o3aConstraintVect;
250  std::vector<boost::shared_ptr<SDMElement>> d_SDMPtrVect;
251  static bool compareSDMScore(boost::shared_ptr<SDMElement> a,
252  boost::shared_ptr<SDMElement> b) {
253  return ((a->score != b->score)
254  ? (a->score < b->score)
255  : ((a->cost != b->cost)
256  ? (a->cost < b->cost)
257  : ((a->idx[0] != b->idx[0]) ? (a->idx[0] < b->idx[0])
258  : (a->idx[1] < b->idx[1]))));
259  };
260  static bool compareSDMDist(boost::shared_ptr<SDMElement> a,
261  boost::shared_ptr<SDMElement> b) {
262  double aWeight = (a->o3aConstraint ? a->o3aConstraint->getWeight() : 0.0);
263  double bWeight = (b->o3aConstraint ? b->o3aConstraint->getWeight() : 0.0);
264  return ((aWeight != bWeight)
265  ? (aWeight > bWeight)
266  : ((a->sqDist != b->sqDist)
267  ? (a->sqDist < b->sqDist)
268  : ((a->idx[0] != b->idx[0]) ? (a->idx[0] < b->idx[0])
269  : (a->idx[1] < b->idx[1]))));
270  };
271 };
272 
274  public:
275  //! pre-defined atom typing schemes
276  typedef enum { MMFF94 = 0, CRIPPEN } AtomTypeScheme;
277  O3A(ROMol &prbMol, const ROMol &refMol, void *prbProp, void *refProp,
278  AtomTypeScheme atomTypes = MMFF94, const int prbCid = -1,
279  const int refCid = -1, const bool reflect = false,
280  const unsigned int maxIters = 50, unsigned int options = 0,
281  const MatchVectType *constraintMap = NULL,
282  const RDNumeric::DoubleVector *constraintWeights = NULL,
283  LAP *extLAP = NULL, MolHistogram *extPrbHist = NULL,
284  MolHistogram *extRefHist = NULL);
285  O3A(int (*costFunc)(const unsigned int, const unsigned int, double, void *),
286  double (*weightFunc)(const unsigned int, const unsigned int, void *),
287  double (*scoringFunc)(const unsigned int, const unsigned int, void *),
288  void *data, ROMol &prbMol, const ROMol &refMol, const int prbCid,
289  const int refCid, boost::dynamic_bitset<> *prbHvyAtoms = NULL,
290  boost::dynamic_bitset<> *refHvyAtoms = NULL, const bool reflect = false,
291  const unsigned int maxIters = 50, unsigned int options = 0,
292  O3AConstraintVect *o3aConstraintVect = NULL, ROMol *extWorkPrbMol = NULL,
293  LAP *extLAP = NULL, MolHistogram *extPrbHist = NULL,
294  MolHistogram *extRefHist = NULL);
295  ~O3A() {
296  if (d_o3aMatchVect) {
297  delete d_o3aMatchVect;
298  }
299  if (d_o3aWeights) {
300  delete d_o3aWeights;
301  }
302  };
303  double align();
304  double trans(RDGeom::Transform3D &trans);
305  double score() { return d_o3aScore; };
306  const RDKit::MatchVectType *matches() { return d_o3aMatchVect; };
307  const RDNumeric::DoubleVector *weights() { return d_o3aWeights; };
308 
309  private:
310  ROMol *d_prbMol;
311  const ROMol *d_refMol;
312  int d_prbCid;
313  int d_refCid;
314  bool d_reflect;
315  unsigned int d_maxIters;
316  const RDKit::MatchVectType *d_o3aMatchVect;
317  const RDNumeric::DoubleVector *d_o3aWeights;
318  double d_o3aScore;
319 };
320 
321 RDKIT_MOLALIGN_EXPORT void randomTransform(ROMol &mol, const int cid = -1,
322  const int seed = -1);
324  const Conformer &conf);
325 RDKIT_MOLALIGN_EXPORT int o3aMMFFCostFunc(const unsigned int prbIdx,
326  const unsigned int refIdx,
327  double hSum, void *data);
328 RDKIT_MOLALIGN_EXPORT double o3aMMFFWeightFunc(const unsigned int prbIdx,
329  const unsigned int refIdx,
330  void *data);
331 RDKIT_MOLALIGN_EXPORT double o3aMMFFScoringFunc(const unsigned int prbIdx,
332  const unsigned int refIdx,
333  void *data);
334 RDKIT_MOLALIGN_EXPORT int o3aCrippenCostFunc(const unsigned int prbIdx,
335  const unsigned int refIdx,
336  double hSum, void *data);
337 RDKIT_MOLALIGN_EXPORT double o3aCrippenWeightFunc(const unsigned int prbIdx,
338  const unsigned int refIdx,
339  void *data);
340 RDKIT_MOLALIGN_EXPORT double o3aCrippenScoringFunc(const unsigned int prbIdx,
341  const unsigned int refIdx,
342  void *data);
343 
345  ROMol &prbMol, const ROMol &refMol, void *prbProp, void *refProp,
346  std::vector<boost::shared_ptr<O3A>> &res, int numThreads = 1,
347  O3A::AtomTypeScheme atomTypes = O3A::MMFF94, const int refCid = -1,
348  const bool reflect = false, const unsigned int maxIters = 50,
349  unsigned int options = 0, const MatchVectType *constraintMap = NULL,
350  const RDNumeric::DoubleVector *constraintWeights = NULL);
351 } // namespace MolAlign
352 } // namespace RDKit
353 #endif
RDKit::MolAlign::O3AConstraint::getRefIdx
double getRefIdx()
Definition: O3AAlignMolecules.h:55
RDKit::MolAlign::LAP::getRowSol
int getRowSol(const unsigned int i)
Definition: O3AAlignMolecules.h:165
RDKit::MolAlign::O3A::weights
const RDNumeric::DoubleVector * weights()
Definition: O3AAlignMolecules.h:307
RDKit::MolAlign::O3A::score
double score()
Definition: O3AAlignMolecules.h:305
RDKit::MolAlign::O3AConstraint::getWeight
double getWeight()
Definition: O3AAlignMolecules.h:56
point.h
RDKit::MolAlign::O3AFuncData::coeff
int coeff
Definition: O3AAlignMolecules.h:36
RDKit::MolAlign::MolHistogram::get
int get(const unsigned int y, const unsigned int x) const
Definition: O3AAlignMolecules.h:137
Vector.h
ROMol.h
Defines the primary molecule class ROMol as well as associated typedefs.
RDKit::MolAlign::O3_LOCAL_ONLY
@ O3_LOCAL_ONLY
Definition: O3AAlignMolecules.h:130
RDKIT_MOLALIGN_EXPORT
#define RDKIT_MOLALIGN_EXPORT
Definition: export.h:359
RDKit::MolAlign::SDM::~SDM
~SDM()
Definition: O3AAlignMolecules.h:224
RDKit::MolAlign::MolHistogram
Definition: O3AAlignMolecules.h:133
RDKit::MolAlign::O3_RMSD_THRESHOLD
const double O3_RMSD_THRESHOLD
Definition: O3AAlignMolecules.h:120
RDKit::MolAlign::O3AConstraintVect::~O3AConstraintVect
~O3AConstraintVect()
Definition: O3AAlignMolecules.h:73
RDKit::MolAlign::O3A::AtomTypeScheme
AtomTypeScheme
pre-defined atom typing schemes
Definition: O3AAlignMolecules.h:276
RDKit::MolAlign::SDM::size
unsigned int size()
Definition: O3AAlignMolecules.h:237
RDKit::MolAlign::O3AConstraintVect
Definition: O3AAlignMolecules.h:70
RDKit::MolAlign::O3_CHARGE_COEFF
const double O3_CHARGE_COEFF
Definition: O3AAlignMolecules.h:124
RDKit::MolAlign::SDM::SDM
SDM(const SDM &other)
Definition: O3AAlignMolecules.h:198
RDKit::MolAlign::O3_THRESHOLD_DIFF_DISTANCE
const double O3_THRESHOLD_DIFF_DISTANCE
Definition: O3AAlignMolecules.h:115
RDKit::MolAlign::O3A::matches
const RDKit::MatchVectType * matches()
Definition: O3AAlignMolecules.h:306
boost
Definition: RDLog.h:21
AlignMolecules.h
RDKit::MolAlign::O3AFuncData::useMMFFSim
bool useMMFFSim
Definition: O3AAlignMolecules.h:38
RDKit::MolAlign::O3AFuncData::refConf
const Conformer * refConf
Definition: O3AAlignMolecules.h:33
RDKit::MolAlign::o3aCrippenCostFunc
RDKIT_MOLALIGN_EXPORT int o3aCrippenCostFunc(const unsigned int prbIdx, const unsigned int refIdx, double hSum, void *data)
RDKit::MolAlign::O3AConstraint::getPrbIdx
double getPrbIdx()
Definition: O3AAlignMolecules.h:54
RDKit::MolAlign::O3_CRIPPEN_COEFF
const double O3_CRIPPEN_COEFF
Definition: O3AAlignMolecules.h:125
RDKit::MolAlign::reflect
const RDKIT_MOLALIGN_EXPORT RDGeom::POINT3D_VECT * reflect(const Conformer &conf)
RDKit::MolAlign::o3aCrippenWeightFunc
RDKIT_MOLALIGN_EXPORT double o3aCrippenWeightFunc(const unsigned int prbIdx, const unsigned int refIdx, void *data)
RDKit::MolAlign::LAP::getCost
int getCost(const unsigned int i, const unsigned int j)
Definition: O3AAlignMolecules.h:160
RDKit::MolAlign::SDM::SDM
SDM(const Conformer *prbConf=NULL, const Conformer *refConf=NULL, O3AConstraintVect *o3aConstraintVect=NULL)
Definition: O3AAlignMolecules.h:192
RDNumeric::Vector
A class to represent vectors of numbers.
Definition: Vector.h:29
RDKit::MolAlign::O3_DUMMY_COST
const int O3_DUMMY_COST
Definition: O3AAlignMolecules.h:108
RDKit::MolAlign::o3aCrippenScoringFunc
RDKIT_MOLALIGN_EXPORT double o3aCrippenScoringFunc(const unsigned int prbIdx, const unsigned int refIdx, void *data)
RDKit::ROMol
Definition: ROMol.h:171
AtomTyper.h
RDKit::MolAlign::O3_MAX_SDM_ITERATIONS
const unsigned int O3_MAX_SDM_ITERATIONS
Definition: O3AAlignMolecules.h:112
RDKit::MolAlign::O3AConstraintVect::size
std::vector< boost::shared_ptr< O3AConstraint > >::size_type size()
Definition: O3AAlignMolecules.h:86
RDKit::MolAlign::O3AConstraintVect::operator[]
O3AConstraint * operator[](unsigned int i)
Definition: O3AAlignMolecules.h:89
RDKit::MolAlign::O3AFuncData::prbProp
void * prbProp
Definition: O3AAlignMolecules.h:34
RDGeom::POINT3D_VECT
std::vector< Point3D > POINT3D_VECT
Definition: point.h:514
RDKit::MolAlign::O3AConstraintVect::append
void append(unsigned int prbIdx, unsigned int refIdx, double weight)
Definition: O3AAlignMolecules.h:74
RDKit::MolAlign::O3_CHARGE_WEIGHT
const double O3_CHARGE_WEIGHT
Definition: O3AAlignMolecules.h:118
RDKit::MolAlign::SDM::operator=
SDM & operator=(const SDM &other)
Definition: O3AAlignMolecules.h:210
RDKit::MolAlign::O3A::~O3A
~O3A()
Definition: O3AAlignMolecules.h:295
RDKit::MolAlign::O3_MAX_SDM_THRESHOLD_ITER
const unsigned int O3_MAX_SDM_THRESHOLD_ITER
Definition: O3AAlignMolecules.h:113
RDKit::MolAlign::O3A
Definition: O3AAlignMolecules.h:273
RDKit::MolAlign::O3AConstraint
Definition: O3AAlignMolecules.h:50
RDKit::Conformer
The class for representing 2D or 3D conformation of a molecule.
Definition: Conformer.h:43
Invariant.h
RDKit::MolAlign::O3_MAX_WEIGHT_COEFF
const int O3_MAX_WEIGHT_COEFF
Definition: O3AAlignMolecules.h:126
RDKit::MolAlign::O3_SDM_THRESHOLD_START
const double O3_SDM_THRESHOLD_START
Definition: O3AAlignMolecules.h:116
RDKit::MolAlign::O3_SCORING_FUNCTION_ALPHA
const double O3_SCORING_FUNCTION_ALPHA
Definition: O3AAlignMolecules.h:122
RDKit::MolAlign::O3AFuncData
Definition: O3AAlignMolecules.h:31
RDKit::MolAlign::O3AFuncData::prbConf
const Conformer * prbConf
Definition: O3AAlignMolecules.h:32
RDKit::MolAlign::MolHistogram::~MolHistogram
~MolHistogram()
Definition: O3AAlignMolecules.h:136
RDKit::MolAlign::O3_ACCURACY_MASK
@ O3_ACCURACY_MASK
Definition: O3AAlignMolecules.h:129
RDKit::MolAlign::O3A::MMFF94
@ MMFF94
Definition: O3AAlignMolecules.h:276
RDKit::MolAlign::O3_LARGE_NEGATIVE_WEIGHT
const int O3_LARGE_NEGATIVE_WEIGHT
Definition: O3AAlignMolecules.h:109
RDKit::MolAlign::O3AConstraintVect::O3AConstraintVect
O3AConstraintVect()
Definition: O3AAlignMolecules.h:72
Transform3D.h
RDKit
Std stuff.
Definition: Atom.h:30
RDKit::MolAlign::o3aMMFFWeightFunc
RDKIT_MOLALIGN_EXPORT double o3aMMFFWeightFunc(const unsigned int prbIdx, const unsigned int refIdx, void *data)
RDKit::MolAlign::O3_USE_MMFF_WEIGHTS
@ O3_USE_MMFF_WEIGHTS
Definition: O3AAlignMolecules.h:128
RDKit::MolAlign::O3AFuncData::refProp
void * refProp
Definition: O3AAlignMolecules.h:35
RDGeom::Transform3D
Definition: Transform3D.h:22
RDKit::MolAlign::getO3AForProbeConfs
RDKIT_MOLALIGN_EXPORT void getO3AForProbeConfs(ROMol &prbMol, const ROMol &refMol, void *prbProp, void *refProp, std::vector< boost::shared_ptr< O3A >> &res, int numThreads=1, O3A::AtomTypeScheme atomTypes=O3A::MMFF94, const int refCid=-1, const bool reflect=false, const unsigned int maxIters=50, unsigned int options=0, const MatchVectType *constraintMap=NULL, const RDNumeric::DoubleVector *constraintWeights=NULL)
RDKit::MolAlign::LAP::~LAP
~LAP()
Definition: O3AAlignMolecules.h:159
RDKit::MolAlign::randomTransform
RDKIT_MOLALIGN_EXPORT void randomTransform(ROMol &mol, const int cid=-1, const int seed=-1)
RDKit::MolAlign::LAP
Definition: O3AAlignMolecules.h:147
RDKit::MolAlign::o3aMMFFScoringFunc
RDKIT_MOLALIGN_EXPORT double o3aMMFFScoringFunc(const unsigned int prbIdx, const unsigned int refIdx, void *data)
RDKit::MolAlign::O3_RANDOM_TRANS_COEFF
const double O3_RANDOM_TRANS_COEFF
Definition: O3AAlignMolecules.h:114
RDKit::MolAlign::O3_SCORE_THRESHOLD
const double O3_SCORE_THRESHOLD
Definition: O3AAlignMolecules.h:121
PRECONDITION
#define PRECONDITION(expr, mess)
Definition: Invariant.h:109
RDKit::MolAlign::LAP::LAP
LAP(unsigned int dim)
Definition: O3AAlignMolecules.h:149
RDKit::MolAlign::O3_SCORING_FUNCTION_BETA
const double O3_SCORING_FUNCTION_BETA
Definition: O3AAlignMolecules.h:123
RDKit::MolAlign::O3_DEFAULT_CONSTRAINT_WEIGHT
const int O3_DEFAULT_CONSTRAINT_WEIGHT
Definition: O3AAlignMolecules.h:110
Conformer.h
RDKit::MolAlign::O3AFuncData::weight
int weight
Definition: O3AAlignMolecules.h:37
RDKit::MolAlign::O3_CRIPPEN_WEIGHT
const double O3_CRIPPEN_WEIGHT
Definition: O3AAlignMolecules.h:119
RDKit::MolAlign::O3_SDM_THRESHOLD_STEP
const double O3_SDM_THRESHOLD_STEP
Definition: O3AAlignMolecules.h:117
RDKit::MolAlign::SDM
Definition: O3AAlignMolecules.h:189
RDKit::MolAlign::O3_MAX_H_BINS
const unsigned int O3_MAX_H_BINS
Definition: O3AAlignMolecules.h:111
RDKit::MolAlign::o3aMMFFCostFunc
RDKIT_MOLALIGN_EXPORT int o3aMMFFCostFunc(const unsigned int prbIdx, const unsigned int refIdx, double hSum, void *data)
RDKit::MatchVectType
std::vector< std::pair< int, int > > MatchVectType
used to return matches from substructure searching, The format is (queryAtomIdx, molAtomIdx)
Definition: FragFPGenerator.h:24
RDKit::MolAlign::isDoubleZero
bool isDoubleZero(const double x)
Definition: O3AAlignMolecules.h:40
export.h