Chemical Data Processing Library C++ API - Version 1.1.1
GaussianShapeFunction.hpp
Go to the documentation of this file.
1 /*
2  * GaussianShapeFunction.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_SHAPE_GAUSSIANSHAPEFUNCTION_HPP
30 #define CDPL_SHAPE_GAUSSIANSHAPEFUNCTION_HPP
31 
32 #include <cstddef>
33 #include <memory>
34 
35 #include "CDPL/Shape/APIPrefix.hpp"
36 #include "CDPL/Math/Vector.hpp"
37 #include "CDPL/Math/Matrix.hpp"
39 
40 
41 namespace CDPL
42 {
43 
44  namespace Shape
45  {
46 
47  class GaussianShape;
48  class GaussianProductList;
49  class ExactGaussianShapeOverlapFunction;
50  class FastGaussianShapeOverlapFunction;
51 
53  {
54 
55  public:
56  static constexpr std::size_t DEF_MAX_PRODUCT_ORDER = 6;
57  static constexpr double DEF_DISTANCE_CUTOFF = 0.0;
58 
59  typedef std::shared_ptr<GaussianShapeFunction> SharedPointer;
60 
62 
64 
66 
68 
69  void setMaxOrder(std::size_t max_order);
70 
71  std::size_t getMaxOrder() const;
72 
73  void setDistanceCutoff(double cutoff);
74 
75  double getDistanceCutoff() const;
76 
77  void setShape(const GaussianShape& shape);
78 
79  const GaussianShape* getShape() const;
80 
81  void reset();
82 
83  void transform(const Math::Matrix4D& xform);
84 
85  const Math::Vector3D& getElementPosition(std::size_t idx) const;
86 
88 
89  double calcDensity(const Math::Vector3D& pos) const;
90 
91  double calcVolume() const;
92 
93  double calcSurfaceArea() const;
94 
95  double calcSurfaceArea(std::size_t elem_idx) const;
96 
97  void calcCentroid(Math::Vector3D& ctr) const;
98 
99  void calcQuadrupoleTensor(const Math::Vector3D& ctr, Math::Matrix3D& quad_tensor) const;
100 
102 
103  private:
106 
107  const GaussianProductList* getProductList() const;
108 
109  typedef std::unique_ptr<GaussianProductList> ProductListPtr;
110 
111  const GaussianShape* shape;
112  double volume;
113  ProductListPtr prodList;
114  };
115  } // namespace Shape
116 } // namespace CDPL
117 
118 #endif // CDPL_SHAPE_GAUSSIANSHAPEFUNCTION_HPP
CDPL::Shape::GaussianShapeFunction::calcCentroid
void calcCentroid(Math::Vector3D &ctr) const
CMatrix< double, 4, 4 >
VectorArray.hpp
Definition of the class CDPL::Math::VectorArray.
CDPL::Shape::GaussianShapeFunction::calcDensity
double calcDensity(const Math::Vector3D &pos) const
CDPL::Shape::GaussianShapeFunction::reset
void reset()
CDPL::Math::Vector3D
CVector< double, 3 > Vector3D
A bounded 3 element vector holding floating point values of type double.
Definition: Vector.hpp:1637
CDPL::Shape::GaussianShapeFunction::getDistanceCutoff
double getDistanceCutoff() const
CDPL::Shape::GaussianShapeFunction::GaussianShapeFunction
GaussianShapeFunction(const GaussianShapeFunction &func)
CDPL::Shape::GaussianShapeFunction::GaussianShapeFunction
GaussianShapeFunction(const GaussianShape &shape)
CDPL::Shape::GaussianShapeFunction::operator=
GaussianShapeFunction & operator=(const GaussianShapeFunction &func)
CDPL::Shape::GaussianShapeFunction::SharedPointer
std::shared_ptr< GaussianShapeFunction > SharedPointer
Definition: GaussianShapeFunction.hpp:59
VectorArray< Vector3D >
CDPL::Shape::GaussianShapeFunction::getMaxOrder
std::size_t getMaxOrder() const
CDPL::Shape::GaussianShapeFunction::calcVolume
double calcVolume() const
CDPL::Shape::GaussianShape
A data type for the descripton of arbitrary shapes composed of spheres approximated by gaussian funct...
Definition: GaussianShape.hpp:51
CDPL::Shape::GaussianShapeFunction::getElementPositions
void getElementPositions(Math::Vector3DArray &coords) const
CDPL::Shape::GaussianShapeFunction::transform
void transform(const Math::Matrix4D &xform)
CDPL::Math::Matrix3D
CMatrix< double, 3, 3 > Matrix3D
A bounded 3x3 matrix holding floating point values of type double.
Definition: Matrix.hpp:1849
CDPL::Shape::GaussianShapeFunction::calcQuadrupoleTensor
void calcQuadrupoleTensor(const Math::Vector3D &ctr, Math::Matrix3D &quad_tensor) const
CDPL::Shape::GaussianShapeFunction
Definition: GaussianShapeFunction.hpp:53
CDPL_SHAPE_API
#define CDPL_SHAPE_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL::Shape::GaussianShapeFunction::calcSurfaceArea
double calcSurfaceArea() const
CDPL::Shape::FastGaussianShapeOverlapFunction
Definition: FastGaussianShapeOverlapFunction.hpp:47
CDPL
The namespace of the Chemical Data Processing Library.
APIPrefix.hpp
Definition of the preprocessor macro CDPL_SHAPE_API.
CDPL::Shape::GaussianShapeFunction::GaussianShapeFunction
GaussianShapeFunction()
CDPL::Shape::GaussianShapeFunction::setDistanceCutoff
void setDistanceCutoff(double cutoff)
CDPL::Shape::GaussianShapeFunction::~GaussianShapeFunction
~GaussianShapeFunction()
CDPL::Shape::GaussianShapeFunction::calcSurfaceArea
double calcSurfaceArea(std::size_t elem_idx) const
Matrix.hpp
Definition of matrix data types.
CDPL::Shape::GaussianShapeFunction::setMaxOrder
void setMaxOrder(std::size_t max_order)
CDPL::Shape::ExactGaussianShapeOverlapFunction
Definition: ExactGaussianShapeOverlapFunction.hpp:47
CDPL::Shape::GaussianShapeFunction::getShape
const GaussianShape * getShape() const
CDPL::Shape::GaussianShapeFunction::setShape
void setShape(const GaussianShape &shape)
Vector.hpp
Definition of vector data types.
CDPL::Shape::GaussianShapeFunction::getElementPosition
const Math::Vector3D & getElementPosition(std::size_t idx) const