RDKit
Open-source cheminformatics and machine learning.
Toggle main menu visibility
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
26
namespace
RDKit
{
27
namespace
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
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 */
107
double
getCompactness
();
108
109
/*! \return Packing Density of the protein */
110
double
getPackingDensity
();
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
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::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::getSurfacePoints
std::map< unsigned int, std::vector< RDGeom::Point3D > > & getSurfacePoints(bool allPoints=false)
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:344
export.h
RDKIT_DESCRIPTORS_EXPORT
#define RDKIT_DESCRIPTORS_EXPORT
Definition
export.h:141
RDKit::Descriptors
Definition
AtomFeat.h:32
RDKit
Std stuff.
Definition
Abbreviations.h:19
point.h
GraphMol
Descriptors
DCLV.h
Generated on
for RDKit by
1.17.0