Chemical Data Processing Library C++ API - Version 1.4.0
BuriednessGridCalculator.hpp
Go to the documentation of this file.
1 /*
2  * BuriednessGridCalculator.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_BURIEDNESSGRIDCALCULATOR_HPP
30 #define CDPL_GRAIL_BURIEDNESSGRIDCALCULATOR_HPP
31 
32 #include <vector>
33 #include <cstddef>
34 #include <memory>
35 
36 #include "CDPL/GRAIL/APIPrefix.hpp"
38 #include "CDPL/Chem/Fragment.hpp"
40 #include "CDPL/Math/Vector.hpp"
42 
43 
44 namespace CDPL
45 {
46 
47  namespace Internal
48  {
49 
50  template <typename PT, typename CT, typename ST>
51  class Octree;
52  }
53 
54  namespace GRAIL
55  {
56 
66  {
67 
68  public:
72  typedef std::shared_ptr<BuriednessGridCalculator> SharedPointer;
73 
78 
84 
89  void setProbeRadius(double radius);
90 
95  double getProbeRadius() const;
96 
101  void setMinVdWSurfaceDistance(double dist);
102 
107  double getMinVdWSurfaceDistance() const;
108 
113  void setNumTestRays(std::size_t num_rays);
114 
119  std::size_t getNumTestRays() const;
120 
126 
132 
139 
146 
147  private:
148  typedef Internal::Octree<Math::Vector3D, Math::Vector3DArray, double> Octree;
149  typedef std::shared_ptr<Octree> OctreePtr;
150  typedef std::vector<std::size_t> AtomIndexList;
151 
152  BuriednessScore buriednessScore;
153  OctreePtr octree;
154  Math::Vector3DArray atomCoords;
155  AtomIndexList atomIndices;
156  Chem::Fragment atomSubset;
157  };
158  } // namespace GRAIL
159 } // namespace CDPL
160 
161 #endif // CDPL_GRAIL_BURIEDNESSGRIDCALCULATOR_HPP
Definition of class CDPL::GRAIL::BuriednessScore.
Definition of class CDPL::Chem::Fragment.
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 a spatial grid data type.
Definition of class CDPL::Math::VectorArray.
Definition of vector data types.
Common interface for data structures that support a random access to stored Chem::Atom instances.
Definition: AtomContainer.hpp:55
Concrete Chem::MolecularGraph implementation that stores references to a selectable subset of atoms a...
Definition: Fragment.hpp:57
Calculator that fills a spatial grid with per-cell buriedness scores derived from GRAIL::BuriednessSc...
Definition: BuriednessGridCalculator.hpp:66
void setNumTestRays(std::size_t num_rays)
Sets the number of test rays cast from each grid cell.
std::size_t getNumTestRays() const
Returns the currently configured number of test rays.
const Chem::Atom3DCoordinatesFunction & getAtom3DCoordinatesFunction() const
Returns the function used for the retrieval of atom 3D coordinates.
BuriednessGridCalculator()
Constructs the BuriednessGridCalculator instance.
BuriednessGridCalculator & operator=(const BuriednessGridCalculator &calc)
Copy assignment operator.
void setProbeRadius(double radius)
Sets the probe sphere radius used by the underlying GRAIL::BuriednessScore.
std::shared_ptr< BuriednessGridCalculator > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated BuriednessGridCalculator instance...
Definition: BuriednessGridCalculator.hpp:72
void setAtom3DCoordinatesFunction(const Chem::Atom3DCoordinatesFunction &func)
Specifies a function for the retrieval of atom 3D coordinates for grid calculation.
double getMinVdWSurfaceDistance() const
Returns the currently configured minimum distance to the Van der Waals surface of an atom.
void calculate(const Chem::AtomContainer &atoms, Grid::DSpatialGrid &grid)
Calculates the buriedness value at each cell of grid for the given atoms.
void setMinVdWSurfaceDistance(double dist)
Sets the minimum required distance between a ray and the Van der Waals surface of an atom.
BuriednessGridCalculator(const BuriednessGridCalculator &calc)
Constructs a copy of the BuriednessGridCalculator instance calc.
double getProbeRadius() const
Returns the currently configured probe sphere radius.
Functor for the calculation of the buriedness of a 3D query position with respect to the surrounding ...
Definition: BuriednessScore.hpp:64
Abstract base class for attributed grids whose elements have a defined 3D position in space.
Definition: SpatialGrid.hpp:53
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
VectorArray< Vector3D > Vector3DArray
Array storing vectors of type Math::Vector3D.
Definition: VectorArray.hpp:87
The namespace of the Chemical Data Processing Library.