Chemical Data Processing Library C++ API - Version 1.4.0
HydrophobicAtomFeatureGenerator.hpp
Go to the documentation of this file.
1 /*
2  * HydrophobicAtomFeatureGenerator.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_HYDROPHOBICATOMFEATUREGENERATOR_HPP
30 #define CDPL_PHARM_HYDROPHOBICATOMFEATUREGENERATOR_HPP
31 
32 #include "CDPL/Pharm/APIPrefix.hpp"
36 #include "CDPL/Chem/Fragment.hpp"
37 #include "CDPL/Util/Array.hpp"
38 
39 
40 namespace CDPL
41 {
42 
43  namespace Pharm
44  {
45 
46  class Feature;
47 
54  {
55 
56  public:
60  static constexpr double DEF_HYD_THRESHOLD = 0.5;
61 
65  static constexpr double DEF_FEATURE_TOL = 1.5;
66 
70  static constexpr unsigned int DEF_FEATURE_TYPE = FeatureType::HYDROPHOBIC;
71 
75  static constexpr unsigned int DEF_FEATURE_GEOM = FeatureGeometry::SPHERE;
76 
80  typedef std::shared_ptr<HydrophobicAtomFeatureGenerator> SharedPointer;
81 
86 
92 
100 
105 
112  void setFeatureType(unsigned int type);
113 
119  unsigned int getFeatureType() const;
120 
127  void setFeatureTolerance(double tol);
128 
134  double getFeatureTolerance() const;
135 
142  void setFeatureGeometry(unsigned int geom);
143 
149  unsigned int getFeatureGeometry() const;
150 
156  void setHydrophobicityThreshold(double thresh);
157 
163 
170 
176 
177  private:
178  void addNonPatternFeatures(const Chem::MolecularGraph& molgraph, Pharmacophore& pharm);
179 
180  void emitFeature(const Chem::Atom&, Pharmacophore&, const Chem::Fragment::SharedPointer&, double) const;
181 
182  void getAtomHydrophobicities();
183 
184  Chem::Fragment::SharedPointer makeFragment(const Chem::Atom&) const;
185 
186  unsigned int featureType;
187  double featureTol;
188  unsigned int featureGeom;
189  double hydThreshold;
190  Util::DArray atomHydTable;
191  };
192  } // namespace Pharm
193 } // namespace CDPL
194 
195 #endif // CDPL_PHARM_HYDROPHOBICATOMFEATUREGENERATOR_HPP
Definition of class CDPL::Util::Array.
Definition of constants in namespace CDPL::Pharm::FeatureGeometry.
Definition of class CDPL::Chem::Fragment.
Definition of class CDPL::Pharm::PatternBasedFeatureGenerator.
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 constants in namespace CDPL::Pharm::FeatureType.
Abstract base class representing a chemical atom and its bonded neighborhood.
Definition: Atom.hpp:57
std::shared_ptr< Fragment > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated Fragment instances.
Definition: Fragment.hpp:66
Abstract base class for representations of a chemical structure as a graph of bonded atoms.
Definition: MolecularGraph.hpp:57
std::shared_ptr< FeatureGenerator > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated FeatureGenerator instances.
Definition: FeatureGenerator.hpp:64
Pharm::FeatureGenerator implementation that emits one hydrophobic feature per atom whose individual h...
Definition: HydrophobicAtomFeatureGenerator.hpp:54
double getFeatureTolerance() const
Returns the value of the feature tolerance property that gets set on newly generated features.
void setHydrophobicityThreshold(double thresh)
Specifies the minimum hydrophobicity of an atom that is required for the generation of a new feature.
double getHydrophobicityThreshold() const
Returns the minimum hydrophobicity of an atom that is required for the generation of a new feature.
FeatureGenerator::SharedPointer clone() const
Creates a deep copy of the HydrophobicAtomFeatureGenerator instance.
void setFeatureGeometry(unsigned int geom)
Specifies the value of the feature geometry property that has to be set on newly generated features.
std::shared_ptr< HydrophobicAtomFeatureGenerator > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated HydrophobicAtomFeatureGenerator i...
Definition: HydrophobicAtomFeatureGenerator.hpp:80
HydrophobicAtomFeatureGenerator(const HydrophobicAtomFeatureGenerator &gen)
Constructs a copy of the HydrophobicAtomFeatureGenerator instance gen.
void setFeatureTolerance(double tol)
Specifies the value of the feature tolerance property that has to be set on newly generated features.
HydrophobicAtomFeatureGenerator & operator=(const HydrophobicAtomFeatureGenerator &gen)
Copies the HydrophobicAtomFeatureGenerator instance gen.
void setFeatureType(unsigned int type)
Specifies the value of the feature type property that has to be set on newly generated features.
unsigned int getFeatureType() const
Returns the value of the feature type property that gets set on newly generated features.
unsigned int getFeatureGeometry() const
Returns the value of the feature geometry property that gets set on newly generated features.
HydrophobicAtomFeatureGenerator()
Constructs the HydrophobicAtomFeatureGenerator instance.
HydrophobicAtomFeatureGenerator(const Chem::MolecularGraph &molgraph, Pharmacophore &pharm)
Perceives hydrophobic atom features of the molecular graph molgraph and adds them to the pharmacophor...
Pharm::FeatureGenerator implementation that perceives pharmacophore features by substructure pattern ...
Definition: PatternBasedFeatureGenerator.hpp:59
Abstract base class for mutable containers of Pharm::Feature instances representing a pharmacophore m...
Definition: Pharmacophore.hpp:53
constexpr unsigned int SPHERE
Specifies a spherical feature geometry.
Definition: FeatureGeometry.hpp:53
constexpr unsigned int HYDROPHOBIC
Specifies a hydrophobic feature.
Definition: Pharm/FeatureType.hpp:53
Array< double > DArray
Array storing floating-point values of type double.
Definition: Array.hpp:598
The namespace of the Chemical Data Processing Library.