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.
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
68 bool includeLigand = true, double probeRadius = 1.4,
69 int confId = -1)
70 : DoubleCubicLatticeVolume(mol, std::vector<double>(), isProtein,
72
73 // value returns
74
75 /*! \return Solvent Accessible Surface Area */
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 bool allPoints = false);
90
91 /*! \return Volume bound by probe sphere */
92 double getVolume();
93
94 /*! \return van der Waals Volume */
95 double getVDWVolume();
96
97 /*! \return Polar Volume */
98 double getPolarVolume(bool includeSandP, bool includeHs);
99
100 /*! \return Volume from specified atoms */
101 double getPartialVolume(const boost::dynamic_bitset<> &incAtoms);
102
103 /*! \return Volume for specified atom */
104 double getAtomVolume(unsigned int atomIdx, double solventRadius);
105
106 /*! \return Compactness of the protein */
108
109 /*! \return Packing Density of the protein */
111
112 private:
113 // used by methods
114 unsigned int numAtoms = 0;
115 std::vector<RDGeom::Point3D> positions;
116 std::vector<std::vector<unsigned int>> neighbours;
117 RDGeom::Point3D centreOfGravity;
118
119 // outputs
120 double surfaceArea = 0.0;
121 double totalVolume = 0.0;
122 double vdwVolume = 0.0;
123 std::map<unsigned int, std::vector<RDGeom::Point3D>> surfacePoints;
124 std::map<unsigned int, std::vector<RDGeom::Point3D>> allSurfacePoints;
125
126 // helpers
127 bool testPoint(const RDGeom::Point3D &vect, double solvrad,
128 const std::vector<unsigned int> &nbrs);
129};
130} // namespace Descriptors
131} // namespace RDKit
132#endif
pulls in RWMol and ROMol
pulls in the core RDKit functionality
double getAtomSurfaceArea(unsigned int atomIdx)
double getPartialVolume(const boost::dynamic_bitset<> &incAtoms)
double getPolarSurfaceArea(bool includeSandP, bool includeHs)
DoubleCubicLatticeVolume(const ROMol &mol, bool isProtein=false, bool includeLigand=true, double probeRadius=1.4, int confId=-1)
Definition DCLV.h:67
double getPolarVolume(bool includeSandP, bool includeHs)
std::map< unsigned int, std::vector< RDGeom::Point3D > > & getSurfacePoints(bool allPoints=false)
double getAtomVolume(unsigned int atomIdx, double solventRadius)
DoubleCubicLatticeVolume(const ROMol &mol, std::vector< double > radii, bool isProtein=false, bool includeLigand=true, double probeRadius=1.4, int confId=-1)
double getPartialSurfaceArea(const boost::dynamic_bitset<> &incAtoms)
#define RDKIT_DESCRIPTORS_EXPORT
Definition export.h:141
Std stuff.