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:
56  static constexpr double DEF_MAX_HBA_INTERACTION_DIR_ANGLE = 85.0;
58  static constexpr double DEF_MAX_HBA_ORIENTATION_DEVIATION = 45.0;
60  static constexpr double DEF_MAX_HBD_INTERACTION_DIR_DEVIATION = 45.0;
62  static constexpr double DEF_MAX_XBA_INTERACTION_DIR_DEVIATION = 45.0;
64  static constexpr double DEF_MAX_XBD_INTERACTION_DIR_DEVIATION = 45.0;
66  static constexpr double DEF_MAX_AR_ORIENTATION_DEVIATION = 45.0;
67 
77  FeatureGeometryMatchFunctor(double max_hba_int_dir_angle = DEF_MAX_HBA_INTERACTION_DIR_ANGLE,
78  double max_hba_orient_dev = DEF_MAX_HBA_ORIENTATION_DEVIATION,
79  double max_hbd_int_dir_dev = DEF_MAX_HBD_INTERACTION_DIR_DEVIATION,
80  double max_xba_int_dir_dev = DEF_MAX_XBA_INTERACTION_DIR_DEVIATION,
81  double max_xbd_int_dir_dev = DEF_MAX_XBD_INTERACTION_DIR_DEVIATION,
82  double max_ar_orient_dev = DEF_MAX_AR_ORIENTATION_DEVIATION);
83 
89 
94  void setMaxHBAInteractionDirAngle(double angle);
95 
101 
106  void setMaxHBAOrientationDeviation(double angle);
107 
113 
119 
125 
131 
137 
143 
149 
154  void setMaxAROrientationDeviation(double angle);
155 
163  double operator()(const Feature& ftr1, const Feature& ftr2) const;
164 
173  double operator()(const Feature& ftr1, const Feature& ftr2, const Math::Matrix4D& xform) const;
174 
175  private:
176  double calcHBDFeatureMatchScore(const Feature& ftr1, const Feature& ftr2, const Math::Matrix4D& xform) const;
177  double calcHBAFeatureMatchScore(const Feature& ftr1, const Feature& ftr2, const Math::Matrix4D& xform) const;
178  double calcXBDFeatureMatchScore(const Feature& ftr1, const Feature& ftr2, const Math::Matrix4D& xform) const;
179  double calcXBAFeatureMatchScore(const Feature& ftr1, const Feature& ftr2, const Math::Matrix4D& xform) const;
180  double calcARFeatureMatchScore(const Feature& ftr1, const Feature& ftr2, const Math::Matrix4D& xform) const;
181 
182  void transformOrientation(const Feature& ftr, const Math::Matrix4D& xform, Math::Vector3D& trans_orient) const;
183 
184  double maxHBAInteractionDirAngle;
185  double maxHBAOrientationDeviation;
186  double maxHBDInteractionDirDeviation;
187  double maxXBAInteractionDirDeviation;
188  double maxXBDInteractionDirDeviation;
189  double maxAROrientationDeviation;
190  };
191  } // namespace Pharm
192 } // namespace CDPL
193 
194 #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:2937
The namespace of the Chemical Data Processing Library.