Chemical Data Processing Library C++ API - Version 1.4.0
BuriednessScore.hpp
Go to the documentation of this file.
1 /*
2  * BuriednessScore.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_GRAIL_BURIEDNESSSCORE_HPP
30 #define CDPL_GRAIL_BURIEDNESSSCORE_HPP
31 
32 #include <cstddef>
33 #include <vector>
34 
35 #include "CDPL/GRAIL/APIPrefix.hpp"
37 #include "CDPL/Math/Vector.hpp"
38 #include "CDPL/Util/BitSet.hpp"
39 
40 
41 namespace CDPL
42 {
43 
44  namespace Chem
45  {
46 
47  class AtomContainer;
48  }
49 
50  namespace GRAIL
51  {
52 
64  {
65 
66  public:
70  static constexpr double DEF_PROBE_RADIUS = 8.0;
71 
75  static constexpr double DEF_MIN_VDW_SURFACE_DISTANCE = 1.0;
76 
80  static constexpr std::size_t DEF_NUM_TEST_RAYS = 200;
81 
88  BuriednessScore(double probe_radius = DEF_PROBE_RADIUS, double min_vdw_surf_dist = DEF_MIN_VDW_SURFACE_DISTANCE,
89  std::size_t num_test_rays = DEF_NUM_TEST_RAYS);
90 
95  void setProbeRadius(double radius);
96 
101  double getProbeRadius() const;
102 
107  void setMinVdWSurfaceDistance(double dist);
108 
113  double getMinVdWSurfaceDistance() const;
114 
119  void setNumTestRays(std::size_t num_rays);
120 
125  std::size_t getNumTestRays() const;
126 
132 
138 
145  double operator()(const Math::Vector3D& pos, const Chem::AtomContainer& atoms);
146 
147  private:
148  void genSphereSurfacePoints();
149 
150  typedef std::vector<Math::Vector3D> PointList;
151 
152  double probeRadius;
153  double minVdWSurfaceDist;
154  std::size_t numTestRays;
156  PointList probeSurfPoints;
157  Util::BitSet rayHitsMask;
158  };
159  } // namespace GRAIL
160 } // namespace CDPL
161 
162 #endif // CDPL_GRAIL_BURIEDNESSSCORE_HPP
Type declaration of a generic wrapper class for storing user-defined Chem::Atom 3D-coordinates functi...
Declaration of type CDPL::Util::BitSet.
Definition of the preprocessor macro CDPL_GRAIL_API.
#define CDPL_GRAIL_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
Functor for the calculation of the buriedness of a 3D query position with respect to the surrounding ...
Definition: BuriednessScore.hpp:64
double operator()(const Math::Vector3D &pos, const Chem::AtomContainer &atoms)
Calculates the buriedness score of the query position pos with respect to atoms.
void setAtom3DCoordinatesFunction(const Chem::Atom3DCoordinatesFunction &func)
Specifies a function for the retrieval of atom 3D-coordinates for buriedness calculation.
void setMinVdWSurfaceDistance(double dist)
Sets the minimum required distance between a ray and the van der Waals surface of an atom.
void setProbeRadius(double radius)
Sets the probe sphere radius.
double getProbeRadius() const
Returns the currently configured probe sphere radius.
std::size_t getNumTestRays() const
Returns the currently configured number of test rays.
double getMinVdWSurfaceDistance() const
Returns the currently configured minimum distance to the van der Waals surface of an atom.
BuriednessScore(double probe_radius=DEF_PROBE_RADIUS, double min_vdw_surf_dist=DEF_MIN_VDW_SURFACE_DISTANCE, std::size_t num_test_rays=DEF_NUM_TEST_RAYS)
Constructs a BuriednessScore instance with the given configuration.
void setNumTestRays(std::size_t num_rays)
Sets the number of test rays cast from the query position.
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
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
boost::dynamic_bitset BitSet
A dynamic bitset class.
Definition: BitSet.hpp:46
The namespace of the Chemical Data Processing Library.