RDKit: MIFDescriptors.h Source File

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
MIFDescriptors.h
Go to the documentation of this file.
1//
2// Copyright (c) 2014-2024, Novartis Institutes for BioMedical Research and
3// other RDKit contributors
4//
5// @@ All Rights Reserved @@
6// This file is part of the RDKit.
7// The contents are covered by the terms of the BSD license
8// which is included in the file license.txt, found at the root
9// of the RDKit source tree.
10//
11#include <RDGeneral/export.h>
12#ifndef RDMIF_DESCRIPTORS_H
13#define RDMIF_DESCRIPTORS_H
14/*! \file MIFDescriptors.h
15
16 \brief code for generating molecular interaction field (MIF) descriptors
17
18 \b Note that this functionality is experimental and the API and/or results
19 amay change in future releases.
20*/
21
22#include <vector>
23#include <Geometry/point.h>
24#include <Geometry/UniformRealValueGrid3D.h>
25#include <ForceField/MMFF/Nonbonded.h>
26#include <ForceField/UFF/Nonbonded.h>
27#include <ForceField/UFF/Params.h>
28#include <GraphMol/ForceFieldHelpers/UFF/AtomTyper.h>
29#include <GraphMol/RDKitBase.h>
30
31 namespace RDMIF {
32//! \brief constructs a UniformRealValueGrid3D which fits to the molecule mol
33/*!
34 \returns a pointer to a UniformRealValueGrid which has a spacing of \c spacing
35 (default: 0.5 Angstrom) and a spatial extent of conformer \c confId
36 (default: -1) of molecule \c mol plus a defined margin \c margin on each side
37 (default: 5.0 Angstrom).
38
39 \param mol Molecule for which the grid is constructed
40 \param confId Id of Conformer which is used
41 \param margin distance from molecule to the grid's wall
42 \param spacing grid's spacing
43
44 <b>Returns</b>
45 pointer to a grid
46 */
47 RDKIT_MOLINTERACTIONFIELDS_EXPORT
48std::unique_ptr<RDGeom::UniformRealValueGrid3D> constructGrid(
49 const RDKit::ROMol &mol, int confId = -1, double margin = 5.0,
50 double spacing = 0.5);
51
52//! \brief calculates a descriptor at every grid point of MIF
53/*!
54 any unary function/functor can be used taking a grid point of type
55 RDKit::Point3D as parameter
56
57 \param grd a UniformRealValueGrid3D
58 \param functor any unary function/functor which takes four doubles as
59 parameters (3 coordinates, 1 threshold)
60 \param thres cuts off atom contributions if distance of interaction higher
61 than threshold, negative threshold: no threshold, defaults to -1.0
62 */
63template <typename T>
64 void calculateDescriptors(RDGeom::UniformRealValueGrid3D &grd, const T &functor,
65 double thres = -1.0) {
66 const RDGeom::Point3D &offSet = grd.getOffset();
67 auto x = offSet.x;
68 auto y = offSet.y;
69 auto z = offSet.z;
70 auto oX = x;
71 auto oY = y;
72 auto spacing = grd.getSpacing();
73 if (thres < 0) {
74 thres = spacing * grd.getSize();
75 }
76 thres *= thres; // comparing squared distance
77
78 unsigned int id = 0;
79 auto &data = grd.getData();
80
81 for (unsigned int idZ = 0; idZ < grd.getNumZ(); ++idZ) {
82 for (unsigned int idY = 0; idY < grd.getNumY(); ++idY) {
83 for (unsigned int idX = 0; idX < grd.getNumX(); ++idX) {
84 data[id++] = functor(x, y, z, thres);
85 x += spacing;
86 }
87 y += spacing;
88 x = oX;
89 }
90 z += spacing;
91 y = oY;
92 }
93}
94
95//! \brief class for calculation of electrostatic interaction (Coulomb energy)
96//! between probe and molecule in vacuum (no dielectric)
97/*
98 d_nAtoms No of atoms in molecule
99 d_softcore true if softcore interaction is used, else minimum cutoff distance
100 is used
101 d_probe charge of probe [e]
102 d_absVal if true, absolute values of interactions are calculated
103 d_alpha softcore interaction parameter [A^2]
104 d_cutoff squared minimum cutoff distance [A^2]
105 d_charges vector of doubles with all partial charges of the atoms in a
106 molecule [e] d_pos vector of doubles with all positions of the atoms in
107 a molecule [A] d_prefactor prefactor taking into account the geometric
108 factors,natural constants and conversion of units
109 */
110 class RDKIT_MOLINTERACTIONFIELDS_EXPORT Coulomb {
111 public:
112 Coulomb() = default;
113 ~Coulomb() = default;
114
115 //! \brief constructs Coulomb object from vectors of charges and positions
116 /*!
117 \param charges vector of charges [e]
118 \param pos vector of postions [A]
119 \param probeCharge charge of probe [e] (default: 1.0)
120 \param absVal if true, negative (favored) values of interactions are
121 calculated (default: false)
122 \param alpha softcore interaction parameter [A^2]; if zero,
123 a minimum cutoff distance is used (default: 0.0)
124 \param cutoff minimum cutoff distance [A] (default: 1.0)
125
126 */
127 Coulomb(const std::vector<double> &charges,
128 const std::vector<RDGeom::Point3D> &positions,
129 double probeCharge = 1.0, bool absVal = false, double alpha = 0.0,
130 double cutoff = 1.0);
131
132 //! \brief constructs Coulomb object from a molecule object
133 /*!
134 The molecule \c mol needs to have partial charges set as property of atoms.
135
136 \param mol molecule object
137 \param confId conformation id which is used to get positions of atoms
138 (default=-1)
139 \param absVal if true, absolute values of interactions are
140 calculated (default: false)
141 \param probeCharge charge of probe [e] (default: 1.0)
142 \param prop property key for retrieving partial charges
143 of atoms (default: "_GasteigerCharge")
144 \param alpha softcore interaction parameter [A^2], if zero, a minimum
145 cutoff distance is used (default: 0.0)
146 \param cutoff minimum cutoff distance [A] (default: 1.0)
147
148 */
149 Coulomb(const RDKit::ROMol &mol, int confId = -1, double probeCharge = 1.0,
150 bool absVal = false, const std::string &prop = "_GasteigerCharge",
151 double alpha = 0.0, double cutoff = 1.0);
152
153 //! \brief calculated the electrostatic interaction at point \c pt in the
154 //! molecules field in [kJ mol^-1]
155 /*!
156 \param x, y, z coordinates at which the interaction is calculated
157 \param thres squared max distance until interactions are calc.
158
159 \return electrostatic interaction energy in [kJ mol^-1]
160 */
161 double operator()(double x, double y, double z, double thres) const;
162
163 private:
164 unsigned int d_nAtoms = 0;
165 bool d_softcore = false;
166 bool d_absVal = false;
167 double d_cutoff = 0.00001;
168 double d_probe = 1.0;
169 double d_alpha = 0.0;
170 std::vector<double> d_charges;
171 std::vector<double> d_pos;
172};
173
174//! \brief class for calculation of electrostatic interaction (Coulomb energy)
175//! between probe and molecule by taking a distance-dependent dielectric into
176//! account:
177/*!
178 Same energy term as used in GRID
179 References:
180 J. Med. Chem. 1985, 28, 849.
181 J. Comp. Chem. 1983, 4, 187.
182 */
183/*
184 member variables:
185 d_nAtoms: No of atoms in molecule
186 d_softcore: true if softcore interaction is used, else minimum cutoff
187 distance is used
188 d_dielectric: factor of dielectric constants
189 d_probe: charge of probe [e]
190 d_absVal: if true, negative (favored) values of interactions
191 are calculated (default: false)
192 d_epsilon: relative permittivity of solvent
193 d_xi: relative permittivity of solute
194 d_alpha: softcore interaction parameter [A^2]
195 d_cutoff: squared minimum cutoff distance [A^2]
196 d_charges: vector of doubles with all partial charges of the atoms
197 in a molecule [e]
198 d_pos: vector of Point3Ds with all positions of the atoms
199 in a molecule [A]
200 d_prefactor: prefactor taking into account the geometric factors,
201 natural constants and conversion of units
202 */
203 class RDKIT_MOLINTERACTIONFIELDS_EXPORT CoulombDielectric {
204 public:
205 CoulombDielectric()
206 : d_nAtoms(0),
207 d_softcore(false),
208 d_absVal(false),
209 d_cutoff(0.001),
210 d_probe(1),
211 d_epsilon(1.0),
212 d_xi(1.0),
213 d_alpha(0.0) {
214 d_dielectric = (d_xi - d_epsilon) / (d_xi + d_epsilon);
215 }
216
217 //! \brief constructs CoulombDielectric object from vectors of charges and
218 //! positions
219 /*!
220 \param charges vector of charges [e]
221 \param pos vector of postions [A]
222 \param probeCharge charge of probe [e] (default: 1.0)
223 \param absVal if true, negative (favored) values of interactions are
224 calculated (default: false)
225 \param alpha softcore interaction parameter [A^2]; if zero,
226 a minimum cutoff distance is used (default: 0.0)
227 \param cutoff minimum cutoff distance [A] (default: 1.0)
228 \param epsilon relative permittivity of solvent (default: 80.0)
229 \param xi relative permittivity of solute (default: 4.0)
230
231 */
232 CoulombDielectric(const std::vector<double> &charges,
233 const std::vector<RDGeom::Point3D> &positions,
234 double probeCharge = 1.0, bool absVal = false,
235 double alpha = 0.0, double cutoff = 1.0,
236 double epsilon = 80.0, double xi = 4.0);
237
238 //! \brief constructs Coulomb object from a molecule object
239 /*!
240 The molecule \c mol needs to have partial charges set as property of atoms.
241
242 \param mol molecule object
243 \param confId conformation id which is used to get positions of atoms
244 (default=-1)
245 \param probeCharge charge of probe [e] (default: 1.0)
246 \param absVal if true, negative (favored) values of interactions are
247 calculated (default: false)
248 \param prop property key for retrieving partial charges of atoms
249 (default: "_GasteigerCharge")
250 \param alpha softcore interaction parameter [A^2], if zero, a minimum
251 cutoff distance is used (default: 0.0)
252 \param cutoff minimum cutoff distance [A] (default: 1.0)
253 \param epsilon relative permittivity of solvent (default: 80.0)
254 \param xi relative permittivity of solute (default: 4.0)
255 */
256 CoulombDielectric(const RDKit::ROMol &mol, int confId = -1,
257 double probeCharge = 1.0, bool absVal = false,
258 const std::string &prop = "_GasteigerCharge",
259 double alpha = 0.0, double cutoff = 1.0,
260 double epsilon = 80.0, double xi = 4.0);
261
262 //! \brief returns the electrostatic interaction at point \c pt in the
263 //! molecule's field in [kJ mol^-1]
264 /*!
265 \param x, y, z coordinates at which the interaction is calculated
266 \param thres squared threshold distance
267
268 \return electrostatic interaction energy in [kJ mol^-1]
269 */
270 double operator()(double x, double y, double z, double thres) const;
271
272 private:
273 unsigned int d_nAtoms;
274 bool d_softcore, d_absVal;
275 double d_cutoff, d_probe;
276 double d_epsilon, d_xi, d_alpha;
277 double d_dielectric;
278 std::vector<double> d_charges, d_sp;
279 std::vector<double> d_pos;
280 // used as a cache
281 mutable std::vector<double> d_dists;
282};
283
284//! \brief Abstract class for calculation of Van der Waals interaction between
285//! probe and molecule at gridpoint \c pt
286/*
287 * Either the MMFF94 or the UFF VdW term can be calculated with a defined probe
288 * atom and molecule.
289 * d_cutoff: minimum cutoff distance [A]
290 * d_nAtoms: No of atoms in molecule
291 * d_R_star_ij: vector of Lennard Jones parameters for every
292 * interaction (vdW-radii)
293 * d_wellDepth: vector of Lennard Jones parameters for
294 * every interaction (well depths)
295 * d_pos: vector of positions of atoms in molecule
296 */
297 class RDKIT_MOLINTERACTIONFIELDS_EXPORT VdWaals {
298 public:
299 VdWaals() = default;
300 VdWaals(const RDKit::ROMol &mol, int confId = -1, double cutoff = 1.0);
301 VdWaals(const VdWaals &other) = delete;
302 VdWaals &operator=(const VdWaals &other) = delete;
303 VdWaals(VdWaals &&other) = default;
304 VdWaals &operator=(VdWaals &&other) = default;
305 virtual ~VdWaals() = default;
306
307 //! \brief returns the VdW interaction at point \c pt in the molecules field
308 //! in [kJ mol^-1]
309 /*!
310 \param x, y, z coordinates at which the interaction is calculated
311 \param thres squared max distance until interactions are calc.
312
313 \return vdW interaction energy in [kJ mol^-1]
314 */
315 double operator()(double x, double y, double z, double thres) const;
316
317 protected:
318 void fillVectors();
319 virtual double calcEnergy(double, double, double) const = 0;
320 virtual void fillVdwParamVectors(unsigned int atomIdx) = 0;
321 double d_cutoff = 1.0;
322 unsigned int d_nAtoms = 0;
323 std::vector<double> d_pos;
324 std::vector<double> d_R_star_ij;
325 std::vector<double> d_wellDepth;
326 std::unique_ptr<RDKit::ROMol> d_mol;
327};
328
329 class RDKIT_MOLINTERACTIONFIELDS_EXPORT MMFFVdWaals : public VdWaals {
330 public:
331 //! \brief constructs VdWaals object which uses MMFF94 from a molecule object
332 /*!
333 \param mol molecule object
334 \param confId conformation id which is used to get positions of atoms
335 (default: -1)
336 \param probeAtomType MMFF94 atom type for the probe atom
337 (default: 6, sp3 oxygen)
338 \param cutoff minimum cutoff distance [A] (default: 1.0)
339 \param scaling scaling of VdW parameters to take hydrogen bonds into
340 account (default: false)
341 */
342 MMFFVdWaals(const RDKit::ROMol &mol, int confId = -1,
343 unsigned int probeAtomType = 6, bool scaling = false,
344 double cutoff = 1.0);
345 MMFFVdWaals(const MMFFVdWaals &other) = delete;
346 MMFFVdWaals &operator=(const MMFFVdWaals &other) = delete;
347 MMFFVdWaals(MMFFVdWaals &&other) = default;
348 MMFFVdWaals &operator=(MMFFVdWaals &&other) = default;
349 ~MMFFVdWaals() override = default;
350
351 private:
352 double calcEnergy(double, double,
353 double) const override; // MMFF energy function
354 void fillVdwParamVectors(unsigned int atomIdx) override;
355 bool d_scaling;
356 std::unique_ptr<RDKit::MMFF::MMFFMolProperties> d_props;
357 const ForceFields::MMFF::MMFFVdWCollection *d_mmffVdW;
358 const ForceFields::MMFF::MMFFVdW *d_probeParams;
359};
360
361 class RDKIT_MOLINTERACTIONFIELDS_EXPORT UFFVdWaals : public VdWaals {
362 public:
363 //! \brief constructs VdWaals object which uses UFF from a molecule object
364 /*!
365 \param mol molecule object
366 \param confId conformation id which is used to get positions of atoms
367 (default: -1)
368 \param probeAtomType UFF atom type for the probe atom (e.g. "O_3", i.e. a
369 tetrahedral oxygen)
370 \param cutoff minimum cutoff distance [A] (default: 1.0)
371 */
372 UFFVdWaals(const RDKit::ROMol &mol, int confId = -1,
373 const std::string &probeAtomType = "O_3", double cutoff = 1.0);
374 UFFVdWaals(const UFFVdWaals &other) = delete;
375 UFFVdWaals &operator=(const UFFVdWaals &other) = delete;
376 UFFVdWaals(UFFVdWaals &&other) = default;
377 UFFVdWaals &operator=(UFFVdWaals &&other) = default;
378 ~UFFVdWaals() override = default;
379
380 private:
381 double calcEnergy(double, double,
382 double) const override; // UFF energy function
383 void fillVdwParamVectors(unsigned int atomIdx) override;
384 const ForceFields::UFF::ParamCollection *d_uffParamColl;
385 const ForceFields::UFF::AtomicParams *d_probeParams;
386 RDKit::UFF::AtomicParamVect d_params;
387};
388
389//! \brief class for calculation of hydrogen bond potential between probe and
390//! molecule
391/*
392 implementation of GRID molecular H-Bond descriptor:
393 J.Med.Chem. 1989, 32, 1083.
394 J.Med.Chem. 1993, 36, 140.
395 J.Med.Chem. 1993, 36, 148.
396 member variables:
397 d_cutoff: squared minimum cutoff distance [A^2]
398 d_nInteract: No of interactions between probe and molecule
399 d_DAprop: either 'A' or 'D', defines whether target atoms (in
400 molecule) have to be acceptors or donors for interacting with probe
401 d_probetype: defines type of probe atom, either N or O
402 d_targettypes: vectors of types of target atoms (in molecule), either N or O
403 d_pos: vector of positions of target atoms in molecule
404 d_direction: if target accepting, vector of directions of lone pairs on
405 target atoms (if there are two lone pairs, the resulting direction is used) if
406 target donating, the X-H bond direction is saved
407 d_plane: vector of plane vectors in which the lone pairs are
408 */
409 class RDKIT_MOLINTERACTIONFIELDS_EXPORT HBond {
410 public:
411 HBond() : d_cutoff(1.0), d_probetype(O), d_nInteract(0) {};
412
413 //! \brief constructs HBond object from a molecule object
414 /*!
415 The molecule \c mol needs to have partial charges set as property of atoms.
416 \param mol molecule object
417 \param confId conformation id which is used to get positions of atoms
418 (default=-1)
419 \param probeAtomType atom type for the probe atom ("OH", "O", "NH", "N")
420 \param fixed for some groups, two different angle
421 dependencies are defined in GRID: one which takes some flexibility of groups
422 (rotation/swapping of lone pairs and hydrogen) into account and one for
423 strictly fixed conformations if true, strictly fixed conformations
424 (default: fixed)
425 \param cutoff minimum cutoff distance [A] (default: 1.0)
426 */
427 HBond(const RDKit::ROMol &mol, int confId = -1,
428 const std::string &probeAtomType = "OH", bool fixed = true,
429 double cutoff = 1.0);
430 ~HBond() = default;
431
432 //! \brief returns the hydrogen bonding interaction at point \c pt in the
433 //! molecules field in [kJ mol^-1]
434 /*!
435 \param x, y, z coordinates at which the interaction is calculated
436 \param thres squared max distance until interactions are calc.
437
438 \return hydrogen bonding interaction energy in [kJ mol^-1]
439 */
440 double operator()(double x, double y, double z, double thres) const;
441
442 unsigned int getNumInteractions() const { return d_nInteract; }
443
444 private:
445 boost::uint8_t d_DAprop;
446
447 enum atomtype {
448 N,
449 O
450 };
451 double d_cutoff;
452 atomtype d_probetype;
453 unsigned int d_nInteract; // number of HBond interactions
454
455 std::vector<atomtype> d_targettypes;
456 std::vector<double> d_pos; // vector of positions of target atoms
457 std::vector<double> d_direction; // vector of sum of lone pair vectors
458 std::vector<double> d_lengths; // vector of lengths of direction vectors
459 std::vector<double> d_plane; // vector of lone pair plane vectors
460 // these two are used as a computational cache during operator()
461 mutable std::vector<double>
462 d_eneContrib; // energy contributions of all interactions
463 mutable std::vector<double>
464 d_vectTargetProbe; // hydrogen bond direction of probe
465
466 // constructing functions
467 unsigned int findSpecials(const RDKit::ROMol &mol, int confId, bool fixed,
468 std::vector<unsigned int> &specials);
469 unsigned int findAcceptors(const RDKit::ROMol &mol, int confId,
470 const std::vector<unsigned int> &specials);
471 unsigned int findDonors(const RDKit::ROMol &mol, int confId,
472 const std::vector<unsigned int> &specials);
473 unsigned int findAcceptorsUnfixed(const RDKit::ROMol &mol, int confId,
474 const std::vector<unsigned int> &specials);
475 unsigned int findDonorsUnfixed(const RDKit::ROMol &mol, int confId,
476 const std::vector<unsigned int> &specials);
477
478 void addVectElements(atomtype type, double (*funct)(double, double, double),
479 const RDGeom::Point3D &pos, const RDGeom::Point3D &dir,
480 const RDGeom::Point3D &plane = RDGeom::Point3D(0.0, 0.0,
481 0.0));
482
483 void normalize(double &x, double &y, double &z) const;
484 double angle(double x1, double y1, double z1, double x2, double y2,
485 double z2) const;
486
487 std::vector<double (*)(double, double, double)> d_function;
488};
489
490//! \brief class for calculation of hydrophilic field of molecule
491/*
492 interaction energy of hydrogen and oxygen of water with the molecule is
493 calculated at each point as a hydrogen bond interaction (either OH or O probe).
494 the favored interaction is returned. member variables: d_hbondO
495 HBond descriptor with "O" probe d_hbondOH HBond
496 descriptor with "OH" probe
497 */
498 class RDKIT_MOLINTERACTIONFIELDS_EXPORT Hydrophilic {
499 public:
500 //! \brief constructs Hydrophilic object from a molecule object
501 /*!
502 params:
503 \param mol molecule object
504 \param confId conformation id which is used to get
505 positions of atoms (default: -1)
506 \param fixed for some groups, two different angle
507 dependencies are defined in GRID: one which takes some flexibility of groups
508 (rotation/swapping of lone pairs and hydrogen) into account and one for
509 strictly fixed conformations if true, strictly fixed conformations
510 (default: fixed)
511 \param cutoff minimum cutoff distance [A] (default: 1.0)
512 */
513 Hydrophilic(const RDKit::ROMol &mol, int confId = -1, bool fixed = true,
514 double cutoff = 1.0);
515 ~Hydrophilic() {};
516
517 double operator()(double x, double y, double z, double thres) const;
518
519 private:
520 HBond d_hbondOH, d_hbondO;
521};
522
523//! \brief writes the contents of the MIF to a stream
524/*!
525 The Grid \c grd is written in Gaussian Cube format
526 A molecule \c mol and a \c confId can optionally be provided
527 */
528 RDKIT_MOLINTERACTIONFIELDS_EXPORT void writeToCubeStream(
529 const RDGeom::UniformRealValueGrid3D &grd, std::ostream &outStrm,
530 const RDKit::ROMol *mol = nullptr, int confid = -1);
531
532//! \brief writes the contents of the MIF to a file
533/*!
534 The Grid \c grd is written in Gaussian Cube format
535 A molecule \c mol and a \c confId can optionally be provided
536 */
537 RDKIT_MOLINTERACTIONFIELDS_EXPORT void writeToCubeFile(
538 const RDGeom::UniformRealValueGrid3D &grd, const std::string &filename,
539 const RDKit::ROMol *mol = nullptr, int confid = -1);
540
541//! \brief reads the contents of the MIF from a stream in Gaussian cube format
542/*!
543 The Grid \c grd is modified according to input values
544 If a molecule was associated to the grid on write, a non-null pointer to a
545 molecule is returned with atoms and a conformer, but NO bond information.
546 If there is no atom information in the cube file, a null pointer is returned.
547 */
548 RDKIT_MOLINTERACTIONFIELDS_EXPORT std::unique_ptr<RDKit::RWMol>
549readFromCubeStream(RDGeom::UniformRealValueGrid3D &grd, std::istream &inStrm);
550
551//! \brief reads the contents of the MIF from a file in Gaussian cube format
552/*!
553 The Grid \c grd is modified according to input values
554 If a molecule was associated to the grid on write, a non-null pointer to a
555 molecule is returned with atoms and a conformer, but NO bond information.
556 If there is no atom information in the cube file, a null pointer is returned.
557 */
558 RDKIT_MOLINTERACTIONFIELDS_EXPORT std::unique_ptr<RDKit::RWMol>
559readFromCubeFile(RDGeom::UniformRealValueGrid3D &grd,
560 const std::string &filename);
561
562} // end of namespace RDMIF
563
564#endif /* RDMIF_DESCRIPTORS_H */
Nonbonded.h
RDKitBase.h
pulls in the core RDKit functionality
AtomTyper.h
Nonbonded.h
Params.h
UniformRealValueGrid3D.h
ForceFields::MMFF::MMFFVdWCollection
Definition MMFF/Params.h:960
ForceFields::MMFF::MMFFVdW
class to store MMFF parameters for non-bonded Van der Waals
Definition MMFF/Params.h:132
ForceFields::UFF::AtomicParams
class to store atomic parameters for the Universal Force Field
Definition UFF/Params.h:68
ForceFields::UFF::ParamCollection
singleton class for retrieving UFF AtomParams
Definition UFF/Params.h:108
RDGeom::Point3D
Definition point.h:53
RDGeom::Point3D::y
double y
Definition point.h:56
RDGeom::Point3D::x
double x
Definition point.h:55
RDGeom::Point3D::z
double z
Definition point.h:57
RDGeom::UniformRealValueGrid3D
Definition UniformRealValueGrid3D.h:21
RDGeom::UniformRealValueGrid3D::getSpacing
double getSpacing() const
get the grid's spacing
Definition UniformRealValueGrid3D.h:109
RDGeom::UniformRealValueGrid3D::getSize
unsigned int getSize() const override
get the size of the grid (number of grid points)
Definition UniformRealValueGrid3D.h:84
RDGeom::UniformRealValueGrid3D::getOffset
const RDGeom::Point3D & getOffset() const
get the grid's offset
Definition UniformRealValueGrid3D.h:106
RDGeom::UniformRealValueGrid3D::getNumZ
unsigned int getNumZ() const
get the number of grid points along z-axis
Definition UniformRealValueGrid3D.h:103
RDGeom::UniformRealValueGrid3D::getNumY
unsigned int getNumY() const
get the number of grid points along y-axis
Definition UniformRealValueGrid3D.h:100
RDGeom::UniformRealValueGrid3D::getData
const std::vector< double > & getData() const
brief returns raw vector
Definition UniformRealValueGrid3D.h:117
RDGeom::UniformRealValueGrid3D::getNumX
unsigned int getNumX() const
get the number of grid points along x-axis
Definition UniformRealValueGrid3D.h:97
RDKit::ROMol
Definition ROMol.h:199
RDMIF::CoulombDielectric::CoulombDielectric
CoulombDielectric(const RDKit::ROMol &mol, int confId=-1, double probeCharge=1.0, bool absVal=false, const std::string &prop="_GasteigerCharge", double alpha=0.0, double cutoff=1.0, double epsilon=80.0, double xi=4.0)
constructs Coulomb object from a molecule object
RDMIF::CoulombDielectric::CoulombDielectric
CoulombDielectric()
Definition MIFDescriptors.h:205
RDMIF::CoulombDielectric::operator()
double operator()(double x, double y, double z, double thres) const
returns the electrostatic interaction at point pt in the molecule's field in [kJ mol^-1]
RDMIF::CoulombDielectric::CoulombDielectric
CoulombDielectric(const std::vector< double > &charges, const std::vector< RDGeom::Point3D > &positions, double probeCharge=1.0, bool absVal=false, double alpha=0.0, double cutoff=1.0, double epsilon=80.0, double xi=4.0)
constructs CoulombDielectric object from vectors of charges and positions
RDMIF::Coulomb::Coulomb
Coulomb()=default
RDMIF::Coulomb::Coulomb
Coulomb(const RDKit::ROMol &mol, int confId=-1, double probeCharge=1.0, bool absVal=false, const std::string &prop="_GasteigerCharge", double alpha=0.0, double cutoff=1.0)
constructs Coulomb object from a molecule object
RDMIF::Coulomb::operator()
double operator()(double x, double y, double z, double thres) const
calculated the electrostatic interaction at point pt in the molecules field in [kJ mol^-1]
RDMIF::Coulomb::~Coulomb
~Coulomb()=default
RDMIF::Coulomb::Coulomb
Coulomb(const std::vector< double > &charges, const std::vector< RDGeom::Point3D > &positions, double probeCharge=1.0, bool absVal=false, double alpha=0.0, double cutoff=1.0)
constructs Coulomb object from vectors of charges and positions
RDMIF::HBond
class for calculation of hydrogen bond potential between probe and molecule
Definition MIFDescriptors.h:409
RDMIF::HBond::~HBond
~HBond()=default
RDMIF::HBond::HBond
HBond(const RDKit::ROMol &mol, int confId=-1, const std::string &probeAtomType="OH", bool fixed=true, double cutoff=1.0)
constructs HBond object from a molecule object
RDMIF::HBond::HBond
HBond()
Definition MIFDescriptors.h:411
RDMIF::HBond::getNumInteractions
unsigned int getNumInteractions() const
Definition MIFDescriptors.h:442
RDMIF::HBond::operator()
double operator()(double x, double y, double z, double thres) const
returns the hydrogen bonding interaction at point pt in the molecules field in [kJ mol^-1]
RDMIF::Hydrophilic::~Hydrophilic
~Hydrophilic()
Definition MIFDescriptors.h:515
RDMIF::Hydrophilic::Hydrophilic
Hydrophilic(const RDKit::ROMol &mol, int confId=-1, bool fixed=true, double cutoff=1.0)
constructs Hydrophilic object from a molecule object
RDMIF::Hydrophilic::operator()
double operator()(double x, double y, double z, double thres) const
RDMIF::MMFFVdWaals::operator=
MMFFVdWaals & operator=(const MMFFVdWaals &other)=delete
RDMIF::MMFFVdWaals::MMFFVdWaals
MMFFVdWaals(const MMFFVdWaals &other)=delete
RDMIF::MMFFVdWaals::MMFFVdWaals
MMFFVdWaals(MMFFVdWaals &&other)=default
RDMIF::MMFFVdWaals::~MMFFVdWaals
~MMFFVdWaals() override=default
RDMIF::MMFFVdWaals::MMFFVdWaals
MMFFVdWaals(const RDKit::ROMol &mol, int confId=-1, unsigned int probeAtomType=6, bool scaling=false, double cutoff=1.0)
constructs VdWaals object which uses MMFF94 from a molecule object
RDMIF::MMFFVdWaals::operator=
MMFFVdWaals & operator=(MMFFVdWaals &&other)=default
RDMIF::UFFVdWaals::operator=
UFFVdWaals & operator=(UFFVdWaals &&other)=default
RDMIF::UFFVdWaals::UFFVdWaals
UFFVdWaals(UFFVdWaals &&other)=default
RDMIF::UFFVdWaals::operator=
UFFVdWaals & operator=(const UFFVdWaals &other)=delete
RDMIF::UFFVdWaals::~UFFVdWaals
~UFFVdWaals() override=default
RDMIF::UFFVdWaals::UFFVdWaals
UFFVdWaals(const UFFVdWaals &other)=delete
RDMIF::UFFVdWaals::UFFVdWaals
UFFVdWaals(const RDKit::ROMol &mol, int confId=-1, const std::string &probeAtomType="O_3", double cutoff=1.0)
constructs VdWaals object which uses UFF from a molecule object
RDMIF::VdWaals::operator=
VdWaals & operator=(VdWaals &&other)=default
RDMIF::VdWaals::VdWaals
VdWaals(const VdWaals &other)=delete
RDMIF::VdWaals::calcEnergy
virtual double calcEnergy(double, double, double) const =0
RDMIF::VdWaals::operator()
double operator()(double x, double y, double z, double thres) const
returns the VdW interaction at point pt in the molecules field in [kJ mol^-1]
RDMIF::VdWaals::d_R_star_ij
std::vector< double > d_R_star_ij
Definition MIFDescriptors.h:324
RDMIF::VdWaals::d_mol
std::unique_ptr< RDKit::ROMol > d_mol
Definition MIFDescriptors.h:326
RDMIF::VdWaals::d_nAtoms
unsigned int d_nAtoms
Definition MIFDescriptors.h:322
RDMIF::VdWaals::d_cutoff
double d_cutoff
Definition MIFDescriptors.h:321
RDMIF::VdWaals::~VdWaals
virtual ~VdWaals()=default
RDMIF::VdWaals::d_wellDepth
std::vector< double > d_wellDepth
Definition MIFDescriptors.h:325
RDMIF::VdWaals::VdWaals
VdWaals()=default
RDMIF::VdWaals::fillVdwParamVectors
virtual void fillVdwParamVectors(unsigned int atomIdx)=0
RDMIF::VdWaals::fillVectors
void fillVectors()
RDMIF::VdWaals::d_pos
std::vector< double > d_pos
Definition MIFDescriptors.h:323
RDMIF::VdWaals::VdWaals
VdWaals(const RDKit::ROMol &mol, int confId=-1, double cutoff=1.0)
RDMIF::VdWaals::VdWaals
VdWaals(VdWaals &&other)=default
RDMIF::VdWaals::operator=
VdWaals & operator=(const VdWaals &other)=delete
export.h
RDKIT_MOLINTERACTIONFIELDS_EXPORT
#define RDKIT_MOLINTERACTIONFIELDS_EXPORT
Definition export.h:345
RDKit::UFF::AtomicParamVect
std::vector< const ForceFields::UFF::AtomicParams * > AtomicParamVect
Definition UFF/AtomTyper.h:28
RDMIF
Definition MIFDescriptors.h:31
RDMIF::readFromCubeStream
RDKIT_MOLINTERACTIONFIELDS_EXPORT std::unique_ptr< RDKit::RWMol > readFromCubeStream(RDGeom::UniformRealValueGrid3D &grd, std::istream &inStrm)
reads the contents of the MIF from a stream in Gaussian cube format
RDMIF::writeToCubeStream
RDKIT_MOLINTERACTIONFIELDS_EXPORT void writeToCubeStream(const RDGeom::UniformRealValueGrid3D &grd, std::ostream &outStrm, const RDKit::ROMol *mol=nullptr, int confid=-1)
writes the contents of the MIF to a stream
RDMIF::writeToCubeFile
RDKIT_MOLINTERACTIONFIELDS_EXPORT void writeToCubeFile(const RDGeom::UniformRealValueGrid3D &grd, const std::string &filename, const RDKit::ROMol *mol=nullptr, int confid=-1)
writes the contents of the MIF to a file
RDMIF::constructGrid
RDKIT_MOLINTERACTIONFIELDS_EXPORT std::unique_ptr< RDGeom::UniformRealValueGrid3D > constructGrid(const RDKit::ROMol &mol, int confId=-1, double margin=5.0, double spacing=0.5)
constructs a UniformRealValueGrid3D which fits to the molecule mol
RDMIF::readFromCubeFile
RDKIT_MOLINTERACTIONFIELDS_EXPORT std::unique_ptr< RDKit::RWMol > readFromCubeFile(RDGeom::UniformRealValueGrid3D &grd, const std::string &filename)
reads the contents of the MIF from a file in Gaussian cube format
RDMIF::calculateDescriptors
void calculateDescriptors(RDGeom::UniformRealValueGrid3D &grd, const T &functor, double thres=-1.0)
calculates a descriptor at every grid point of MIF
Definition MIFDescriptors.h:64
point.h