Chemical Data Processing Library C++ API - Version 1.1.1
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 
57  {
58 
59  public:
60  static constexpr double DEF_PROBE_RADIUS = 8.0;
61  static constexpr double DEF_MIN_VDW_SURFACE_DISTANCE = 1.0;
62  static constexpr std::size_t DEF_NUM_TEST_RAYS = 200;
63 
64  BuriednessScore(double probe_radius = DEF_PROBE_RADIUS, double min_vdw_surf_dist = DEF_MIN_VDW_SURFACE_DISTANCE,
65  std::size_t num_test_rays = DEF_NUM_TEST_RAYS);
66 
67  void setProbeRadius(double radius);
68 
69  double getProbeRadius() const;
70 
71  void setMinVdWSurfaceDistance(double dist);
72 
73  double getMinVdWSurfaceDistance() const;
74 
75  void setNumTestRays(std::size_t num_rays);
76 
77  std::size_t getNumTestRays() const;
78 
84 
86 
87  double operator()(const Math::Vector3D& pos, const Chem::AtomContainer& atoms);
88 
89  private:
90  void genSphereSurfacePoints();
91 
92  typedef std::vector<Math::Vector3D> PointList;
93 
94  double probeRadius;
95  double minVdWSurfaceDist;
96  std::size_t numTestRays;
98  PointList probeSurfPoints;
99  Util::BitSet rayHitsMask;
100  };
101  } // namespace GRAIL
102 } // namespace CDPL
103 
104 #endif // CDPL_GRAIL_BURIEDNESSSCORE_HPP
CDPL::GRAIL::BuriednessScore::getMinVdWSurfaceDistance
double getMinVdWSurfaceDistance() const
CDPL::GRAIL::BuriednessScore::setProbeRadius
void setProbeRadius(double radius)
CDPL::Math::Vector3D
CVector< double, 3 > Vector3D
A bounded 3 element vector holding floating point values of type double.
Definition: Vector.hpp:1637
CDPL::Util::BitSet
boost::dynamic_bitset BitSet
A dynamic bitset class.
Definition: BitSet.hpp:46
CDPL::GRAIL::BuriednessScore::getAtom3DCoordinatesFunction
const Chem::Atom3DCoordinatesFunction & getAtom3DCoordinatesFunction() const
CDPL::GRAIL::BuriednessScore::setNumTestRays
void setNumTestRays(std::size_t num_rays)
BitSet.hpp
Definition of the type CDPL::Util::BitSet.
Atom3DCoordinatesFunction.hpp
Type definition of a generic wrapper class for storing user-defined Chem::Atom 3D-coordinates functio...
CDPL::Chem::AtomContainer
A common interface for data-structures that support a random access to stored Chem::Atom instances.
Definition: AtomContainer.hpp:55
CDPL::GRAIL::BuriednessScore::setMinVdWSurfaceDistance
void setMinVdWSurfaceDistance(double dist)
APIPrefix.hpp
Definition of the preprocessor macro CDPL_GRAIL_API.
CDPL::Chem::Atom3DCoordinatesFunction
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
CDPL::GRAIL::BuriednessScore
BuriednessScore.
Definition: BuriednessScore.hpp:57
CDPL
The namespace of the Chemical Data Processing Library.
CDPL_GRAIL_API
#define CDPL_GRAIL_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL::GRAIL::BuriednessScore::BuriednessScore
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)
CDPL::GRAIL::BuriednessScore::getNumTestRays
std::size_t getNumTestRays() const
CDPL::GRAIL::BuriednessScore::getProbeRadius
double getProbeRadius() const
CDPL::GRAIL::BuriednessScore::setAtom3DCoordinatesFunction
void setAtom3DCoordinatesFunction(const Chem::Atom3DCoordinatesFunction &func)
Specifies a function for the retrieval of atom 3D-coordinates for buriedness calculation.
Vector.hpp
Definition of vector data types.
CDPL::GRAIL::BuriednessScore::operator()
double operator()(const Math::Vector3D &pos, const Chem::AtomContainer &atoms)