Chemical Data Processing Library C++ API - Version 1.3.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:
62  static constexpr double DEF_PROBE_RADIUS = 20.0;
63  static constexpr double DEF_MAX_ATOM_TO_SPHERE_SURF_DIST = 2.0;
64  static constexpr std::size_t DEF_NUM_TEST_VECTORS = 492;
65 
66  typedef std::function<double(const Chem::Atom&)> AtomChargeFunction;
67 
68  KuvekPocketDescriptorCalculator(double sphere_radius = DEF_PROBE_RADIUS,
69  std::size_t num_test_vecs = DEF_NUM_TEST_VECTORS,
70  double max_atom_to_sphr_surf_dist = DEF_MAX_ATOM_TO_SPHERE_SURF_DIST);
71 
72  void setSphereRadius(double radius);
73 
74  double getSphereRadius() const;
75 
77 
79 
80  void setNumTestVectors(std::size_t num_vectors);
81 
82  std::size_t getNumTestVectors() const;
83 
84  const Math::Vector3D& getTestVector(std::size_t idx);
85 
91 
93 
100 
102 
103  void calculate(const Math::Vector3D& sphere_ctr, const Chem::AtomContainer& atoms, Math::DVector& descr);
104 
105  private:
106  void genTestVectors();
107 
108  typedef std::vector<Math::Vector3D> PointList;
109 
110  double sphereRadius;
111  std::size_t numTestVectors;
112  double maxAtomToSphereSurfDist;
114  AtomChargeFunction chargeFunc;
115  PointList testVectors;
116  };
117  } // namespace DESCR
118 } // namespace CDPL
119 
120 #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.
A common interface for data-structures that support a random access to stored Chem::Atom instances.
Definition: AtomContainer.hpp:55
Atom.
Definition: Atom.hpp:52
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)
const Math::Vector3D & getTestVector(std::size_t idx)
void setAtomChargeFunction(const AtomChargeFunction &func)
Specifies a function for the retrieval of atom charges.
const AtomChargeFunction & getAtomChargeFunction() const
void calculate(const Math::Vector3D &sphere_ctr, const Chem::AtomContainer &atoms, Math::DVector &descr)
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)
std::function< double(const Chem::Atom &)> AtomChargeFunction
Definition: KuvekPocketDescriptorCalculator.hpp:66
void setAtom3DCoordinatesFunction(const Chem::Atom3DCoordinatesFunction &func)
Specifies a function for the retrieval of atom 3D-coordinates.
const Chem::Atom3DCoordinatesFunction & getAtom3DCoordinatesFunction() const
std::function< const Math::Vector3D &(const Chem::Atom &)> Atom3DCoordinatesFunction
A generic wrapper class used to store a user-defined Chem::Atom 3D-coordinates function.
Definition: Atom3DCoordinatesFunction.hpp:43
CVector< double, 3 > Vector3D
A bounded 3 element vector holding floating point values of type double.
Definition: Vector.hpp:1637
The namespace of the Chemical Data Processing Library.