Chemical Data Processing Library C++ API - Version 1.1.1
MoleculeRDFDescriptorCalculator.hpp
Go to the documentation of this file.
1 /*
2  * MoleculeRDFDescriptorCalculator.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_MOLECULERDFDESCRIPTORCALCULATOR_HPP
30 #define CDPL_DESCR_MOLECULERDFDESCRIPTORCALCULATOR_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 Chem
43  {
44 
45  class Atom;
46  class AtomContainer;
47  } // namespace Chem
48 
49  namespace Descr
50  {
51 
57  {
58 
60 
61  public:
63  typedef std::function<double(const Chem::Atom&, const Chem::Atom&, unsigned int)> AtomPairWeightFunction;
64 
69 
71 
78  void setSmoothingFactor(double factor);
79 
85  double getSmoothingFactor() const;
86 
92  void setScalingFactor(double factor);
93 
98  double getScalingFactor() const;
99 
105  void setStartRadius(double start_radius);
106 
111  double getStartRadius() const;
112 
118  void setRadiusIncrement(double radius_inc);
119 
124  double getRadiusIncrement() const;
125 
135  void setNumSteps(std::size_t num_steps);
136 
141  std::size_t getNumSteps() const;
142 
150 
156 
163 
169 
170  void calculate(const Chem::AtomContainer& cntnr, Math::DVector& descr);
171 
172  private:
173  RDFCodeCalculator rdfCalculator;
174  AtomPairWeightFunction weightFunc;
175  };
176  } // namespace Descr
177 } // namespace CDPL
178 
179 #endif // CDPL_DESCR_MOLECULERDFDESCRIPTORCALCULATOR_HPP
CDPL::Descr::RDFCodeCalculator< Chem::Atom >::Entity3DCoordinatesFunction
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:74
CDPL::Math::Vector< double >
CDPL::Descr::MoleculeRDFDescriptorCalculator
MoleculeRDFDescriptorCalculator.
Definition: MoleculeRDFDescriptorCalculator.hpp:57
CDPL::Descr::MoleculeRDFDescriptorCalculator::setNumSteps
void setNumSteps(std::size_t num_steps)
Sets the number of desired radius incrementation steps.
CDPL::Descr::MoleculeRDFDescriptorCalculator::setRadiusIncrement
void setRadiusIncrement(double radius_inc)
Sets the radius step size between successive RDF code elements.
CDPL::Descr::MoleculeRDFDescriptorCalculator::MoleculeRDFDescriptorCalculator
MoleculeRDFDescriptorCalculator(const Chem::AtomContainer &cntnr, Math::DVector &descr)
CDPL::Descr::MoleculeRDFDescriptorCalculator::getStartRadius
double getStartRadius() const
Returns the starting value of the radius.
CDPL::Descr::MoleculeRDFDescriptorCalculator::setAtom3DCoordinatesFunction
void setAtom3DCoordinatesFunction(const Atom3DCoordinatesFunction &func)
Allows to specify the atom coordinates function.
CDPL::Chem::Atom
Atom.
Definition: Atom.hpp:52
RDFCodeCalculator.hpp
Definition of the class CDPL::Descr::RDFCodeCalculator.
CDPL::Descr::MoleculeRDFDescriptorCalculator::getScalingFactor
double getScalingFactor() const
Returns the scaling factor applied to the RDF code elements.
CDPL::Chem::AtomContainer
A common interface for data-structures that support a random access to stored Chem::Atom instances.
Definition: AtomContainer.hpp:55
double
CDPL::Descr::MoleculeRDFDescriptorCalculator::getRadiusIncrement
double getRadiusIncrement() const
Returns the radius step size between successive RDF code elements.
CDPL::Descr::RDFCodeCalculator< Chem::Atom >
CDPL::Descr::MoleculeRDFDescriptorCalculator::Atom3DCoordinatesFunction
RDFCodeCalculator::Entity3DCoordinatesFunction Atom3DCoordinatesFunction
Definition: MoleculeRDFDescriptorCalculator.hpp:62
CDPL::Descr::MoleculeRDFDescriptorCalculator::AtomPairWeightFunction
std::function< double(const Chem::Atom &, const Chem::Atom &, unsigned int)> AtomPairWeightFunction
Definition: MoleculeRDFDescriptorCalculator.hpp:63
CDPL::Descr::MoleculeRDFDescriptorCalculator::MoleculeRDFDescriptorCalculator
MoleculeRDFDescriptorCalculator()
Constructs the MoleculeRDFDescriptorCalculator instance.
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::Descr::MoleculeRDFDescriptorCalculator::getNumSteps
std::size_t getNumSteps() const
Returns the number of performed radius incrementation steps.
CDPL::Descr::MoleculeRDFDescriptorCalculator::getSmoothingFactor
double getSmoothingFactor() const
Returns the smoothing factor used in the calculation of atom pair RDF contributions.
CDPL::Descr::MoleculeRDFDescriptorCalculator::enableDistanceToIntervalCenterRounding
void enableDistanceToIntervalCenterRounding(bool enable)
Allows to specify whether atom pair distances should be rounded to the nearest radius interval center...
CDPL::Descr::MoleculeRDFDescriptorCalculator::setStartRadius
void setStartRadius(double start_radius)
Sets the starting value of the radius.
CDPL::Descr::MoleculeRDFDescriptorCalculator::setAtomPairWeightFunction
void setAtomPairWeightFunction(const AtomPairWeightFunction &func)
Allows to specify a custom atom pair weight function.
APIPrefix.hpp
Definition of the preprocessor macro CDPL_DESCR_API.
CDPL::Descr::MoleculeRDFDescriptorCalculator::distanceToIntervalsCenterRoundingEnabled
bool distanceToIntervalsCenterRoundingEnabled() const
Tells whether atom pair distances get rounded to the nearest radius interval centers.
CDPL_DESCR_API
#define CDPL_DESCR_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL::Descr::MoleculeRDFDescriptorCalculator::setSmoothingFactor
void setSmoothingFactor(double factor)
Allows to specify the smoothing factor used in the calculation of atom pair RDF contributions.
CDPL::Descr::MoleculeRDFDescriptorCalculator::calculate
void calculate(const Chem::AtomContainer &cntnr, Math::DVector &descr)
Vector.hpp
Definition of vector data types.
CDPL::Descr::MoleculeRDFDescriptorCalculator::setScalingFactor
void setScalingFactor(double factor)
Allows to specify the scaling factor for the RDF code elements.