Chemical Data Processing Library C++ API - Version 1.4.0
FeatureGeometryMatchFunctor.hpp
Go to the documentation of this file.
1 /*
2  * FeatureGeometryMatchFunctor.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_PHARM_FEATUREGEOMETRYMATCHFUNCTOR_HPP
30 #define CDPL_PHARM_FEATUREGEOMETRYMATCHFUNCTOR_HPP
31 
32 #include "CDPL/Pharm/APIPrefix.hpp"
33 
34 #include "CDPL/Math/Matrix.hpp"
35 #include "CDPL/Math/Vector.hpp"
36 
37 
38 namespace CDPL
39 {
40 
41  namespace Pharm
42  {
43 
44  class Feature;
45 
52  {
53 
54  public:
58  static constexpr double DEF_MAX_HBA_INTERACTION_DIR_ANGLE = 85.0;
59 
63  static constexpr double DEF_MAX_HBA_ORIENTATION_DEVIATION = 45.0;
64 
68  static constexpr double DEF_MAX_HBD_INTERACTION_DIR_DEVIATION = 45.0;
69 
73  static constexpr double DEF_MAX_XBA_INTERACTION_DIR_DEVIATION = 45.0;
74 
78  static constexpr double DEF_MAX_XBD_INTERACTION_DIR_DEVIATION = 45.0;
79 
83  static constexpr double DEF_MAX_AR_ORIENTATION_DEVIATION = 45.0;
84 
94  FeatureGeometryMatchFunctor(double max_hba_int_dir_angle = DEF_MAX_HBA_INTERACTION_DIR_ANGLE,
95  double max_hba_orient_dev = DEF_MAX_HBA_ORIENTATION_DEVIATION,
96  double max_hbd_int_dir_dev = DEF_MAX_HBD_INTERACTION_DIR_DEVIATION,
97  double max_xba_int_dir_dev = DEF_MAX_XBA_INTERACTION_DIR_DEVIATION,
98  double max_xbd_int_dir_dev = DEF_MAX_XBD_INTERACTION_DIR_DEVIATION,
99  double max_ar_orient_dev = DEF_MAX_AR_ORIENTATION_DEVIATION);
100 
106 
111  void setMaxHBAInteractionDirAngle(double angle);
112 
118 
123  void setMaxHBAOrientationDeviation(double angle);
124 
130 
136 
142 
148 
154 
160 
166 
171  void setMaxAROrientationDeviation(double angle);
172 
180  double operator()(const Feature& ftr1, const Feature& ftr2) const;
181 
190  double operator()(const Feature& ftr1, const Feature& ftr2, const Math::Matrix4D& xform) const;
191 
192  private:
193  double calcHBDFeatureMatchScore(const Feature& ftr1, const Feature& ftr2, const Math::Matrix4D& xform) const;
194  double calcHBAFeatureMatchScore(const Feature& ftr1, const Feature& ftr2, const Math::Matrix4D& xform) const;
195  double calcXBDFeatureMatchScore(const Feature& ftr1, const Feature& ftr2, const Math::Matrix4D& xform) const;
196  double calcXBAFeatureMatchScore(const Feature& ftr1, const Feature& ftr2, const Math::Matrix4D& xform) const;
197  double calcARFeatureMatchScore(const Feature& ftr1, const Feature& ftr2, const Math::Matrix4D& xform) const;
198 
199  void transformOrientation(const Feature& ftr, const Math::Matrix4D& xform, Math::Vector3D& trans_orient) const;
200 
201  double maxHBAInteractionDirAngle;
202  double maxHBAOrientationDeviation;
203  double maxHBDInteractionDirDeviation;
204  double maxXBAInteractionDirDeviation;
205  double maxXBDInteractionDirDeviation;
206  double maxAROrientationDeviation;
207  };
208  } // namespace Pharm
209 } // namespace CDPL
210 
211 #endif // CDPL_PHARM_FEATUREGEOMETRYMATCHFUNCTOR_HPP
Definition of matrix data types.
Definition of the preprocessor macro CDPL_PHARM_API.
#define CDPL_PHARM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of vector data types.
Match functor that quantifies the goodness of the spatial orientation match between two pharmacophore...
Definition: FeatureGeometryMatchFunctor.hpp:52
void setMaxXBDInteractionDirDeviation(double angle)
Sets the maximum halogen-bond donor interaction direction deviation.
double operator()(const Feature &ftr1, const Feature &ftr2, const Math::Matrix4D &xform) const
Calculates a score reflecting the goodness of the spatial feature orientation match.
double getMaxXBAInteractionDirDeviation() const
Returns the currently configured maximum halogen-bond acceptor interaction direction deviation.
void setMaxAROrientationDeviation(double angle)
Sets the maximum aromatic feature orientation deviation.
double getMaxAROrientationDeviation() const
Returns the currently configured maximum aromatic feature orientation deviation.
double getMaxHBDInteractionDirDeviation() const
Returns the currently configured maximum H-bond donor interaction direction deviation.
void setMaxXBAInteractionDirDeviation(double angle)
Sets the maximum halogen-bond acceptor interaction direction deviation.
void setMaxHBDInteractionDirDeviation(double angle)
Sets the maximum H-bond donor interaction direction deviation.
FeatureGeometryMatchFunctor(double max_hba_int_dir_angle=DEF_MAX_HBA_INTERACTION_DIR_ANGLE, double max_hba_orient_dev=DEF_MAX_HBA_ORIENTATION_DEVIATION, double max_hbd_int_dir_dev=DEF_MAX_HBD_INTERACTION_DIR_DEVIATION, double max_xba_int_dir_dev=DEF_MAX_XBA_INTERACTION_DIR_DEVIATION, double max_xbd_int_dir_dev=DEF_MAX_XBD_INTERACTION_DIR_DEVIATION, double max_ar_orient_dev=DEF_MAX_AR_ORIENTATION_DEVIATION)
Constructs a FeatureGeometryMatchFunctor with the specified per-type angle tolerances.
double operator()(const Feature &ftr1, const Feature &ftr2) const
Calculates a score reflecting the goodness of the spatial feature orientation match.
void setMaxHBAOrientationDeviation(double angle)
Sets the maximum H-bond acceptor orientation deviation.
double getMaxHBAInteractionDirAngle() const
Returns the currently configured maximum H-bond acceptor interaction direction angle.
void setMaxHBAInteractionDirAngle(double angle)
Sets the maximum H-bond acceptor interaction direction angle.
double getMaxHBAOrientationDeviation() const
Returns the currently configured maximum H-bond acceptor orientation deviation.
double getMaxXBDInteractionDirDeviation() const
Returns the currently configured maximum halogen-bond donor interaction direction deviation.
Abstract base class representing a single pharmacophore feature within a parent Pharm::Pharmacophore.
Definition: Feature.hpp:48
CVector< double, 3 > Vector3D
Bounded 3 element vector holding floating-point values of type double.
Definition: Vector.hpp:3218
The namespace of the Chemical Data Processing Library.