12#ifndef RDMIF_DESCRIPTORS_H
13#define RDMIF_DESCRIPTORS_H
49 const RDKit::ROMol &mol,
int confId = -1,
double margin = 5.0,
50 double spacing = 0.5);
65 double thres = -1.0) {
74 thres = spacing * grd.
getSize();
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);
128 const std::vector<RDGeom::Point3D> &positions,
129 double probeCharge = 1.0,
bool absVal =
false,
double alpha = 0.0,
130 double cutoff = 1.0);
150 bool absVal =
false,
const std::string &prop =
"_GasteigerCharge",
151 double alpha = 0.0,
double cutoff = 1.0);
161 double operator()(
double x,
double y,
double z,
double thres)
const;
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;
214 d_dielectric = (d_xi - d_epsilon) / (d_xi + d_epsilon);
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);
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);
270 double operator()(
double x,
double y,
double z,
double thres)
const;
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;
278 std::vector<double> d_charges, d_sp;
279 std::vector<double> d_pos;
281 mutable std::vector<double> d_dists;
315 double operator()(
double x,
double y,
double z,
double thres)
const;
321 double d_cutoff = 1.0;
322 unsigned int d_nAtoms = 0;
326 std::unique_ptr<RDKit::ROMol>
d_mol;
343 unsigned int probeAtomType = 6,
bool scaling =
false,
344 double cutoff = 1.0);
352 double calcEnergy(
double,
double,
double)
const;
353 void fillVdwParamVectors(
unsigned int atomIdx);
355 std::unique_ptr<RDKit::MMFF::MMFFMolProperties> d_props;
372 const std::string &probeAtomType =
"O_3",
double cutoff = 1.0);
380 double calcEnergy(
double,
double,
double)
const;
381 void fillVdwParamVectors(
unsigned int atomIdx);
409 HBond() : d_cutoff(1.0), d_probetype(O), d_nInteract(0) {};
426 const std::string &probeAtomType =
"OH",
bool fixed =
true,
427 double cutoff = 1.0);
438 double operator()(
double x,
double y,
double z,
double thres)
const;
443 boost::uint8_t d_DAprop;
450 atomtype d_probetype;
451 unsigned int d_nInteract;
453 std::vector<atomtype> d_targettypes;
454 std::vector<double> d_pos;
455 std::vector<double> d_direction;
456 std::vector<double> d_lengths;
457 std::vector<double> d_plane;
459 mutable std::vector<double>
461 mutable std::vector<double>
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);
476 void addVectElements(atomtype type,
double (*funct)(
double,
double,
double),
481 void normalize(
double &x,
double &y,
double &z)
const;
482 double angle(
double x1,
double y1,
double z1,
double x2,
double y2,
485 std::vector<double (*)(double, double, double)> d_function;
512 double cutoff = 1.0);
515 double operator()(
double x,
double y,
double z,
double thres)
const;
518 HBond d_hbondOH, d_hbondO;
558 const std::string &filename);
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
singleton class for retrieving UFF AtomParams
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(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(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(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 & 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(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
virtual void fillVdwParamVectors(unsigned int atomIdx)=0
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
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