Chemical Data Processing Library C++ API - Version 1.4.0
KuvekPocketDescriptorCalculator.hpp
Go to the documentation of this file.
1 /*
2  * KuvekPocketDescriptorCalculator.hpp
3  *
4  * This file is part of the Chemical Data Processing Toolkit
5  *
6  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
29 #ifndef CDPL_DESCR_BURIEDNESSSCORE_HPP
30 #define CDPL_DESCR_BURIEDNESSSCORE_HPP
31 
32 #include <cstddef>
33 #include <vector>
34 #include <functional>
35 
36 #include "CDPL/Descr/APIPrefix.hpp"
38 #include "CDPL/Math/Vector.hpp"
39 
40 
41 namespace CDPL
42 {
43 
44  namespace Chem
45  {
46 
47  class AtomContainer;
48  }
49 
50  namespace Descr
51  {
52 
59  {
60 
61  public:
65  static constexpr double DEF_PROBE_RADIUS = 20.0;
66 
70  static constexpr double DEF_MAX_ATOM_TO_SPHERE_SURF_DIST = 2.0;
71 
75  static constexpr std::size_t DEF_NUM_TEST_VECTORS = 492;
76 
80  typedef std::function<double(const Chem::Atom&)> AtomChargeFunction;
81 
88  KuvekPocketDescriptorCalculator(double sphere_radius = DEF_PROBE_RADIUS,
89  std::size_t num_test_vecs = DEF_NUM_TEST_VECTORS,
90  double max_atom_to_sphr_surf_dist = DEF_MAX_ATOM_TO_SPHERE_SURF_DIST);
91 
96  void setSphereRadius(double radius);
97 
102  double getSphereRadius() const;
103 
109 
115 
120  void setNumTestVectors(std::size_t num_vectors);
121 
126  std::size_t getNumTestVectors() const;
127 
134  const Math::Vector3D& getTestVector(std::size_t idx);
135 
141 
147 
154 
160 
167  void calculate(const Math::Vector3D& sphere_ctr, const Chem::AtomContainer& atoms, Math::DVector& descr);
168 
169  private:
170  void genTestVectors();
171 
172  typedef std::vector<Math::Vector3D> PointList;
173 
174  double sphereRadius;
175  std::size_t numTestVectors;
176  double maxAtomToSphereSurfDist;
178  AtomChargeFunction chargeFunc;
179  PointList testVectors;
180  };
181  } // namespace DESCR
182 } // namespace CDPL
183 
184 #endif // CDPL_DESCR_BURIEDNESSSCORE_HPP
Type declaration of a generic wrapper class for storing user-defined Chem::Atom 3D-coordinates functi...
Definition of the preprocessor macro CDPL_DESCR_API.
#define CDPL_DESCR_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of vector data types.
Common interface for data structures that support a random access to stored Chem::Atom instances.
Definition: AtomContainer.hpp:55
Abstract base class representing a chemical atom and its bonded neighborhood.
Definition: Atom.hpp:57
Implements the algorithm devised by Kuvek et al. [KBPD] for the calculation of receptor binding pocke...
Definition: KuvekPocketDescriptorCalculator.hpp:59
void setNumTestVectors(std::size_t num_vectors)
Sets the number of test vectors used to sample the probe sphere surface.
const Math::Vector3D & getTestVector(std::size_t idx)
Returns the test vector at index idx (generated on demand).
double getSphereRadius() const
Returns the currently configured probe sphere radius.
void setAtomChargeFunction(const AtomChargeFunction &func)
Specifies a function for the retrieval of atom charges.
const AtomChargeFunction & getAtomChargeFunction() const
Returns the function used for the retrieval of atom charges.
void calculate(const Math::Vector3D &sphere_ctr, const Chem::AtomContainer &atoms, Math::DVector &descr)
Calculates the Kuvek pocket descriptor at the given query position.
double getMaxAtomToSphereSurfaceDistance() const
Returns the currently configured maximum atom-to-sphere-surface distance.
KuvekPocketDescriptorCalculator(double sphere_radius=DEF_PROBE_RADIUS, std::size_t num_test_vecs=DEF_NUM_TEST_VECTORS, double max_atom_to_sphr_surf_dist=DEF_MAX_ATOM_TO_SPHERE_SURF_DIST)
Constructs a KuvekPocketDescriptorCalculator instance with the given configuration.
void setMaxAtomToSphereSurfaceDistance(double dist)
Sets the maximum distance between an atom and the probe sphere surface for the atom to contribute.
std::function< double(const Chem::Atom &)> AtomChargeFunction
Type of the generic functor used to retrieve the partial charge of an atom.
Definition: KuvekPocketDescriptorCalculator.hpp:80
void setAtom3DCoordinatesFunction(const Chem::Atom3DCoordinatesFunction &func)
Specifies a function for the retrieval of atom 3D-coordinates.
void setSphereRadius(double radius)
Sets the probe sphere radius.
std::size_t getNumTestVectors() const
Returns the currently configured number of test vectors.
const Chem::Atom3DCoordinatesFunction & getAtom3DCoordinatesFunction() const
Returns the function used for the retrieval of atom 3D-coordinates.
std::function< const Math::Vector3D &(const Chem::Atom &)> Atom3DCoordinatesFunction
Generic wrapper class used to store a user-defined Chem::Atom 3D-coordinates function.
Definition: Atom3DCoordinatesFunction.hpp:43
CVector< double, 3 > Vector3D
Bounded 3 element vector holding floating point values of type double.
Definition: Vector.hpp:2937
The namespace of the Chemical Data Processing Library.