RDKit
Open-source cheminformatics and machine learning.
MMFF/Params.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2013 Paolo Tosco
3 //
4 // Copyright (C) 2004-2006 Rational Discovery LLC
5 //
6 // @@ All Rights Reserved @@
7 // This file is part of the RDKit.
8 // The contents are covered by the terms of the BSD license
9 // which is included in the file license.txt, found at the root
10 // of the RDKit source tree.
11 //
12 #include <RDGeneral/export.h>
13 #ifndef __RD_MMFFPARAMS_H__
14 #define __RD_MMFFPARAMS_H__
15 
16 #include <memory>
17 #include <RDGeneral/Invariant.h>
18 #include <cmath>
19 #include <string>
20 #include <vector>
21 #include <algorithm>
22 #include <map>
23 #include <iostream>
24 #include <cstdint>
25 
26 #ifndef M_PI
27 #define M_PI 3.14159265358979323846
28 #endif
29 
30 // binary searches are slightly faster than std::map;
31 // however when I moved to binary searches I had already
32 // written the code for std::map, so the two methods
33 // can be toggled defining RDKIT_MMFF_PARAMS_USE_STD_MAP
34 
35 //#define RDKIT_MMFF_PARAMS_USE_STD_MAP 1
36 
37 namespace ForceFields {
38 namespace MMFF {
39 
40 const double DEG2RAD = M_PI / 180.0;
41 const double RAD2DEG = 180.0 / M_PI;
42 const double MDYNE_A_TO_KCAL_MOL = 143.9325;
43 inline bool isDoubleZero(const double x) {
44  return ((x < 1.0e-10) && (x > -1.0e-10));
45 }
46 inline void clipToOne(double &x) {
47  if (x > 1.0) {
48  x = 1.0;
49  } else if (x < -1.0) {
50  x = -1.0;
51  }
52 }
53 
54 //! class to store MMFF atom type equivalence levels
56  public:
57  std::uint8_t eqLevel[4];
58 };
59 
60 //! class to store MMFF Properties
62  public:
63  std::uint8_t atno;
64  std::uint8_t crd;
65  std::uint8_t val;
66  std::uint8_t pilp;
67  std::uint8_t mltb;
68  std::uint8_t arom;
69  std::uint8_t linh;
70  std::uint8_t sbmb;
71 };
72 
73 //! class to store MMFF Partial Bond Charge Increments
75  public:
76  double pbci;
77  double fcadj;
78 };
79 
80 //! class to store MMFF bond-charge-increment parameters used to
81 //! construct MMFF partial atomic charges
83  public:
84  double bci;
85 };
86 
87 //! class to store MMFF parameters for bond stretching
89  public:
90  double kb;
91  double r0;
92 };
93 
94 //! class to store parameters for Herschbach-Laurie's version
95 //! of Badger's rule
97  public:
98  double a_ij;
99  double d_ij;
100  double dp_ij;
101 };
102 
103 //! class to store covalent radius and Pauling electronegativity
104 //! values for MMFF bond stretching empirical rule
106  public:
107  double r0;
108  double chi;
109 };
110 
111 //! class to store MMFF parameters for angle bending
113  public:
114  double ka;
115  double theta0;
116 };
117 
118 //! class to store MMFF parameters for stretch-bending
120  public:
121  double kbaIJK;
122  double kbaKJI;
123 };
124 
125 //! class to store MMFF parameters for out-of-plane bending
127  public:
128  double koop;
129 };
130 
131 //! class to store MMFF parameters for torsions
133  public:
134  double V1;
135  double V2;
136  double V3;
137 };
138 
139 //! class to store MMFF parameters for non-bonded Van der Waals
141  public:
142  double alpha_i;
143  double N_i;
144  double A_i;
145  double G_i;
146  double R_star;
147  std::uint8_t DA;
148 };
149 
151  public:
154  double R_ij_star;
155  double epsilon;
156 };
157 
159  public:
160  //! Looks up the parameters for a particular key and returns them.
161  /*!
162  \return a pointer to the MMFFArom object, NULL on failure.
163  */
164  bool isMMFFAromatic(const unsigned int atomType) const {
165  return ((std::find(d_params.begin(), d_params.end(), atomType) !=
166  d_params.end())
167  ? true
168  : false);
169  }
170 
171  MMFFAromCollection(const std::uint8_t mmffArom[]=nullptr);
172  std::vector<std::uint8_t> d_params; //!< the aromatic type vector
173 };
174 
176  public:
177  //! Looks up the parameters for a particular key and returns them.
178  /*!
179  \return a pointer to the MMFFDef object, NULL on failure.
180  */
181  const MMFFDef *operator()(const unsigned int atomType) const {
182 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
183  std::map<const unsigned int, MMFFDef>::const_iterator res;
184  res = d_params.find(atomType);
185 
186  return ((res != d_params.end()) ? &((*res).second) : NULL);
187 #else
188  return ((atomType && (atomType <= d_params.size()))
189  ? &d_params[atomType - 1]
190  : NULL);
191 #endif
192  }
193 
194  MMFFDefCollection(std::string mmffDef="");
195 
196 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
197  std::map<const unsigned int, MMFFDef> d_params; //!< the parameter map
198 #else
199  std::vector<MMFFDef> d_params; //!< the parameter vector
200 #endif
201 };
202 
204  public:
205  //! Looks up the parameters for a particular key and returns them.
206  /*!
207  \return a pointer to the MMFFProp object, NULL on failure.
208  */
209  const MMFFProp *operator()(const unsigned int atomType) const {
210 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
211  std::map<const unsigned int, MMFFProp>::const_iterator res;
212  res = d_params.find(atomType);
213 
214  return ((res != d_params.end()) ? &((*res).second) : NULL);
215 #else
216  std::pair<std::vector<std::uint8_t>::const_iterator,
217  std::vector<std::uint8_t>::const_iterator>
218  bounds =
219  std::equal_range(d_iAtomType.begin(), d_iAtomType.end(), atomType);
220 
221  return ((bounds.first != bounds.second)
222  ? &d_params[bounds.first - d_iAtomType.begin()]
223  : NULL);
224 #endif
225  }
226 
227  MMFFPropCollection(std::string mmffProp="");
228 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
229  std::map<const unsigned int, MMFFProp> d_params; //!< the parameter map
230 #else
231  std::vector<MMFFProp> d_params;
232  std::vector<std::uint8_t> d_iAtomType; //!< the parameter vector
233 #endif
234 };
235 
237  public:
238  //! Looks up the parameters for a particular key and returns them.
239  /*!
240  \return a pointer to the MMFFPBCI object, NULL on failure.
241  */
242  const MMFFPBCI *operator()(const unsigned int atomType) const {
243 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
244  std::map<const unsigned int, MMFFPBCI>::const_iterator res;
245  res = d_params.find(atomType);
246 
247  return ((res != d_params.end()) ? &((*res).second) : NULL);
248 #else
249  return ((atomType && (atomType <= d_params.size()))
250  ? &d_params[atomType - 1]
251  : NULL);
252 #endif
253  }
254 
255  MMFFPBCICollection(std::string mmffPBCI="");
256 
257 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
258  std::map<const unsigned int, MMFFPBCI> d_params; //!< the parameter map
259 #else
260  std::vector<MMFFPBCI> d_params; //!< the parameter vector
261 #endif
262 };
263 
265  public:
266  //! Looks up the parameters for a particular key and returns them.
267  /*!
268  \return a pointer to the MMFFChg object, NULL on failure.
269  */
270  const std::pair<int, const MMFFChg *> getMMFFChgParams(
271  const unsigned int bondType, const unsigned int iAtomType,
272  const unsigned int jAtomType) const {
273  int sign = -1;
274  const MMFFChg *mmffChgParams = NULL;
275  unsigned int canIAtomType = iAtomType;
276  unsigned int canJAtomType = jAtomType;
277  if (iAtomType > jAtomType) {
278  canIAtomType = jAtomType;
279  canJAtomType = iAtomType;
280  sign = 1;
281  }
282 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
283  std::map<const unsigned int,
284  std::map<const unsigned int, MMFFChg>>::const_iterator res1;
285  std::map<const unsigned int, MMFFChg>::const_iterator res2;
286  res1 = d_params[bondType].find(canIAtomType);
287  if (res1 != d_params[bondType].end()) {
288  res2 = ((*res1).second).find(canJAtomType);
289  if (res2 != ((*res1).second).end()) {
290  mmffChgParams = &((*res2).second);
291  }
292  }
293 #else
294  std::pair<std::vector<std::uint8_t>::const_iterator,
295  std::vector<std::uint8_t>::const_iterator>
296  bounds;
297 
298  bounds =
299  std::equal_range(d_iAtomType.begin(), d_iAtomType.end(), canIAtomType);
300  if (bounds.first != bounds.second) {
301  bounds = std::equal_range(
302  d_jAtomType.begin() + (bounds.first - d_iAtomType.begin()),
303  d_jAtomType.begin() + (bounds.second - d_iAtomType.begin()),
304  canJAtomType);
305  if (bounds.first != bounds.second) {
306  bounds = std::equal_range(
307  d_bondType.begin() + (bounds.first - d_jAtomType.begin()),
308  d_bondType.begin() + (bounds.second - d_jAtomType.begin()),
309  bondType);
310  if (bounds.first != bounds.second) {
311  mmffChgParams = &d_params[bounds.first - d_bondType.begin()];
312  }
313  }
314  }
315 #endif
316 
317  return std::make_pair(sign, mmffChgParams);
318  }
319 
320  MMFFChgCollection(std::string mmffChg="");
321 
322 //!< the parameter 3D-map
323 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
324  std::map<const unsigned int,
325  std::map<const unsigned int, std::map<const unsigned int, MMFFChg>>>
326  d_params; //!< the parameter 3D-map
327 #else
328  std::vector<MMFFChg> d_params; //! the parameter vector
329  std::vector<std::uint8_t> d_iAtomType; //! atom type vector for atom i
330  std::vector<std::uint8_t> d_jAtomType; //! atom type vector for atom j
331  std::vector<std::uint8_t> d_bondType; //! bond type vector for bond i-j
332 #endif
333 };
334 
336  public:
337  //! Looks up the parameters for a particular key and returns them.
338  /*!
339  \return a pointer to the MMFFBond object, NULL on failure.
340  */
341  const MMFFBond *operator()(const unsigned int bondType,
342  const unsigned int atomType,
343  const unsigned int nbrAtomType) const {
344  const MMFFBond *mmffBondParams = NULL;
345  unsigned int canAtomType = atomType;
346  unsigned int canNbrAtomType = nbrAtomType;
347  if (atomType > nbrAtomType) {
348  canAtomType = nbrAtomType;
349  canNbrAtomType = atomType;
350  }
351 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
352  std::map<const unsigned int,
353  std::map<const unsigned int,
354  std::map<const unsigned int, MMFFBond>>>::const_iterator
355  res1;
356  std::map<const unsigned int,
357  std::map<const unsigned int, MMFFBond>>::const_iterator res2;
358  std::map<const unsigned int, MMFFBond>::const_iterator res3;
359  res1 = d_params.find(bondType);
360  if (res1 != d_params.end()) {
361  res2 = ((*res1).second).find(canAtomType);
362  if (res2 != ((*res1).second).end()) {
363  res3 = ((*res2).second).find(canNbrAtomType);
364  if (res3 != ((*res2).second).end()) {
365  mmffBondParams = &((*res3).second);
366  }
367  }
368  }
369 #else
370  std::pair<std::vector<std::uint8_t>::const_iterator,
371  std::vector<std::uint8_t>::const_iterator>
372  bounds;
373  bounds =
374  std::equal_range(d_iAtomType.begin(), d_iAtomType.end(), canAtomType);
375  if (bounds.first != bounds.second) {
376  bounds = std::equal_range(
377  d_jAtomType.begin() + (bounds.first - d_iAtomType.begin()),
378  d_jAtomType.begin() + (bounds.second - d_iAtomType.begin()),
379  canNbrAtomType);
380  if (bounds.first != bounds.second) {
381  bounds = std::equal_range(
382  d_bondType.begin() + (bounds.first - d_jAtomType.begin()),
383  d_bondType.begin() + (bounds.second - d_jAtomType.begin()),
384  bondType);
385  if (bounds.first != bounds.second) {
386  mmffBondParams = &d_params[bounds.first - d_bondType.begin()];
387  }
388  }
389  }
390 #endif
391 
392  return mmffBondParams;
393  }
394 
395  MMFFBondCollection(std::string mmffBond="");
396 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
397  std::map<const unsigned int,
398  std::map<const unsigned int, std::map<const unsigned int, MMFFBond>>>
399  d_params; //!< the parameter 3D-map
400 #else
401  std::vector<MMFFBond> d_params; //!< the parameter vector
402  std::vector<std::uint8_t> d_iAtomType; //! atom type vector for atom i
403  std::vector<std::uint8_t> d_jAtomType; //! atom type vector for atom j
404  std::vector<std::uint8_t> d_bondType; //! bond type vector for bond i-j
405 #endif
406 };
407 
409  public:
410  //! Looks up the parameters for a particular key and returns them.
411  /*!
412  \return a pointer to the MMFFBndk object, NULL on failure.
413  */
414  const MMFFBond *operator()(const int atomicNum, const int nbrAtomicNum) const {
415  const MMFFBond *mmffBndkParams = NULL;
416  unsigned int canAtomicNum = atomicNum;
417  unsigned int canNbrAtomicNum = nbrAtomicNum;
418  if (atomicNum > nbrAtomicNum) {
419  canAtomicNum = nbrAtomicNum;
420  canNbrAtomicNum = atomicNum;
421  }
422 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
423  std::map<const unsigned int,
424  std::map<const unsigned int, MMFFBond>>::const_iterator res1;
425  std::map<const unsigned int, MMFFBond>::const_iterator res2;
426  res1 = d_params.find(canAtomicNum);
427  if (res1 != d_params.end()) {
428  res2 = ((*res1).second).find(canNbrAtomicNum);
429  if (res2 != ((*res1).second).end()) {
430  mmffBndkParams = &((*res2).second);
431  }
432  }
433 #else
434  std::pair<std::vector<std::uint8_t>::const_iterator,
435  std::vector<std::uint8_t>::const_iterator>
436  bounds;
437  bounds = std::equal_range(d_iAtomicNum.begin(), d_iAtomicNum.end(),
438  canAtomicNum);
439  if (bounds.first != bounds.second) {
440  bounds = std::equal_range(
441  d_jAtomicNum.begin() + (bounds.first - d_iAtomicNum.begin()),
442  d_jAtomicNum.begin() + (bounds.second - d_iAtomicNum.begin()),
443  canNbrAtomicNum);
444  if (bounds.first != bounds.second) {
445  mmffBndkParams = &d_params[bounds.first - d_jAtomicNum.begin()];
446  }
447  }
448 #endif
449 
450  return mmffBndkParams;
451  }
452 
453  MMFFBndkCollection(std::string mmffBndk="");
454 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
455  std::map<const unsigned int, std::map<const unsigned int, MMFFBond>>
456  d_params; //!< the parameter 2D-map
457 #else
458  std::vector<MMFFBond> d_params; //!< the parameter vector
459  std::vector<std::uint8_t> d_iAtomicNum; //! atomic number vector for atom i
460  std::vector<std::uint8_t> d_jAtomicNum; //! atomic number vector for atom j
461 #endif
462 };
463 
465  public:
466  //! Looks up the parameters for a particular key and returns them.
467  /*!
468  \return a pointer to the MMFFHerschbachLaurie object, NULL on failure.
469  */
470  const MMFFHerschbachLaurie *operator()(const int iRow, const int jRow) const {
471  const MMFFHerschbachLaurie *mmffHerschbachLaurieParams = NULL;
472  unsigned int canIRow = iRow;
473  unsigned int canJRow = jRow;
474  if (iRow > jRow) {
475  canIRow = jRow;
476  canJRow = iRow;
477  }
478 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
479  std::map<const unsigned int,
480  std::map<const unsigned int, MMFFHerschbachLaurie>>::const_iterator
481  res1;
482  std::map<const unsigned int, MMFFHerschbachLaurie>::const_iterator res2;
483  res1 = d_params.find(canIRow);
484  if (res1 != d_params.end()) {
485  res2 = ((*res1).second).find(canJRow);
486  if (res2 != ((*res1).second).end()) {
487  mmffHerschbachLaurieParams = &((*res2).second);
488  }
489  }
490 #else
491  std::pair<std::vector<std::uint8_t>::const_iterator,
492  std::vector<std::uint8_t>::const_iterator>
493  bounds;
494  bounds = std::equal_range(d_iRow.begin(), d_iRow.end(), canIRow);
495  if (bounds.first != bounds.second) {
496  bounds = std::equal_range(
497  d_jRow.begin() + (bounds.first - d_iRow.begin()),
498  d_jRow.begin() + (bounds.second - d_iRow.begin()), canJRow);
499  if (bounds.first != bounds.second) {
500  mmffHerschbachLaurieParams = &d_params[bounds.first - d_jRow.begin()];
501  }
502  }
503 #endif
504 
505  return mmffHerschbachLaurieParams;
506  }
507 
508  MMFFHerschbachLaurieCollection(std::string mmffHerschbachLaurie="");
509 
510 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
511  std::map<const unsigned int,
512  std::map<const unsigned int, MMFFHerschbachLaurie>>
513  d_params; //!< the parameter 2D-map
514 #else
515  std::vector<MMFFHerschbachLaurie> d_params; //!< the parameter vector
516  std::vector<std::uint8_t> d_iRow; //! periodic row number vector for atom i
517  std::vector<std::uint8_t> d_jRow; //! periodic row number vector for atom j
518 #endif
519 };
520 
522  public:
523  //! Looks up the parameters for a particular key and returns them.
524  /*!
525  \return a pointer to the MMFFCovRadPauEle object, NULL on failure.
526  */
527  const MMFFCovRadPauEle *operator()(const unsigned int atomicNum) const {
528 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
529  std::map<const unsigned int, MMFFCovRadPauEle>::const_iterator res;
530  res = d_params.find(atomicNum);
531 
532  return ((res != d_params.end()) ? &((*res).second) : NULL);
533 #else
534  std::pair<std::vector<std::uint8_t>::const_iterator,
535  std::vector<std::uint8_t>::const_iterator>
536  bounds =
537  std::equal_range(d_atomicNum.begin(), d_atomicNum.end(), atomicNum);
538 
539  return ((bounds.first != bounds.second)
540  ? &d_params[bounds.first - d_atomicNum.begin()]
541  : NULL);
542 #endif
543  }
544 
545  MMFFCovRadPauEleCollection(std::string mmffCovRadPauEle="");
546 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
547  std::map<const unsigned int, MMFFCovRadPauEle>
548  d_params; //!< the parameter map
549 #else
550  std::vector<MMFFCovRadPauEle> d_params; //!< the parameter vector
551  std::vector<std::uint8_t> d_atomicNum; //!< the atomic number vector
552 #endif
553 };
554 
556  public:
557  //! Looks up the parameters for a particular key and returns them.
558  /*!
559  \return a pointer to the MMFFAngle object, NULL on failure.
560  */
561  const MMFFAngle *operator()(const MMFFDefCollection *mmffDef,
562  const unsigned int angleType,
563  const unsigned int iAtomType,
564  const unsigned int jAtomType,
565  const unsigned int kAtomType) const {
566  const MMFFAngle *mmffAngleParams = NULL;
567  unsigned int iter = 0;
568 
569 // For bending of the i-j-k angle, a five-stage process based
570 // in the level combinations 1-1-1,2-2-2,3-2-3,4-2-4, and
571 // 5-2-5 is used. (MMFF.I, note 68, page 519)
572 // We skip 1-1-1 since Level 2 === Level 1
573 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
574  std::map<const unsigned int,
575  std::map<const unsigned int,
576  std::map<const unsigned int,
577  std::map<const unsigned int, MMFFAngle>>>>::
578  const_iterator res1;
579  std::map<const unsigned int,
580  std::map<const unsigned int,
581  std::map<const unsigned int, MMFFAngle>>>::const_iterator
582  res2;
583  std::map<const unsigned int,
584  std::map<const unsigned int, MMFFAngle>>::const_iterator res3;
585  std::map<const unsigned int, MMFFAngle>::const_iterator res4;
586  while ((iter < 4) && (!mmffAngleParams)) {
587  unsigned int canIAtomType = (*mmffDef)(iAtomType)->eqLevel[iter];
588  unsigned int canKAtomType = (*mmffDef)(kAtomType)->eqLevel[iter];
589  if (canIAtomType > canKAtomType) {
590  unsigned int temp = canKAtomType;
591  canKAtomType = canIAtomType;
592  canIAtomType = temp;
593  }
594  res1 = d_params.find(angleType);
595  if (res1 != d_params.end()) {
596  res2 = ((*res1).second).find(canIAtomType);
597  if (res2 != ((*res1).second).end()) {
598  res3 = ((*res2).second).find(jAtomType);
599  if (res3 != ((*res2).second).end()) {
600  res4 = ((*res3).second).find(canKAtomType);
601  if (res4 != ((*res3).second).end()) {
602  mmffAngleParams = &((*res4).second);
603  }
604  }
605  }
606  }
607  ++iter;
608  }
609 #else
610  std::pair<std::vector<std::uint8_t>::const_iterator,
611  std::vector<std::uint8_t>::const_iterator>
612  jBounds =
613  std::equal_range(d_jAtomType.begin(), d_jAtomType.end(), jAtomType);
614  std::pair<std::vector<std::uint8_t>::const_iterator,
615  std::vector<std::uint8_t>::const_iterator>
616  bounds;
617  if (jBounds.first != jBounds.second) {
618  while ((iter < 4) && (!mmffAngleParams)) {
619  unsigned int canIAtomType = (*mmffDef)(iAtomType)->eqLevel[iter];
620  unsigned int canKAtomType = (*mmffDef)(kAtomType)->eqLevel[iter];
621  if (canIAtomType > canKAtomType) {
622  unsigned int temp = canKAtomType;
623  canKAtomType = canIAtomType;
624  canIAtomType = temp;
625  }
626  bounds = std::equal_range(
627  d_iAtomType.begin() + (jBounds.first - d_jAtomType.begin()),
628  d_iAtomType.begin() + (jBounds.second - d_jAtomType.begin()),
629  canIAtomType);
630  if (bounds.first != bounds.second) {
631  bounds = std::equal_range(
632  d_kAtomType.begin() + (bounds.first - d_iAtomType.begin()),
633  d_kAtomType.begin() + (bounds.second - d_iAtomType.begin()),
634  canKAtomType);
635  if (bounds.first != bounds.second) {
636  bounds = std::equal_range(
637  d_angleType.begin() + (bounds.first - d_kAtomType.begin()),
638  d_angleType.begin() + (bounds.second - d_kAtomType.begin()),
639  angleType);
640  if (bounds.first != bounds.second) {
641  mmffAngleParams = &d_params[bounds.first - d_angleType.begin()];
642  }
643  }
644  }
645  ++iter;
646  }
647  }
648 #endif
649 
650  return mmffAngleParams;
651  }
652 
653  MMFFAngleCollection(std::string mmffAngle="");
654 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
655  std::map<const unsigned int,
656  std::map<const unsigned int,
657  std::map<const unsigned int,
658  std::map<const unsigned int, MMFFAngle>>>>
659  d_params; //!< the parameter 4D-map
660 #else
661  std::vector<MMFFAngle> d_params; //!< the parameter vector
662  std::vector<std::uint8_t> d_iAtomType; //! atom type vector for atom i
663  std::vector<std::uint8_t> d_jAtomType; //! atom type vector for atom j
664  std::vector<std::uint8_t> d_kAtomType; //! atom type vector for atom k
665  std::vector<std::uint8_t> d_angleType; //! angle type vector for angle i-j-k
666 #endif
667 };
668 
670  public:
671  //! Looks up the parameters for a particular key and returns them.
672  /*!
673  \return a pointer to the MMFFStbn object, NULL on failure.
674  */
675  const std::pair<bool, const MMFFStbn *> getMMFFStbnParams(
676  const unsigned int stretchBendType, const unsigned int bondType1,
677  const unsigned int bondType2, const unsigned int iAtomType,
678  const unsigned int jAtomType, const unsigned int kAtomType) const {
679  const MMFFStbn *mmffStbnParams = NULL;
680  bool swap = false;
681  unsigned int canIAtomType = iAtomType;
682  unsigned int canKAtomType = kAtomType;
683  unsigned int canStretchBendType = stretchBendType;
684  if (iAtomType > kAtomType) {
685  canIAtomType = kAtomType;
686  canKAtomType = iAtomType;
687  swap = true;
688  } else if (iAtomType == kAtomType) {
689  swap = (bondType1 < bondType2);
690  }
691 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
692  std::map<const unsigned int,
693  std::map<const unsigned int,
694  std::map<const unsigned int,
695  std::map<const unsigned int, MMFFStbn>>>>::
696  const_iterator res1;
697  std::map<const unsigned int,
698  std::map<const unsigned int,
699  std::map<const unsigned int, MMFFStbn>>>::const_iterator
700  res2;
701  std::map<const unsigned int,
702  std::map<const unsigned int, MMFFStbn>>::const_iterator res3;
703  std::map<const unsigned int, MMFFStbn>::const_iterator res4;
704  res1 = d_params.find(canStretchBendType);
705  if (res1 != d_params.end()) {
706  res2 = ((*res1).second).find(canIAtomType);
707  if (res2 != ((*res1).second).end()) {
708  res3 = ((*res2).second).find(jAtomType);
709  if (res3 != ((*res2).second).end()) {
710  res4 = ((*res3).second).find(canKAtomType);
711  if (res4 != ((*res3).second).end()) {
712  mmffStbnParams = &((*res4).second);
713  }
714  }
715  }
716  }
717 #else
718  std::pair<std::vector<std::uint8_t>::const_iterator,
719  std::vector<std::uint8_t>::const_iterator>
720  jBounds =
721  std::equal_range(d_jAtomType.begin(), d_jAtomType.end(), jAtomType);
722  std::pair<std::vector<std::uint8_t>::const_iterator,
723  std::vector<std::uint8_t>::const_iterator>
724  bounds;
725  if (jBounds.first != jBounds.second) {
726  bounds = std::equal_range(
727  d_iAtomType.begin() + (jBounds.first - d_jAtomType.begin()),
728  d_iAtomType.begin() + (jBounds.second - d_jAtomType.begin()),
729  canIAtomType);
730  if (bounds.first != bounds.second) {
731  bounds = std::equal_range(
732  d_kAtomType.begin() + (bounds.first - d_iAtomType.begin()),
733  d_kAtomType.begin() + (bounds.second - d_iAtomType.begin()),
734  canKAtomType);
735  if (bounds.first != bounds.second) {
736  bounds = std::equal_range(
737  d_stretchBendType.begin() + (bounds.first - d_kAtomType.begin()),
738  d_stretchBendType.begin() + (bounds.second - d_kAtomType.begin()),
739  canStretchBendType);
740  if (bounds.first != bounds.second) {
741  mmffStbnParams =
742  &d_params[bounds.first - d_stretchBendType.begin()];
743  }
744  }
745  }
746  }
747 #endif
748 
749  return std::make_pair(swap, mmffStbnParams);
750  }
751 
752  MMFFStbnCollection(std::string mmffStbn="");
753 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
754  std::map<const unsigned int,
755  std::map<const unsigned int,
756  std::map<const unsigned int,
757  std::map<const unsigned int, MMFFStbn>>>>
758  d_params; //!< the parameter 4D-map
759 #else
760  std::vector<MMFFStbn> d_params; //!< the parameter vector
761  std::vector<std::uint8_t> d_iAtomType; //! atom type vector for atom i
762  std::vector<std::uint8_t> d_jAtomType; //! atom type vector for atom j
763  std::vector<std::uint8_t> d_kAtomType; //! atom type vector for atom k
764  std::vector<std::uint8_t>
765  d_stretchBendType; //! stretch-bend type vector for angle i-j-k
766 #endif
767 };
768 
770  public:
771  //! Looks up the parameters for a particular key and returns them.
772  /*!
773  \return a pointer to the MMFFStbn object, NULL on failure.
774  */
775  const std::pair<bool, const MMFFStbn *> getMMFFDfsbParams(
776  const unsigned int periodicTableRow1,
777  const unsigned int periodicTableRow2,
778  const unsigned int periodicTableRow3) const {
779  std::map<const unsigned int,
780  std::map<const unsigned int,
781  std::map<const unsigned int, MMFFStbn>>>::const_iterator
782  res1;
783  std::map<const unsigned int,
784  std::map<const unsigned int, MMFFStbn>>::const_iterator res2;
785  std::map<const unsigned int, MMFFStbn>::const_iterator res3;
786  const MMFFStbn *mmffDfsbParams = NULL;
787  bool swap = false;
788  unsigned int canPeriodicTableRow1 = periodicTableRow1;
789  unsigned int canPeriodicTableRow3 = periodicTableRow3;
790  if (periodicTableRow1 > periodicTableRow3) {
791  canPeriodicTableRow1 = periodicTableRow3;
792  canPeriodicTableRow3 = periodicTableRow1;
793  swap = true;
794  }
795  res1 = d_params.find(canPeriodicTableRow1);
796  if (res1 != d_params.end()) {
797  res2 = ((*res1).second).find(periodicTableRow2);
798  if (res2 != ((*res1).second).end()) {
799  res3 = ((*res2).second).find(canPeriodicTableRow3);
800  if (res3 != ((*res2).second).end()) {
801  mmffDfsbParams = &((*res3).second);
802  }
803  }
804  }
805 
806  return std::make_pair(swap, mmffDfsbParams);
807  }
808 
809  MMFFDfsbCollection(std::string mmffDfsb="");
810  std::map<const unsigned int,
811  std::map<const unsigned int, std::map<const unsigned int, MMFFStbn>>>
812  d_params; //!< the parameter 3D-map
813 };
814 
816  public:
817  //! Looks up the parameters for a particular key and returns them.
818  /*!
819  \return a pointer to the MMFFOop object, NULL on failure.
820  */
821  const MMFFOop *operator()(const MMFFDefCollection *mmffDef,
822  const unsigned int iAtomType,
823  const unsigned int jAtomType,
824  const unsigned int kAtomType,
825  const unsigned int lAtomType) const {
826  const MMFFOop *mmffOopParams = NULL;
827  unsigned int iter = 0;
828  std::vector<unsigned int> canIKLAtomType(3);
829 // For out-of-plane bending ijk; I , where j is the central
830 // atom [cf. eq. (511, the five-stage protocol 1-1-1; 1, 2-2-2; 2,
831 // 3-2-3;3, 4-2-4;4, 5-2-5;5 is used. The final stage provides
832 // wild-card defaults for all except the central atom.
833 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
834  std::map<const unsigned int,
835  std::map<const unsigned int,
836  std::map<const unsigned int,
837  std::map<const unsigned int, MMFFOop>>>>::
838  const_iterator res1;
839  std::map<const unsigned int,
840  std::map<const unsigned int,
841  std::map<const unsigned int, MMFFOop>>>::const_iterator
842  res2;
843  std::map<const unsigned int,
844  std::map<const unsigned int, MMFFOop>>::const_iterator res3;
845  std::map<const unsigned int, MMFFOop>::const_iterator res4;
846  while ((iter < 4) && (!mmffOopParams)) {
847  canIKLAtomType[0] = (*mmffDef)(iAtomType)->eqLevel[iter];
848  unsigned int canJAtomType = jAtomType;
849  canIKLAtomType[1] = (*mmffDef)(kAtomType)->eqLevel[iter];
850  canIKLAtomType[2] = (*mmffDef)(lAtomType)->eqLevel[iter];
851  std::sort(canIKLAtomType.begin(), canIKLAtomType.end());
852  res1 = d_params.find(canIKLAtomType[0]);
853  if (res1 != d_params.end()) {
854  res2 = ((*res1).second).find(canJAtomType);
855  if (res2 != ((*res1).second).end()) {
856  res3 = ((*res2).second).find(canIKLAtomType[1]);
857  if (res3 != ((*res2).second).end()) {
858  res4 = ((*res3).second).find(canIKLAtomType[2]);
859  if (res4 != ((*res3).second).end()) {
860  mmffOopParams = &((*res4).second);
861  }
862  }
863  }
864  }
865  ++iter;
866  }
867 #else
868  std::pair<std::vector<std::uint8_t>::const_iterator,
869  std::vector<std::uint8_t>::const_iterator>
870  jBounds =
871  std::equal_range(d_jAtomType.begin(), d_jAtomType.end(), jAtomType);
872  std::pair<std::vector<std::uint8_t>::const_iterator,
873  std::vector<std::uint8_t>::const_iterator>
874  bounds;
875  if (jBounds.first != jBounds.second) {
876  while ((iter < 4) && (!mmffOopParams)) {
877  canIKLAtomType[0] = (*mmffDef)(iAtomType)->eqLevel[iter];
878  canIKLAtomType[1] = (*mmffDef)(kAtomType)->eqLevel[iter];
879  canIKLAtomType[2] = (*mmffDef)(lAtomType)->eqLevel[iter];
880  std::sort(canIKLAtomType.begin(), canIKLAtomType.end());
881  bounds = std::equal_range(
882  d_iAtomType.begin() + (jBounds.first - d_jAtomType.begin()),
883  d_iAtomType.begin() + (jBounds.second - d_jAtomType.begin()),
884  canIKLAtomType[0]);
885  if (bounds.first != bounds.second) {
886  bounds = std::equal_range(
887  d_kAtomType.begin() + (bounds.first - d_iAtomType.begin()),
888  d_kAtomType.begin() + (bounds.second - d_iAtomType.begin()),
889  canIKLAtomType[1]);
890  if (bounds.first != bounds.second) {
891  bounds = std::equal_range(
892  d_lAtomType.begin() + (bounds.first - d_kAtomType.begin()),
893  d_lAtomType.begin() + (bounds.second - d_kAtomType.begin()),
894  canIKLAtomType[2]);
895  if (bounds.first != bounds.second) {
896  mmffOopParams = &d_params[bounds.first - d_lAtomType.begin()];
897  }
898  }
899  }
900  ++iter;
901  }
902  }
903 #endif
904 
905  return mmffOopParams;
906  }
907 
908  MMFFOopCollection(const bool isMMFFs, std::string mmffOop="");
909 
910 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
911  std::map<const unsigned int,
912  std::map<const unsigned int,
913  std::map<const unsigned int,
914  std::map<const unsigned int, MMFFOop>>>>
915  d_params; //!< the parameter 4D-map
916 #else
917  std::vector<MMFFOop> d_params; //!< the parameter vector
918  std::vector<std::uint8_t> d_iAtomType; //! atom type vector for atom i
919  std::vector<std::uint8_t> d_jAtomType; //! atom type vector for atom j
920  std::vector<std::uint8_t> d_kAtomType; //! atom type vector for atom k
921  std::vector<std::uint8_t> d_lAtomType; //! atom type vector for atom l
922 #endif
923 };
924 
926  public:
927  //! Looks up the parameters for a particular key and returns them.
928  /*!
929  \return a pointer to the MMFFTor object, NULL on failure.
930  */
931  const std::pair<const unsigned int, const MMFFTor *> getMMFFTorParams(
932  const MMFFDefCollection *mmffDef,
933  const std::pair<unsigned int, unsigned int> torType,
934  const unsigned int iAtomType, const unsigned int jAtomType,
935  const unsigned int kAtomType, const unsigned int lAtomType) const {
936  const MMFFTor *mmffTorParams = NULL;
937  unsigned int iter = 0;
938  unsigned int iWildCard = 0;
939  unsigned int lWildCard = 0;
940  unsigned int canTorType = torType.first;
941  unsigned int maxIter = 5;
942 // For i-j-k-2 torsion interactions, a five-stage
943 // process based on level combinations 1-1-1-1, 2-2-2-2,
944 // 3-2-2-5, 5-2-2-3, and 5-2-2-5 is used, where stages 3
945 // and 4 correspond to "half-default" or "half-wild-card" entries.
946 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
947  std::map<
948  const unsigned int,
949  std::map<const unsigned int,
950  std::map<const unsigned int,
951  std::map<const unsigned int,
952  std::map<const unsigned int, MMFFTor>>>>>::
953  const_iterator res1;
954  std::map<const unsigned int,
955  std::map<const unsigned int,
956  std::map<const unsigned int,
957  std::map<const unsigned int, MMFFTor>>>>::
958  const_iterator res2;
959  std::map<const unsigned int,
960  std::map<const unsigned int,
961  std::map<const unsigned int, MMFFTor>>>::const_iterator
962  res3;
963  std::map<const unsigned int,
964  std::map<const unsigned int, MMFFTor>>::const_iterator res4;
965  std::map<const unsigned int, MMFFTor>::const_iterator res5;
966 #else
967  std::pair<std::vector<std::uint8_t>::const_iterator,
968  std::vector<std::uint8_t>::const_iterator>
969  jBounds;
970  std::pair<std::vector<std::uint8_t>::const_iterator,
971  std::vector<std::uint8_t>::const_iterator>
972  bounds;
973 #endif
974 
975  while (((iter < maxIter) && ((!mmffTorParams) || (maxIter == 4))) ||
976  ((iter == 4) && (torType.first == 5) && torType.second)) {
977  // The rule of setting the torsion type to the value it had
978  // before being set to 5 as a last resort in case parameters
979  // could not be found is not mentioned in MMFF.IV; it was
980  // empirically discovered due to a number of tests in the
981  // MMFF validation suite otherwise failing
982  if ((maxIter == 5) && (iter == 4)) {
983  maxIter = 4;
984  iter = 0;
985  canTorType = torType.second;
986  }
987  iWildCard = iter;
988  lWildCard = iter;
989  if (iter == 1) {
990  iWildCard = 1;
991  lWildCard = 3;
992  } else if (iter == 2) {
993  iWildCard = 3;
994  lWildCard = 1;
995  }
996  unsigned int canIAtomType = (*mmffDef)(iAtomType)->eqLevel[iWildCard];
997  unsigned int canJAtomType = jAtomType;
998  unsigned int canKAtomType = kAtomType;
999  unsigned int canLAtomType = (*mmffDef)(lAtomType)->eqLevel[lWildCard];
1000  if (canJAtomType > canKAtomType) {
1001  unsigned int temp = canKAtomType;
1002  canKAtomType = canJAtomType;
1003  canJAtomType = temp;
1004  temp = canLAtomType;
1005  canLAtomType = canIAtomType;
1006  canIAtomType = temp;
1007  } else if ((canJAtomType == canKAtomType) &&
1008  (canIAtomType > canLAtomType)) {
1009  unsigned int temp = canLAtomType;
1010  canLAtomType = canIAtomType;
1011  canIAtomType = temp;
1012  }
1013 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
1014  res1 = d_params.find(canTorType);
1015  if (res1 != d_params.end()) {
1016  res2 = ((*res1).second).find(canIAtomType);
1017  if (res2 != ((*res1).second).end()) {
1018  res3 = ((*res2).second).find(canJAtomType);
1019  if (res3 != ((*res2).second).end()) {
1020  res4 = ((*res3).second).find(canKAtomType);
1021  if (res4 != ((*res3).second).end()) {
1022  res5 = ((*res4).second).find(canLAtomType);
1023  if (res5 != ((*res4).second).end()) {
1024  mmffTorParams = &((*res5).second);
1025  if (maxIter == 4) {
1026  break;
1027  }
1028  }
1029  }
1030  }
1031  }
1032  }
1033 #else
1034  jBounds = std::equal_range(d_jAtomType.begin(), d_jAtomType.end(),
1035  canJAtomType);
1036  if (jBounds.first != jBounds.second) {
1037  bounds = std::equal_range(
1038  d_kAtomType.begin() + (jBounds.first - d_jAtomType.begin()),
1039  d_kAtomType.begin() + (jBounds.second - d_jAtomType.begin()),
1040  canKAtomType);
1041  if (bounds.first != bounds.second) {
1042  bounds = std::equal_range(
1043  d_iAtomType.begin() + (bounds.first - d_kAtomType.begin()),
1044  d_iAtomType.begin() + (bounds.second - d_kAtomType.begin()),
1045  canIAtomType);
1046  if (bounds.first != bounds.second) {
1047  bounds = std::equal_range(
1048  d_lAtomType.begin() + (bounds.first - d_iAtomType.begin()),
1049  d_lAtomType.begin() + (bounds.second - d_iAtomType.begin()),
1050  canLAtomType);
1051  if (bounds.first != bounds.second) {
1052  bounds = std::equal_range(
1053  d_torType.begin() + (bounds.first - d_lAtomType.begin()),
1054  d_torType.begin() + (bounds.second - d_lAtomType.begin()),
1055  canTorType);
1056  if (bounds.first != bounds.second) {
1057  mmffTorParams = &d_params[bounds.first - d_torType.begin()];
1058  if (maxIter == 4) {
1059  break;
1060  }
1061  }
1062  }
1063  }
1064  }
1065  }
1066 #endif
1067  ++iter;
1068  }
1069 
1070  return std::make_pair(canTorType, mmffTorParams);
1071  }
1072 
1073  MMFFTorCollection(const bool isMMFFs, std::string mmffTor="");
1074 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
1075  std::map<
1076  const unsigned int,
1077  std::map<
1078  const unsigned int,
1079  std::map<const unsigned int,
1080  std::map<const unsigned int, std::map<const unsigned int,
1081  MMFFTor>>>>>
1082  d_params; //!< the parameter 5D-map
1083 #else
1084  std::vector<MMFFTor> d_params; //!< the parameter vector
1085  std::vector<std::uint8_t> d_iAtomType; //! atom type vector for atom i
1086  std::vector<std::uint8_t> d_jAtomType; //! atom type vector for atom j
1087  std::vector<std::uint8_t> d_kAtomType; //! atom type vector for atom k
1088  std::vector<std::uint8_t> d_lAtomType; //! atom type vector for atom l
1089  std::vector<std::uint8_t>
1090  d_torType; //! torsion type vector for angle i-j-k-l
1091 #endif
1092 };
1093 
1095  public:
1096  //! gets a pointer to the singleton MMFFVdWCollection
1097  double power;
1098  double B;
1099  double Beta;
1100  double DARAD;
1101  double DAEPS;
1102  //! Looks up the parameters for a particular key and returns them.
1103  /*!
1104  \return a pointer to the MMFFVdW object, NULL on failure.
1105  */
1106  const MMFFVdW *operator()(const unsigned int atomType) const {
1107 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
1108  std::map<const unsigned int, MMFFVdW>::const_iterator res;
1109  res = d_params.find(atomType);
1110 
1111  return (res != d_params.end() ? &((*res).second) : NULL);
1112 #else
1113  std::pair<std::vector<std::uint8_t>::const_iterator,
1114  std::vector<std::uint8_t>::const_iterator>
1115  bounds =
1116  std::equal_range(d_atomType.begin(), d_atomType.end(), atomType);
1117 
1118  return ((bounds.first != bounds.second)
1119  ? &d_params[bounds.first - d_atomType.begin()]
1120  : NULL);
1121 #endif
1122  }
1123 
1124  MMFFVdWCollection(std::string mmffVdW="");
1125 #ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
1126  std::map<const unsigned int, MMFFVdW> d_params; //!< the parameter map
1127 #else
1128  std::vector<MMFFVdW> d_params; //!< the parameter vector
1129  std::vector<std::uint8_t> d_atomType; //! atom type vector
1130 #endif
1131 };
1132 } // namespace MMFF
1133 } // namespace ForceFields
1134 
1135 #endif
ForceFields::MMFF::MMFFStbnCollection::d_params
std::vector< MMFFStbn > d_params
the parameter vector
Definition: MMFF/Params.h:760
ForceFields::MMFF::MMFFTorCollection::d_lAtomType
std::vector< std::uint8_t > d_lAtomType
atom type vector for atom k
Definition: MMFF/Params.h:1088
ForceFields::MMFF::MMFFHerschbachLaurie::dp_ij
double dp_ij
Definition: MMFF/Params.h:100
ForceFields::MMFF::MMFFOopCollection
Definition: MMFF/Params.h:815
ForceFields::MMFF::MMFFCovRadPauEleCollection
Definition: MMFF/Params.h:521
ForceFields::MMFF::MMFFAngleCollection::operator()
const MMFFAngle * operator()(const MMFFDefCollection *mmffDef, const unsigned int angleType, const unsigned int iAtomType, const unsigned int jAtomType, const unsigned int kAtomType) const
Looks up the parameters for a particular key and returns them.
Definition: MMFF/Params.h:561
ForceFields::MMFF::MMFFAngleCollection
Definition: MMFF/Params.h:555
ForceFields::MMFF::MMFFVdWCollection::d_params
std::vector< MMFFVdW > d_params
the parameter vector
Definition: MMFF/Params.h:1128
ForceFields::MMFF::MMFFVdWCollection::d_atomType
std::vector< std::uint8_t > d_atomType
Definition: MMFF/Params.h:1129
ForceFields::MMFF::MMFFVdW::G_i
double G_i
Definition: MMFF/Params.h:145
ForceFields::MMFF::MMFFHerschbachLaurie
Definition: MMFF/Params.h:96
ForceFields::MMFF::MMFFProp::pilp
std::uint8_t pilp
Definition: MMFF/Params.h:66
ForceFields::MMFF::MMFFBondCollection::d_bondType
std::vector< std::uint8_t > d_bondType
atom type vector for atom j
Definition: MMFF/Params.h:404
ForceFields::MMFF::MMFFBond
class to store MMFF parameters for bond stretching
Definition: MMFF/Params.h:88
ForceFields::MMFF::MMFFPBCI::fcadj
double fcadj
Definition: MMFF/Params.h:77
ForceFields::MMFF::MMFFHerschbachLaurieCollection
Definition: MMFF/Params.h:464
ForceFields::MMFF::MMFFAngleCollection::d_angleType
std::vector< std::uint8_t > d_angleType
atom type vector for atom k
Definition: MMFF/Params.h:665
ForceFields::MMFF::MMFFOop
class to store MMFF parameters for out-of-plane bending
Definition: MMFF/Params.h:126
ForceFields::MMFF::MMFFVdWRijstarEps::epsilonUnscaled
double epsilonUnscaled
Definition: MMFF/Params.h:153
ForceFields::MMFF::MMFFBndkCollection::d_params
std::vector< MMFFBond > d_params
the parameter vector
Definition: MMFF/Params.h:458
ForceFields::MMFF::MMFFOopCollection::operator()
const MMFFOop * operator()(const MMFFDefCollection *mmffDef, const unsigned int iAtomType, const unsigned int jAtomType, const unsigned int kAtomType, const unsigned int lAtomType) const
Looks up the parameters for a particular key and returns them.
Definition: MMFF/Params.h:821
ForceFields::MMFF::MMFFVdWCollection::operator()
const MMFFVdW * operator()(const unsigned int atomType) const
Looks up the parameters for a particular key and returns them.
Definition: MMFF/Params.h:1106
ForceFields::MMFF::MMFFAngleCollection::d_kAtomType
std::vector< std::uint8_t > d_kAtomType
atom type vector for atom j
Definition: MMFF/Params.h:664
ForceFields::MMFF::MMFFVdWRijstarEps::epsilon
double epsilon
Definition: MMFF/Params.h:155
ForceFields::MMFF::MMFFVdWRijstarEps
Definition: MMFF/Params.h:150
ForceFields::MMFF::MMFFVdWCollection
Definition: MMFF/Params.h:1094
ForceFields::MMFF::MMFFVdW::alpha_i
double alpha_i
Definition: MMFF/Params.h:142
ForceFields::MMFF::MMFFTor::V3
double V3
Definition: MMFF/Params.h:136
ForceFields::MMFF::MMFFOopCollection::d_kAtomType
std::vector< std::uint8_t > d_kAtomType
atom type vector for atom j
Definition: MMFF/Params.h:920
ForceFields::MMFF::MMFFCovRadPauEle
Definition: MMFF/Params.h:105
ForceFields::MMFF::MMFFChgCollection::d_iAtomType
std::vector< std::uint8_t > d_iAtomType
the parameter vector
Definition: MMFF/Params.h:329
ForceFields::MMFF::MMFFBndkCollection::operator()
const MMFFBond * operator()(const int atomicNum, const int nbrAtomicNum) const
Looks up the parameters for a particular key and returns them.
Definition: MMFF/Params.h:414
ForceFields::MMFF::MMFFBndkCollection
Definition: MMFF/Params.h:408
ForceFields::MMFF::MMFFChgCollection::d_bondType
std::vector< std::uint8_t > d_bondType
atom type vector for atom j
Definition: MMFF/Params.h:331
ForceFields::MMFF::MMFFOopCollection::d_iAtomType
std::vector< std::uint8_t > d_iAtomType
Definition: MMFF/Params.h:918
ForceFields::MMFF::MMFFStbnCollection::d_kAtomType
std::vector< std::uint8_t > d_kAtomType
atom type vector for atom j
Definition: MMFF/Params.h:763
ForceFields::MMFF::MMFFAngle::ka
double ka
Definition: MMFF/Params.h:114
ForceFields::MMFF::isDoubleZero
bool isDoubleZero(const double x)
Definition: MMFF/Params.h:43
ForceFields::MMFF::MMFFPBCICollection::d_params
std::vector< MMFFPBCI > d_params
the parameter vector
Definition: MMFF/Params.h:260
ForceFields::MMFF::MMFFOopCollection::d_lAtomType
std::vector< std::uint8_t > d_lAtomType
atom type vector for atom k
Definition: MMFF/Params.h:921
ForceFields::MMFF::MMFFBondCollection::d_jAtomType
std::vector< std::uint8_t > d_jAtomType
atom type vector for atom i
Definition: MMFF/Params.h:403
ForceFields::MMFF::MDYNE_A_TO_KCAL_MOL
const double MDYNE_A_TO_KCAL_MOL
Definition: MMFF/Params.h:42
ForceFields::MMFF::MMFFStbnCollection::getMMFFStbnParams
const std::pair< bool, const MMFFStbn * > getMMFFStbnParams(const unsigned int stretchBendType, const unsigned int bondType1, const unsigned int bondType2, const unsigned int iAtomType, const unsigned int jAtomType, const unsigned int kAtomType) const
Looks up the parameters for a particular key and returns them.
Definition: MMFF/Params.h:675
ForceFields::MMFF::MMFFDfsbCollection::d_params
std::map< const unsigned int, std::map< const unsigned int, std::map< const unsigned int, MMFFStbn > > > d_params
the parameter 3D-map
Definition: MMFF/Params.h:812
ForceFields::MMFF::MMFFAromCollection::isMMFFAromatic
bool isMMFFAromatic(const unsigned int atomType) const
Looks up the parameters for a particular key and returns them.
Definition: MMFF/Params.h:164
ForceFields::MMFF::MMFFChgCollection::d_params
std::vector< MMFFChg > d_params
Definition: MMFF/Params.h:328
ForceFields::MMFF::MMFFVdWCollection::DARAD
double DARAD
Definition: MMFF/Params.h:1100
ForceFields::MMFF::MMFFVdWRijstarEps::R_ij_starUnscaled
double R_ij_starUnscaled
Definition: MMFF/Params.h:152
ForceFields::MMFF::MMFFCovRadPauEle::chi
double chi
Definition: MMFF/Params.h:108
M_PI
#define M_PI
Definition: MMFF/Params.h:27
ForceFields::MMFF::MMFFVdW::R_star
double R_star
Definition: MMFF/Params.h:146
ForceFields::MMFF::MMFFStbn
class to store MMFF parameters for stretch-bending
Definition: MMFF/Params.h:119
ForceFields::MMFF::MMFFVdWCollection::power
double power
gets a pointer to the singleton MMFFVdWCollection
Definition: MMFF/Params.h:1097
ForceFields::MMFF::MMFFProp::val
std::uint8_t val
Definition: MMFF/Params.h:65
ForceFields::MMFF::MMFFChg::bci
double bci
Definition: MMFF/Params.h:84
ForceFields::MMFF::MMFFTorCollection::d_params
std::vector< MMFFTor > d_params
the parameter vector
Definition: MMFF/Params.h:1084
ForceFields::MMFF::MMFFAngleCollection::d_params
std::vector< MMFFAngle > d_params
the parameter vector
Definition: MMFF/Params.h:661
ForceFields::MMFF::MMFFPBCICollection::operator()
const MMFFPBCI * operator()(const unsigned int atomType) const
Looks up the parameters for a particular key and returns them.
Definition: MMFF/Params.h:242
ForceFields::MMFF::MMFFStbn::kbaKJI
double kbaKJI
Definition: MMFF/Params.h:122
ForceFields::MMFF::MMFFVdWCollection::DAEPS
double DAEPS
Definition: MMFF/Params.h:1101
ForceFields::MMFF::MMFFHerschbachLaurieCollection::d_iRow
std::vector< std::uint8_t > d_iRow
Definition: MMFF/Params.h:516
ForceFields::MMFF::MMFFStbnCollection::d_stretchBendType
std::vector< std::uint8_t > d_stretchBendType
atom type vector for atom k
Definition: MMFF/Params.h:765
ForceFields::MMFF::MMFFTorCollection::d_kAtomType
std::vector< std::uint8_t > d_kAtomType
atom type vector for atom j
Definition: MMFF/Params.h:1087
ForceFields::MMFF::MMFFProp::atno
std::uint8_t atno
Definition: MMFF/Params.h:63
ForceFields::MMFF::MMFFCovRadPauEleCollection::d_params
std::vector< MMFFCovRadPauEle > d_params
the parameter vector
Definition: MMFF/Params.h:550
ForceFields::MMFF::MMFFVdWCollection::Beta
double Beta
Definition: MMFF/Params.h:1099
ForceFields::MMFF::MMFFProp
class to store MMFF Properties
Definition: MMFF/Params.h:61
ForceFields::MMFF::MMFFChgCollection
Definition: MMFF/Params.h:264
RDKIT_FORCEFIELD_EXPORT
#define RDKIT_FORCEFIELD_EXPORT
Definition: export.h:255
Invariant.h
ForceFields::MMFF::MMFFOopCollection::d_params
std::vector< MMFFOop > d_params
the parameter vector
Definition: MMFF/Params.h:917
ForceFields::MMFF::MMFFCovRadPauEleCollection::d_atomicNum
std::vector< std::uint8_t > d_atomicNum
the atomic number vector
Definition: MMFF/Params.h:551
ForceFields::MMFF::MMFFBond::kb
double kb
Definition: MMFF/Params.h:90
ForceFields::MMFF::MMFFBndkCollection::d_jAtomicNum
std::vector< std::uint8_t > d_jAtomicNum
atomic number vector for atom i
Definition: MMFF/Params.h:460
ForceFields::MMFF::MMFFStbn::kbaIJK
double kbaIJK
Definition: MMFF/Params.h:121
ForceFields::MMFF::MMFFOopCollection::d_jAtomType
std::vector< std::uint8_t > d_jAtomType
atom type vector for atom i
Definition: MMFF/Params.h:919
ForceFields::MMFF::MMFFHerschbachLaurie::a_ij
double a_ij
Definition: MMFF/Params.h:98
ForceFields::MMFF::MMFFBond::r0
double r0
Definition: MMFF/Params.h:91
ForceFields::MMFF::MMFFBondCollection::d_iAtomType
std::vector< std::uint8_t > d_iAtomType
Definition: MMFF/Params.h:402
ForceFields::MMFF::MMFFPropCollection::d_params
std::vector< MMFFProp > d_params
Definition: MMFF/Params.h:231
ForceFields::MMFF::MMFFProp::sbmb
std::uint8_t sbmb
Definition: MMFF/Params.h:70
ForceFields::MMFF::MMFFBondCollection::operator()
const MMFFBond * operator()(const unsigned int bondType, const unsigned int atomType, const unsigned int nbrAtomType) const
Looks up the parameters for a particular key and returns them.
Definition: MMFF/Params.h:341
ForceFields::MMFF::MMFFHerschbachLaurieCollection::d_jRow
std::vector< std::uint8_t > d_jRow
periodic row number vector for atom i
Definition: MMFF/Params.h:517
ForceFields::MMFF::MMFFStbnCollection
Definition: MMFF/Params.h:669
ForceFields::MMFF::MMFFTor
class to store MMFF parameters for torsions
Definition: MMFF/Params.h:132
ForceFields
Definition: TorsionAngleM6.h:24
ForceFields::MMFF::MMFFVdW::A_i
double A_i
Definition: MMFF/Params.h:144
ForceFields::MMFF::MMFFTorCollection::getMMFFTorParams
const std::pair< const unsigned int, const MMFFTor * > getMMFFTorParams(const MMFFDefCollection *mmffDef, const std::pair< unsigned int, unsigned int > torType, const unsigned int iAtomType, const unsigned int jAtomType, const unsigned int kAtomType, const unsigned int lAtomType) const
Looks up the parameters for a particular key and returns them.
Definition: MMFF/Params.h:931
ForceFields::MMFF::MMFFDefCollection::operator()
const MMFFDef * operator()(const unsigned int atomType) const
Looks up the parameters for a particular key and returns them.
Definition: MMFF/Params.h:181
ForceFields::MMFF::MMFFAngle::theta0
double theta0
Definition: MMFF/Params.h:115
ForceFields::MMFF::MMFFStbnCollection::d_iAtomType
std::vector< std::uint8_t > d_iAtomType
Definition: MMFF/Params.h:761
ForceFields::MMFF::MMFFPBCI::pbci
double pbci
Definition: MMFF/Params.h:76
ForceFields::MMFF::MMFFPBCICollection
Definition: MMFF/Params.h:236
ForceFields::MMFF::clipToOne
void clipToOne(double &x)
Definition: MMFF/Params.h:46
ForceFields::MMFF::MMFFDfsbCollection
Definition: MMFF/Params.h:769
ForceFields::MMFF::MMFFPropCollection::operator()
const MMFFProp * operator()(const unsigned int atomType) const
Looks up the parameters for a particular key and returns them.
Definition: MMFF/Params.h:209
ForceFields::MMFF::MMFFProp::mltb
std::uint8_t mltb
Definition: MMFF/Params.h:67
ForceFields::MMFF::MMFFProp::crd
std::uint8_t crd
Definition: MMFF/Params.h:64
ForceFields::MMFF::MMFFVdWCollection::B
double B
Definition: MMFF/Params.h:1098
ForceFields::MMFF::MMFFAngleCollection::d_iAtomType
std::vector< std::uint8_t > d_iAtomType
Definition: MMFF/Params.h:662
ForceFields::MMFF::RAD2DEG
const double RAD2DEG
Definition: MMFF/Params.h:41
ForceFields::MMFF::MMFFTorCollection::d_torType
std::vector< std::uint8_t > d_torType
atom type vector for atom l
Definition: MMFF/Params.h:1090
ForceFields::MMFF::MMFFStbnCollection::d_jAtomType
std::vector< std::uint8_t > d_jAtomType
atom type vector for atom i
Definition: MMFF/Params.h:762
ForceFields::MMFF::MMFFAngle
class to store MMFF parameters for angle bending
Definition: MMFF/Params.h:112
ForceFields::MMFF::MMFFChg
Definition: MMFF/Params.h:82
ForceFields::MMFF::MMFFBndkCollection::d_iAtomicNum
std::vector< std::uint8_t > d_iAtomicNum
Definition: MMFF/Params.h:459
ForceFields::MMFF::MMFFCovRadPauEle::r0
double r0
Definition: MMFF/Params.h:107
ForceFields::MMFF::MMFFAromCollection
Definition: MMFF/Params.h:158
ForceFields::MMFF::MMFFBondCollection
Definition: MMFF/Params.h:335
ForceFields::MMFF::MMFFTorCollection::d_iAtomType
std::vector< std::uint8_t > d_iAtomType
Definition: MMFF/Params.h:1085
ForceFields::MMFF::MMFFDfsbCollection::getMMFFDfsbParams
const std::pair< bool, const MMFFStbn * > getMMFFDfsbParams(const unsigned int periodicTableRow1, const unsigned int periodicTableRow2, const unsigned int periodicTableRow3) const
Looks up the parameters for a particular key and returns them.
Definition: MMFF/Params.h:775
ForceFields::MMFF::MMFFCovRadPauEleCollection::operator()
const MMFFCovRadPauEle * operator()(const unsigned int atomicNum) const
Looks up the parameters for a particular key and returns them.
Definition: MMFF/Params.h:527
ForceFields::MMFF::MMFFOop::koop
double koop
Definition: MMFF/Params.h:128
ForceFields::MMFF::MMFFPropCollection
Definition: MMFF/Params.h:203
ForceFields::MMFF::MMFFHerschbachLaurieCollection::d_params
std::vector< MMFFHerschbachLaurie > d_params
the parameter vector
Definition: MMFF/Params.h:515
ForceFields::MMFF::MMFFHerschbachLaurie::d_ij
double d_ij
Definition: MMFF/Params.h:99
ForceFields::MMFF::MMFFTor::V2
double V2
Definition: MMFF/Params.h:135
ForceFields::MMFF::MMFFVdW::DA
std::uint8_t DA
Definition: MMFF/Params.h:147
ForceFields::MMFF::MMFFVdW::N_i
double N_i
Definition: MMFF/Params.h:143
ForceFields::MMFF::MMFFDefCollection::d_params
std::vector< MMFFDef > d_params
the parameter vector
Definition: MMFF/Params.h:199
ForceFields::MMFF::MMFFPBCI
class to store MMFF Partial Bond Charge Increments
Definition: MMFF/Params.h:74
ForceFields::MMFF::MMFFVdW
class to store MMFF parameters for non-bonded Van der Waals
Definition: MMFF/Params.h:140
ForceFields::MMFF::MMFFTorCollection
Definition: MMFF/Params.h:925
ForceFields::MMFF::MMFFPropCollection::d_iAtomType
std::vector< std::uint8_t > d_iAtomType
the parameter vector
Definition: MMFF/Params.h:232
ForceFields::MMFF::MMFFAromCollection::d_params
std::vector< std::uint8_t > d_params
the aromatic type vector
Definition: MMFF/Params.h:172
ForceFields::MMFF::MMFFDef
class to store MMFF atom type equivalence levels
Definition: MMFF/Params.h:55
ForceFields::MMFF::MMFFTor::V1
double V1
Definition: MMFF/Params.h:134
ForceFields::MMFF::MMFFChgCollection::d_jAtomType
std::vector< std::uint8_t > d_jAtomType
atom type vector for atom i
Definition: MMFF/Params.h:330
ForceFields::MMFF::DEG2RAD
const double DEG2RAD
Definition: MMFF/Params.h:40
ForceFields::MMFF::MMFFHerschbachLaurieCollection::operator()
const MMFFHerschbachLaurie * operator()(const int iRow, const int jRow) const
Looks up the parameters for a particular key and returns them.
Definition: MMFF/Params.h:470
ForceFields::MMFF::MMFFProp::linh
std::uint8_t linh
Definition: MMFF/Params.h:69
ForceFields::MMFF::MMFFTorCollection::d_jAtomType
std::vector< std::uint8_t > d_jAtomType
atom type vector for atom i
Definition: MMFF/Params.h:1086
ForceFields::MMFF::MMFFVdWRijstarEps::R_ij_star
double R_ij_star
Definition: MMFF/Params.h:154
ForceFields::MMFF::MMFFBondCollection::d_params
std::vector< MMFFBond > d_params
the parameter vector
Definition: MMFF/Params.h:401
ForceFields::MMFF::MMFFDefCollection
Definition: MMFF/Params.h:175
ForceFields::MMFF::MMFFChgCollection::getMMFFChgParams
const std::pair< int, const MMFFChg * > getMMFFChgParams(const unsigned int bondType, const unsigned int iAtomType, const unsigned int jAtomType) const
Looks up the parameters for a particular key and returns them.
Definition: MMFF/Params.h:270
ForceFields::MMFF::MMFFProp::arom
std::uint8_t arom
Definition: MMFF/Params.h:68
export.h
ForceFields::MMFF::MMFFAngleCollection::d_jAtomType
std::vector< std::uint8_t > d_jAtomType
atom type vector for atom i
Definition: MMFF/Params.h:663