Chemical Data Processing Library C++ API - Version 1.1.1
XLogPCalculator.hpp
Go to the documentation of this file.
1 /*
2  * XLogPCalculator.hpp
3  *
4  * Calculation of the partition coefficient by an atom-additive method
5  * (R. Wang, Y. Gao, L. Lai, Persp. Drug Disc. Design 2000, 19, 47-66)
6  *
7  * This file is part of the Chemical Data Processing Toolkit
8  *
9  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * along with this library; see the file COPYING. If not, write to
23  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24  * Boston, MA 02111-1307, USA.
25  */
26 
32 #ifndef CDPL_MOLPROP_XLOGPCALCULATOR_HPP
33 #define CDPL_MOLPROP_XLOGPCALCULATOR_HPP
34 
35 #include <cstddef>
36 
40 #include "CDPL/Math/Vector.hpp"
41 
42 
43 namespace CDPL
44 {
45 
46  namespace Chem
47  {
48 
49  class Atom;
50  }
51 
52  namespace MolProp
53  {
54 
60  {
61 
62  public:
66  static constexpr std::size_t FEATURE_VECTOR_SIZE = 101;
67 
72 
82 
88  double calculate(const Chem::MolecularGraph& molgraph);
89 
94  double getResult() const;
95 
108 
117 
118  private:
119  void init(const Chem::MolecularGraph& molgraph);
120 
121  void countHydrophicCarbons(const Chem::MolecularGraph& molgraph);
122 
123  bool hasTopDistanceBelow4(const Chem::Atom& curr_atom, const Chem::Atom& tgt_atom, const Chem::MolecularGraph& molgraph,
124  const Chem::Atom& prev_atom, std::size_t curr_dist);
125 
126  void calcLogP(const Chem::MolecularGraph& molgraph);
127 
128  Math::DVector featureVector;
129  Math::DVector atomContribs;
130  double logP;
131  Chem::PatternAtomTyper atomTyper;
132  Chem::SubstructureHistogramCalculator corrSubstructHistoCalc;
133  };
134  } // namespace MolProp
135 } // namespace CDPL
136 
137 #endif // CDPL_MOLPROP_XLOGPCALCULATOR_HPP
CDPL::MolProp::XLogPCalculator
XLogPCalculator.
Definition: XLogPCalculator.hpp:60
CDPL::Math::Vector< double >
CDPL::MolProp::XLogPCalculator::getAtomContributions
const Math::DVector & getAtomContributions() const
Returns the contribution of each atom the total obtained by the last calculation.
CDPL::Chem::Atom
Atom.
Definition: Atom.hpp:52
SubstructureHistogramCalculator.hpp
Definition of the class CDPL::Chem::SubstructureHistogramCalculator.
CDPL::Chem::MolecularGraph
MolecularGraph.
Definition: MolecularGraph.hpp:52
PatternAtomTyper.hpp
Definition of the class CDPL::Chem::PatternAtomTyper.
CDPL::MolProp::XLogPCalculator::XLogPCalculator
XLogPCalculator(const Chem::MolecularGraph &molgraph)
Constructs the LogSCalculator instance and calculates the of the molecular graph molgraph.
CDPL::MolProp::XLogPCalculator::calculate
double calculate(const Chem::MolecularGraph &molgraph)
Calculates the of the molecular graph molgraph.
CDPL::MolProp::XLogPCalculator::XLogPCalculator
XLogPCalculator()
Constructs the XLogPCalculator instance.
CDPL::MolProp::XLogPCalculator::getResult
double getResult() const
Returns the result of the last calculation.
CDPL::Chem::PatternAtomTyper
PatternAtomTyper.
Definition: PatternAtomTyper.hpp:52
CDPL::Chem::SubstructureHistogramCalculator
SubstructureHistogramCalculator.
Definition: SubstructureHistogramCalculator.hpp:55
CDPL
The namespace of the Chemical Data Processing Library.
APIPrefix.hpp
Definition of the preprocessor macro CDPL_MOLPROP_API.
CDPL_MOLPROP_API
#define CDPL_MOLPROP_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL::MolProp::XLogPCalculator::getFeatureVector
const Math::DVector & getFeatureVector() const
Returns the feature count vector of the last calculation.
Vector.hpp
Definition of vector data types.