Chemical Data Processing Library C++ API - Version 1.4.0
PharmacophoreRDFDescriptorCalculator.hpp
Go to the documentation of this file.
1 /*
2  * PharmacophoreRDFDescriptorCalculator.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_DESCR_PHARMACOPHORERDFDESCRIPTORCALCULATOR_HPP
30 #define CDPL_DESCR_PHARMACOPHORERDFDESCRIPTORCALCULATOR_HPP
31 
32 #include <functional>
33 
34 #include "CDPL/Descr/APIPrefix.hpp"
36 #include "CDPL/Math/Vector.hpp"
37 
38 
39 namespace CDPL
40 {
41 
42  namespace Pharm
43  {
44 
45  class Feature;
46  class FeatureContainer;
47  } // namespace Pharm
48 
49  namespace Descr
50  {
51 
67  {
68 
70 
71  public:
76 
82  typedef std::function<double(const Pharm::Feature&, const Pharm::Feature&, unsigned int)> FeaturePairWeightFunction;
83 
88 
95 
102  void setSmoothingFactor(double factor);
103 
109  double getSmoothingFactor() const;
110 
116  void setScalingFactor(double factor);
117 
122  double getScalingFactor() const;
123 
129  void setStartRadius(double start_radius);
130 
135  double getStartRadius() const;
136 
142  void setRadiusIncrement(double radius_inc);
143 
148  double getRadiusIncrement() const;
149 
159  void setNumSteps(std::size_t num_steps);
160 
165  std::size_t getNumSteps() const;
166 
172 
178 
185 
191 
197  void calculate(const Pharm::FeatureContainer& cntnr, Math::DVector& descr);
198 
199  private:
200  RDFCodeCalc rdfCalculator;
201  FeaturePairWeightFunction weightFunc;
202  };
203  } // namespace Descr
204 } // namespace CDPL
205 
206 #endif // CDPL_DESCR_PHARMACOPHORERDFDESCRIPTORCALCULATOR_HPP
Definition of the preprocessor macro CDPL_DESCR_API.
#define CDPL_DESCR_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of class CDPL::Descr::RDFCodeCalculator.
Definition of vector data types.
Calculation of an RDF descriptor of a pharmacophore partitioned by specific feature types.
Definition: PharmacophoreRDFDescriptorCalculator.hpp:67
void setRadiusIncrement(double radius_inc)
Sets the radius step size between successive RDF code elements.
void setScalingFactor(double factor)
Allows to specify the scaling factor for the RDF code elements.
std::size_t getNumSteps() const
Returns the number of performed radius incrementation steps.
void enableDistanceToIntervalCenterRounding(bool enable)
Allows to specify whether feature pair distances should be rounded to the nearest radius interval cen...
double getSmoothingFactor() const
Returns the smoothing factor used in the calculation of feature pair RDF contributions.
void calculate(const Pharm::FeatureContainer &cntnr, Math::DVector &descr)
Calculates the RDF descriptor of the features in cntnr.
double getRadiusIncrement() const
Returns the radius step size between successive RDF code elements.
double getScalingFactor() const
Returns the scaling factor applied to the RDF code elements.
RDFCodeCalc::Entity3DCoordinatesFunction Feature3DCoordinatesFunction
Type of the function used to retrieve the 3D coordinates of a feature.
Definition: PharmacophoreRDFDescriptorCalculator.hpp:75
void setFeaturePairWeightFunction(const FeaturePairWeightFunction &func)
Allows to specify a custom feature pair weight function.
PharmacophoreRDFDescriptorCalculator(const Pharm::FeatureContainer &cntnr, Math::DVector &descr)
Constructs the PharmacophoreRDFDescriptorCalculator instance and calculates the descriptor of the fea...
void setSmoothingFactor(double factor)
Allows to specify the smoothing factor used in the calculation of feature pair RDF contributions.
void setNumSteps(std::size_t num_steps)
Sets the number of desired radius incrementation steps.
void setFeature3DCoordinatesFunction(const Feature3DCoordinatesFunction &func)
Allows to specify the feature coordinates function.
std::function< double(const Pharm::Feature &, const Pharm::Feature &, unsigned int)> FeaturePairWeightFunction
Type of the generic functor used to retrieve the weight of a feature pair.
Definition: PharmacophoreRDFDescriptorCalculator.hpp:82
double getStartRadius() const
Returns the starting value of the radius.
bool distanceToIntervalsCenterRoundingEnabled() const
Tells whether feature pair distances get rounded to the nearest radius interval centers.
PharmacophoreRDFDescriptorCalculator()
Constructs the PharmacophoreRDFDescriptorCalculator instance.
void setStartRadius(double start_radius)
Sets the starting value of the radius.
std::function< const Math::Vector3D &(const EntityType &)> Entity3DCoordinatesFunction
Type of the generic functor class used to store a user-defined entity 3D coordinates function.
Definition: RDFCodeCalculator.hpp:82
Abstract base class for containers holding a sequence of Pharm::Feature objects with associated prope...
Definition: FeatureContainer.hpp:55
Abstract base class representing a single pharmacophore feature within a parent Pharm::Pharmacophore.
Definition: Feature.hpp:48
The namespace of the Chemical Data Processing Library.