RDKit: DCLV.h Source File

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
DCLV.h
Go to the documentation of this file.
1/*=================================================================*/
2/* Copyright (C) 2024 Greg Landrum and other RDKit contributors */
3/* Contributed by NextMove Software, Cambridge, UK. */
4/* */
5/* */
6/* @@ All Rights Reserved @@ */
7/* The contents are covered by the terms of the */
8/* BSD license, which is included in the file */
9/* license.txt. */
10/*=================================================================*/
11
12#ifndef RDKIT_DCLV_H
13#define RDKIT_DCLV_H
14
15#include <string>
16#include <list>
17#include <cmath>
18
19#include <GraphMol/GraphMol.h>
20#include <GraphMol/MolOps.h>
21#include <Geometry/point.h>
22#include <GraphMol/RDKitBase.h>
23#include <RDGeneral/export.h>
24#include <boost/dynamic_bitset.hpp>
25
26namespace RDKit {
27namespace Descriptors {
28
29//! Class for calculation of the Shrake and Rupley surface area and volume
30//! using the Double Cubic Lattice Method.
31//!
32//! Frank Eisenhaber, Philip Lijnzaad, Patrick Argos, Chris Sander and
33//! Michael Scharf, "The Double Cubic Lattice Method: Efficient Approaches
34//! to Numerical Integration of Surface Area and Volume and to Dot Surface
35//! Contouring of Molecular Assemblies", Journal of Computational Chemistry,
36//! Vol. 16, No. 3, pp. 273-284, 1995.
37 class RDKIT_DESCRIPTORS_EXPORT DoubleCubicLatticeVolume {
38 public:
39 // default params assume a small molecule and default conformer
40 const ROMol &mol;
41 std::vector<double> radii_;
42 bool isProtein = false;
43 bool includeLigand = true;
44 double probeRadius = 1.4;
45 int confId = -1;
46 double maxRadius = 1.7; // treat default max radius as Carbon
47
48 /*!
49
50 \param mol: input molecule or protein
51 \param radii: radii for atoms of input mol, empty for default values
52 \param isProtein: flag to calculate burried surface area of a protein ligand
53 complex [default=false, free ligand]
54 \param includeLigand: flag to trigger
55 inclusion of bound ligand in surface area and volume calculations where
56 molecule is a protein [default=true]
57 \param probeRadius: radius of the
58 sphere representing the probe solvent atom [default=1.4]
59 \param confId: conformer ID to consider [default=-1]
60
61 */
62 DoubleCubicLatticeVolume(const ROMol &mol, std::vector<double> radii,
63 bool isProtein = false, bool includeLigand = true,
64 double probeRadius = 1.4, int confId = -1);
65
66 //! \overload uses default vdw radii
67 DoubleCubicLatticeVolume(const ROMol &mol, bool isProtein = false,
68 bool includeLigand = true, double probeRadius = 1.4,
69 int confId = -1)
70 : DoubleCubicLatticeVolume(mol, std::vector<double>(), isProtein,
71 includeLigand, probeRadius, confId) {};
72
73 // value returns
74
75 /*! \return Solvent Accessible Surface Area */
76 double getSurfaceArea();
77
78 /*! \return Polar Surface Area */
79 double getPolarSurfaceArea(bool includeSandP, bool includeHs);
80
81 /*! \return Surface Area from specified atoms */
82 double getPartialSurfaceArea(const boost::dynamic_bitset<> &incAtoms);
83
84 /*! \return Solvent Accessible Surface Area for specified atom */
85 double getAtomSurfaceArea(unsigned int atomIdx);
86
87 /*! \return Set of Points representing the surface */
88 std::map<unsigned int, std::vector<RDGeom::Point3D>> &getSurfacePoints();
89
90 /*! \return Volume bound by probe sphere */
91 double getVolume();
92
93 /*! \return van der Waals Volume */
94 double getVDWVolume();
95
96 /*! \return Polar Volume */
97 double getPolarVolume(bool includeSandP, bool includeHs);
98
99 /*! \return Volume from specified atoms */
100 double getPartialVolume(const boost::dynamic_bitset<> &incAtoms);
101
102 /*! \return Volume for specified atom */
103 double getAtomVolume(unsigned int atomIdx, double solventRadius);
104
105 /*! \return Compactness of the protein */
106 double getCompactness();
107
108 /*! \return Packing Density of the protein */
109 double getPackingDensity();
110
111 private:
112 // used by methods
113 unsigned int numAtoms = 0;
114 std::vector<RDGeom::Point3D> positions;
115 std::vector<std::vector<unsigned int>> neighbours;
116 RDGeom::Point3D centreOfGravity;
117
118 // outputs
119 double surfaceArea = 0.0;
120 double totalVolume = 0.0;
121 double vdwVolume = 0.0;
122 std::map<unsigned int, std::vector<RDGeom::Point3D>> surfacePoints;
123
124 // helpers
125 bool testPoint(const RDGeom::Point3D &vect, double solvrad,
126 const std::vector<unsigned int> &nbrs);
127};
128} // namespace Descriptors
129} // namespace RDKit
130#endif
GraphMol.h
pulls in RWMol and ROMol
MolOps.h
RDKitBase.h
pulls in the core RDKit functionality
RDGeom::Point3D
Definition point.h:53
RDKit::Descriptors::DoubleCubicLatticeVolume::confId
int confId
Definition DCLV.h:45
RDKit::Descriptors::DoubleCubicLatticeVolume::getAtomSurfaceArea
double getAtomSurfaceArea(unsigned int atomIdx)
RDKit::Descriptors::DoubleCubicLatticeVolume::getPartialVolume
double getPartialVolume(const boost::dynamic_bitset<> &incAtoms)
RDKit::Descriptors::DoubleCubicLatticeVolume::mol
const ROMol & mol
Definition DCLV.h:40
RDKit::Descriptors::DoubleCubicLatticeVolume::isProtein
bool isProtein
Definition DCLV.h:42
RDKit::Descriptors::DoubleCubicLatticeVolume::getSurfacePoints
std::map< unsigned int, std::vector< RDGeom::Point3D > > & getSurfacePoints()
RDKit::Descriptors::DoubleCubicLatticeVolume::radii_
std::vector< double > radii_
Definition DCLV.h:41
RDKit::Descriptors::DoubleCubicLatticeVolume::getCompactness
double getCompactness()
RDKit::Descriptors::DoubleCubicLatticeVolume::getPolarSurfaceArea
double getPolarSurfaceArea(bool includeSandP, bool includeHs)
RDKit::Descriptors::DoubleCubicLatticeVolume::DoubleCubicLatticeVolume
DoubleCubicLatticeVolume(const ROMol &mol, bool isProtein=false, bool includeLigand=true, double probeRadius=1.4, int confId=-1)
Definition DCLV.h:67
RDKit::Descriptors::DoubleCubicLatticeVolume::getPolarVolume
double getPolarVolume(bool includeSandP, bool includeHs)
RDKit::Descriptors::DoubleCubicLatticeVolume::getVolume
double getVolume()
RDKit::Descriptors::DoubleCubicLatticeVolume::getAtomVolume
double getAtomVolume(unsigned int atomIdx, double solventRadius)
RDKit::Descriptors::DoubleCubicLatticeVolume::getPackingDensity
double getPackingDensity()
RDKit::Descriptors::DoubleCubicLatticeVolume::getVDWVolume
double getVDWVolume()
RDKit::Descriptors::DoubleCubicLatticeVolume::DoubleCubicLatticeVolume
DoubleCubicLatticeVolume(const ROMol &mol, std::vector< double > radii, bool isProtein=false, bool includeLigand=true, double probeRadius=1.4, int confId=-1)
RDKit::Descriptors::DoubleCubicLatticeVolume::includeLigand
bool includeLigand
Definition DCLV.h:43
RDKit::Descriptors::DoubleCubicLatticeVolume::maxRadius
double maxRadius
Definition DCLV.h:46
RDKit::Descriptors::DoubleCubicLatticeVolume::probeRadius
double probeRadius
Definition DCLV.h:44
RDKit::Descriptors::DoubleCubicLatticeVolume::getSurfaceArea
double getSurfaceArea()
RDKit::Descriptors::DoubleCubicLatticeVolume::getPartialSurfaceArea
double getPartialSurfaceArea(const boost::dynamic_bitset<> &incAtoms)
RDKit::ROMol
Definition ROMol.h:199
export.h
RDKIT_DESCRIPTORS_EXPORT
#define RDKIT_DESCRIPTORS_EXPORT
Definition export.h:113
RDKit::Descriptors
Definition AtomFeat.h:30
RDKit
Std stuff.
Definition Abbreviations.h:19
point.h