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;
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,
353 double)
const override;
354 void fillVdwParamVectors(
unsigned int atomIdx)
override;
356 std::unique_ptr<RDKit::MMFF::MMFFMolProperties> d_props;
373 const std::string &probeAtomType =
"O_3",
double cutoff = 1.0);
381 double calcEnergy(
double,
double,
382 double)
const override;
383 void fillVdwParamVectors(
unsigned int atomIdx)
override;
411 HBond() : d_cutoff(1.0), d_probetype(O), d_nInteract(0) {};
428 const std::string &probeAtomType =
"OH",
bool fixed =
true,
429 double cutoff = 1.0);
440 double operator()(
double x,
double y,
double z,
double thres)
const;
445 boost::uint8_t d_DAprop;
452 atomtype d_probetype;
453 unsigned int d_nInteract;
455 std::vector<atomtype> d_targettypes;
456 std::vector<double> d_pos;
457 std::vector<double> d_direction;
458 std::vector<double> d_lengths;
459 std::vector<double> d_plane;
461 mutable std::vector<double>
463 mutable std::vector<double>
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);
478 void addVectElements(atomtype type,
double (*funct)(
double,
double,
double),
483 void normalize(
double &x,
double &y,
double &z)
const;
484 double angle(
double x1,
double y1,
double z1,
double x2,
double y2,
487 std::vector<double (*)(double, double, double)> d_function;
514 double cutoff = 1.0);
517 double operator()(
double x,
double y,
double z,
double thres)
const;
520 HBond d_hbondOH, d_hbondO;
560 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
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
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]
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() override=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() override=default
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
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