Chemical Data Processing Library C++ API - Version 1.1.1
ExactGaussianShapeOverlapFunction.hpp
Go to the documentation of this file.
1 /*
2  * ExactGaussianShapeOverlapFunction.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_EXACTGAUSSIANSHAPEOVERLAPFUNCTION_HPP
30 #define CDPL_SHAPE_EXACTGAUSSIANSHAPEOVERLAPFUNCTION_HPP
31 
32 #include <memory>
33 
34 #include "CDPL/Shape/APIPrefix.hpp"
36 
37 
38 namespace CDPL
39 {
40 
41  namespace Shape
42  {
43 
44  class GaussianProductList;
45 
47  {
48 
49  public:
50  typedef std::shared_ptr<ExactGaussianShapeOverlapFunction> SharedPointer;
51 
53 
55 
57  const GaussianShapeFunction& ovl_shape_func);
58 
60 
61  void setShapeFunction(const GaussianShapeFunction& func, bool is_ref);
62 
63  const GaussianShapeFunction* getShapeFunction(bool ref) const;
64 
66 
68 
70 
72 
73  double calcSelfOverlap(bool ref) const;
74 
75  double calcColorSelfOverlap(bool ref) const;
76 
77  double calcOverlap() const;
78 
79  double calcColorOverlap() const;
80 
81  double calcOverlap(const Math::Vector3DArray& coords) const;
82 
83  double calcColorOverlap(const Math::Vector3DArray& coords) const;
84 
85  double calcOverlapGradient(const Math::Vector3DArray& coords, Math::Vector3DArray& grad) const;
86 
88 
89  private:
90  bool checkShapeFuncsNotNull() const;
91 
92  double calcOverlap(const GaussianProductList* ref_prod_list, const GaussianProductList* ovl_prod_list,
93  bool color) const;
94  double calcOverlap(const GaussianProductList* ref_prod_list, const GaussianProductList* ovl_prod_list,
95  const Math::Vector3DArray& coords,
96  bool color) const;
97  double calcOverlapGradient(const GaussianProductList* ref_prod_list, const GaussianProductList* ovl_prod_list,
98  const Math::Vector3DArray& coords, Math::Vector3DArray& grad) const;
99 
100  const GaussianShapeFunction* refShapeFunc;
101  const GaussianShapeFunction* ovlShapeFunc;
102  ColorMatchFunction colorMatchFunc;
103  ColorFilterFunction colorFilterFunc;
104  };
105  } // namespace Shape
106 } // namespace CDPL
107 
108 #endif // CDPL_SHAPE_EXACTGAUSSIANSHAPEOVERLAPFUNCTION_HPP
CDPL::Shape::ExactGaussianShapeOverlapFunction::calcColorOverlap
double calcColorOverlap(const Math::Vector3DArray &coords) const
CDPL::Shape::ExactGaussianShapeOverlapFunction::ExactGaussianShapeOverlapFunction
ExactGaussianShapeOverlapFunction(const GaussianShapeFunction &ref_shape_func, const GaussianShapeFunction &ovl_shape_func)
GaussianShapeOverlapFunction.hpp
Definition of the class CDPL::Shape::GaussianShapeOverlapFunction.
CDPL::Shape::ExactGaussianShapeOverlapFunction::setShapeFunction
void setShapeFunction(const GaussianShapeFunction &func, bool is_ref)
CDPL::Shape::ExactGaussianShapeOverlapFunction::calcOverlapGradient
double calcOverlapGradient(const Math::Vector3DArray &coords, Math::Vector3DArray &grad) const
CDPL::Shape::GaussianShapeOverlapFunction::ColorMatchFunction
std::function< bool(std::size_t, std::size_t)> ColorMatchFunction
Definition: GaussianShapeOverlapFunction.hpp:55
CDPL::Shape::ExactGaussianShapeOverlapFunction::calcColorSelfOverlap
double calcColorSelfOverlap(bool ref) const
VectorArray< Vector3D >
CDPL::Shape::ExactGaussianShapeOverlapFunction::calcColorOverlap
double calcColorOverlap() const
CDPL::Shape::ExactGaussianShapeOverlapFunction::setColorMatchFunction
void setColorMatchFunction(const ColorMatchFunction &func)
CDPL::Shape::ExactGaussianShapeOverlapFunction::~ExactGaussianShapeOverlapFunction
~ExactGaussianShapeOverlapFunction()
CDPL::Shape::ExactGaussianShapeOverlapFunction::SharedPointer
std::shared_ptr< ExactGaussianShapeOverlapFunction > SharedPointer
Definition: ExactGaussianShapeOverlapFunction.hpp:50
CDPL::Shape::ExactGaussianShapeOverlapFunction::calcSelfOverlap
double calcSelfOverlap(bool ref) const
CDPL::Shape::GaussianShapeOverlapFunction
Definition: GaussianShapeOverlapFunction.hpp:49
CDPL::Shape::ExactGaussianShapeOverlapFunction::ExactGaussianShapeOverlapFunction
ExactGaussianShapeOverlapFunction()
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::ExactGaussianShapeOverlapFunction::getColorMatchFunction
const ColorMatchFunction & getColorMatchFunction() const
CDPL
The namespace of the Chemical Data Processing Library.
APIPrefix.hpp
Definition of the preprocessor macro CDPL_SHAPE_API.
CDPL::Shape::ExactGaussianShapeOverlapFunction::ExactGaussianShapeOverlapFunction
ExactGaussianShapeOverlapFunction(const ExactGaussianShapeOverlapFunction &func)
CDPL::Shape::ExactGaussianShapeOverlapFunction::calcOverlap
double calcOverlap(const Math::Vector3DArray &coords) const
CDPL::Shape::ExactGaussianShapeOverlapFunction::calcOverlap
double calcOverlap() const
CDPL::Shape::ExactGaussianShapeOverlapFunction::getColorFilterFunction
const ColorFilterFunction & getColorFilterFunction() const
CDPL::Shape::ExactGaussianShapeOverlapFunction::getShapeFunction
const GaussianShapeFunction * getShapeFunction(bool ref) const
CDPL::Shape::GaussianShapeOverlapFunction::ColorFilterFunction
std::function< bool(std::size_t)> ColorFilterFunction
Definition: GaussianShapeOverlapFunction.hpp:54
CDPL::Shape::ExactGaussianShapeOverlapFunction
Definition: ExactGaussianShapeOverlapFunction.hpp:47
CDPL::Shape::ExactGaussianShapeOverlapFunction::operator=
ExactGaussianShapeOverlapFunction & operator=(const ExactGaussianShapeOverlapFunction &func)
CDPL::Shape::ExactGaussianShapeOverlapFunction::setColorFilterFunction
void setColorFilterFunction(const ColorFilterFunction &func)