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>
29#include <GraphMol/RDKitBase.h>
30
31namespace 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 */
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>
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 */
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 */
204 public:
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 */
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:
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
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() = default;
350
351 private:
352 double calcEnergy(double, double, double) const; // MMFF energy function
353 void fillVdwParamVectors(unsigned int atomIdx);
354 bool d_scaling;
355 std::unique_ptr<RDKit::MMFF::MMFFMolProperties> d_props;
357 const ForceFields::MMFF::MMFFVdW *d_probeParams;
358};
359
361 public:
362 //! \brief constructs VdWaals object which uses UFF from a molecule object
363 /*!
364 \param mol molecule object
365 \param confId conformation id which is used to get positions of atoms
366 (default: -1)
367 \param probeAtomType UFF atom type for the probe atom (e.g. "O_3", i.e. a
368 tetrahedral oxygen)
369 \param cutoff minimum cutoff distance [A] (default: 1.0)
370 */
371 UFFVdWaals(const RDKit::ROMol &mol, int confId = -1,
372 const std::string &probeAtomType = "O_3", double cutoff = 1.0);
373 UFFVdWaals(const UFFVdWaals &other) = delete;
374 UFFVdWaals &operator=(const UFFVdWaals &other) = delete;
375 UFFVdWaals(UFFVdWaals &&other) = default;
376 UFFVdWaals &operator=(UFFVdWaals &&other) = default;
377 ~UFFVdWaals() = default;
378
379 private:
380 double calcEnergy(double, double, double) const; // UFF energy function
381 void fillVdwParamVectors(unsigned int atomIdx);
382 const ForceFields::UFF::ParamCollection *d_uffParamColl;
383 const ForceFields::UFF::AtomicParams *d_probeParams;
385};
386
387//! \brief class for calculation of hydrogen bond potential between probe and
388//! molecule
389/*
390 implementation of GRID molecular H-Bond descriptor:
391 J.Med.Chem. 1989, 32, 1083.
392 J.Med.Chem. 1993, 36, 140.
393 J.Med.Chem. 1993, 36, 148.
394 member variables:
395 d_cutoff: squared minimum cutoff distance [A^2]
396 d_nInteract: No of interactions between probe and molecule
397 d_DAprop: either 'A' or 'D', defines whether target atoms (in
398 molecule) have to be acceptors or donors for interacting with probe
399 d_probetype: defines type of probe atom, either N or O
400 d_targettypes: vectors of types of target atoms (in molecule), either N or O
401 d_pos: vector of positions of target atoms in molecule
402 d_direction: if target accepting, vector of directions of lone pairs on
403 target atoms (if there are two lone pairs, the resulting direction is used) if
404 target donating, the X-H bond direction is saved
405 d_plane: vector of plane vectors in which the lone pairs are
406 */
408 public:
409 HBond() : d_cutoff(1.0), d_probetype(O), d_nInteract(0) {};
410
411 //! \brief constructs HBond object from a molecule object
412 /*!
413 The molecule \c mol needs to have partial charges set as property of atoms.
414 \param mol molecule object
415 \param confId conformation id which is used to get positions of atoms
416 (default=-1)
417 \param probeAtomType atom type for the probe atom ("OH", "O", "NH", "N")
418 \param fixed for some groups, two different angle
419 dependencies are defined in GRID: one which takes some flexibility of groups
420 (rotation/swapping of lone pairs and hydrogen) into account and one for
421 strictly fixed conformations if true, strictly fixed conformations
422 (default: fixed)
423 \param cutoff minimum cutoff distance [A] (default: 1.0)
424 */
425 HBond(const RDKit::ROMol &mol, int confId = -1,
426 const std::string &probeAtomType = "OH", bool fixed = true,
427 double cutoff = 1.0);
428 ~HBond() = default;
429
430 //! \brief returns the hydrogen bonding interaction at point \c pt in the
431 //! molecules field in [kJ mol^-1]
432 /*!
433 \param x, y, z coordinates at which the interaction is calculated
434 \param thres squared max distance until interactions are calc.
435
436 \return hydrogen bonding interaction energy in [kJ mol^-1]
437 */
438 double operator()(double x, double y, double z, double thres) const;
439
440 unsigned int getNumInteractions() const { return d_nInteract; }
441
442 private:
443 boost::uint8_t d_DAprop;
444
445 enum atomtype {
446 N,
447 O
448 };
449 double d_cutoff;
450 atomtype d_probetype;
451 unsigned int d_nInteract; // number of HBond interactions
452
453 std::vector<atomtype> d_targettypes;
454 std::vector<double> d_pos; // vector of positions of target atoms
455 std::vector<double> d_direction; // vector of sum of lone pair vectors
456 std::vector<double> d_lengths; // vector of lengths of direction vectors
457 std::vector<double> d_plane; // vector of lone pair plane vectors
458 // these two are used as a computational cache during operator()
459 mutable std::vector<double>
460 d_eneContrib; // energy contributions of all interactions
461 mutable std::vector<double>
462 d_vectTargetProbe; // hydrogen bond direction of probe
463
464 // constructing functions
465 unsigned int findSpecials(const RDKit::ROMol &mol, int confId, bool fixed,
466 std::vector<unsigned int> &specials);
467 unsigned int findAcceptors(const RDKit::ROMol &mol, int confId,
468 const std::vector<unsigned int> &specials);
469 unsigned int findDonors(const RDKit::ROMol &mol, int confId,
470 const std::vector<unsigned int> &specials);
471 unsigned int findAcceptorsUnfixed(const RDKit::ROMol &mol, int confId,
472 const std::vector<unsigned int> &specials);
473 unsigned int findDonorsUnfixed(const RDKit::ROMol &mol, int confId,
474 const std::vector<unsigned int> &specials);
475
476 void addVectElements(atomtype type, double (*funct)(double, double, double),
477 const RDGeom::Point3D &pos, const RDGeom::Point3D &dir,
478 const RDGeom::Point3D &plane = RDGeom::Point3D(0.0, 0.0,
479 0.0));
480
481 void normalize(double &x, double &y, double &z) const;
482 double angle(double x1, double y1, double z1, double x2, double y2,
483 double z2) const;
484
485 std::vector<double (*)(double, double, double)> d_function;
486};
487
488//! \brief class for calculation of hydrophilic field of molecule
489/*
490 interaction energy of hydrogen and oxygen of water with the molecule is
491 calculated at each point as a hydrogen bond interaction (either OH or O probe).
492 the favored interaction is returned. member variables: d_hbondO
493 HBond descriptor with "O" probe d_hbondOH HBond
494 descriptor with "OH" probe
495 */
497 public:
498 //! \brief constructs Hydrophilic object from a molecule object
499 /*!
500 params:
501 \param mol molecule object
502 \param confId conformation id which is used to get
503 positions of atoms (default: -1)
504 \param fixed for some groups, two different angle
505 dependencies are defined in GRID: one which takes some flexibility of groups
506 (rotation/swapping of lone pairs and hydrogen) into account and one for
507 strictly fixed conformations if true, strictly fixed conformations
508 (default: fixed)
509 \param cutoff minimum cutoff distance [A] (default: 1.0)
510 */
511 Hydrophilic(const RDKit::ROMol &mol, int confId = -1, bool fixed = true,
512 double cutoff = 1.0);
514
515 double operator()(double x, double y, double z, double thres) const;
516
517 private:
518 HBond d_hbondOH, d_hbondO;
519};
520
521//! \brief writes the contents of the MIF to a stream
522/*!
523 The Grid \c grd is written in Gaussian Cube format
524 A molecule \c mol and a \c confId can optionally be provided
525 */
527 const RDGeom::UniformRealValueGrid3D &grd, std::ostream &outStrm,
528 const RDKit::ROMol *mol = nullptr, int confid = -1);
529
530//! \brief writes the contents of the MIF to a file
531/*!
532 The Grid \c grd is written in Gaussian Cube format
533 A molecule \c mol and a \c confId can optionally be provided
534 */
536 const RDGeom::UniformRealValueGrid3D &grd, const std::string &filename,
537 const RDKit::ROMol *mol = nullptr, int confid = -1);
538
539//! \brief reads the contents of the MIF from a stream in Gaussian cube format
540/*!
541 The Grid \c grd is modified according to input values
542 If a molecule was associated to the grid on write, a non-null pointer to a
543 molecule is returned with atoms and a conformer, but NO bond information.
544 If there is no atom information in the cube file, a null pointer is returned.
545 */
546RDKIT_MOLINTERACTIONFIELDS_EXPORT std::unique_ptr<RDKit::RWMol>
548
549//! \brief reads the contents of the MIF from a file in Gaussian cube format
550/*!
551 The Grid \c grd is modified according to input values
552 If a molecule was associated to the grid on write, a non-null pointer to a
553 molecule is returned with atoms and a conformer, but NO bond information.
554 If there is no atom information in the cube file, a null pointer is returned.
555 */
556RDKIT_MOLINTERACTIONFIELDS_EXPORT std::unique_ptr<RDKit::RWMol>
558 const std::string &filename);
559
560} // end of namespace RDMIF
561
562#endif /* RDMIF_DESCRIPTORS_H */
pulls in the core RDKit functionality
class to store MMFF parameters for non-bonded Van der Waals
class to store atomic parameters for the Universal Force Field
Definition UFF/Params.h:68
singleton class for retrieving UFF AtomParams
Definition UFF/Params.h:108
double y
Definition point.h:57
double x
Definition point.h:56
double z
Definition point.h:58
double getSpacing() const
get the grid's spacing
unsigned int getSize() const override
get the size of the grid (number of grid points)
const RDGeom::Point3D & getOffset() const
get the grid's offset
unsigned int getNumZ() const
get the number of grid points along z-axis
unsigned int getNumY() const
get the number of grid points along y-axis
const std::vector< double > & getData() const
brief returns raw vector
unsigned int getNumX() const
get the number of grid points along x-axis
class for calculation of electrostatic interaction (Coulomb energy) between probe and molecule by tak...
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
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]
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
class for calculation of electrostatic interaction (Coulomb energy) between probe and molecule in vac...
Coulomb()=default
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
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]
~Coulomb()=default
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
class for calculation of hydrogen bond potential between probe and molecule
~HBond()=default
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
unsigned int getNumInteractions() const
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]
class for calculation of hydrophilic field of molecule
Hydrophilic(const RDKit::ROMol &mol, int confId=-1, bool fixed=true, double cutoff=1.0)
constructs Hydrophilic object from a molecule object
double operator()(double x, double y, double z, double thres) const
MMFFVdWaals & operator=(const MMFFVdWaals &other)=delete
MMFFVdWaals(const MMFFVdWaals &other)=delete
MMFFVdWaals(MMFFVdWaals &&other)=default
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
~MMFFVdWaals()=default
MMFFVdWaals & operator=(MMFFVdWaals &&other)=default
UFFVdWaals & operator=(UFFVdWaals &&other)=default
UFFVdWaals(UFFVdWaals &&other)=default
UFFVdWaals & operator=(const UFFVdWaals &other)=delete
UFFVdWaals(const UFFVdWaals &other)=delete
~UFFVdWaals()=default
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
Abstract class for calculation of Van der Waals interaction between probe and molecule at gridpoint p...
VdWaals & operator=(VdWaals &&other)=default
VdWaals(const VdWaals &other)=delete
virtual double calcEnergy(double, double, double) const =0
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]
std::vector< double > d_R_star_ij
std::unique_ptr< RDKit::ROMol > d_mol
virtual ~VdWaals()=default
std::vector< double > d_wellDepth
VdWaals()=default
virtual void fillVdwParamVectors(unsigned int atomIdx)=0
void fillVectors()
std::vector< double > d_pos
VdWaals(const RDKit::ROMol &mol, int confId=-1, double cutoff=1.0)
VdWaals(VdWaals &&other)=default
VdWaals & operator=(const VdWaals &other)=delete
#define RDKIT_MOLINTERACTIONFIELDS_EXPORT
Definition export.h:329
std::vector< const ForceFields::UFF::AtomicParams * > AtomicParamVect
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
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
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
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
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
void calculateDescriptors(RDGeom::UniformRealValueGrid3D &grd, const T &functor, double thres=-1.0)
calculates a descriptor at every grid point of MIF