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