Chemical Data Processing Library C++ API - Version 1.2.0
MolProp/MolecularGraphFunctions.hpp
Go to the documentation of this file.
1 /*
2  * MolecularGraphFunctions.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_MOLPROP_MOLECULARGRAPHFUNCTIONS_HPP
30 #define CDPL_MOLPROP_MOLECULARGRAPHFUNCTIONS_HPP
31 
32 #include <string>
33 #include <cstddef>
34 
39 
40 
41 namespace CDPL
42 {
43 
44  namespace Chem
45  {
46 
47  class MolecularGraph;
48  }
49 
50  namespace MolProp
51  {
52 
54 
56 
57  CDPL_MOLPROP_API void generateMassCompositionString(const Chem::MolecularGraph& molgraph, std::string& comp);
58 
65  CDPL_MOLPROP_API void generateMolecularFormula(const Chem::MolecularGraph& molgraph, std::string& formula, const std::string& sep = std::string());
66 
67  CDPL_MOLPROP_API void generateElementHistogram(const Chem::MolecularGraph& molgraph, ElementHistogram& hist, bool append = false);
68 
69 
71 
72 
73  CDPL_MOLPROP_API std::size_t getAtomCount(const Chem::MolecularGraph& molgraph);
74 
75  CDPL_MOLPROP_API std::size_t getAtomCount(const Chem::MolecularGraph& molgraph, unsigned int type, bool strict = true);
76 
78 
80 
82 
84 
86 
88 
89 
90  CDPL_MOLPROP_API std::size_t getBondCount(const Chem::MolecularGraph& molgraph);
91 
92  CDPL_MOLPROP_API std::size_t getBondCount(const Chem::MolecularGraph& molgraph, std::size_t order, bool inc_aro = true);
93 
95 
97 
98  CDPL_MOLPROP_API std::size_t getRotatableBondCount(const Chem::MolecularGraph& molgraph, bool h_rotors = false, bool ring_bonds = false, bool amide_bonds = false);
99 
101 
102 
104 
106 
108 
109 
111 
112 
114 
115  CDPL_MOLPROP_API void calcPEOEProperties(Chem::MolecularGraph& molgraph, bool overwrite, std::size_t num_iter = 20,
116  double damping = 0.48);
117 
119 
120  CDPL_MOLPROP_API void calcAtomHydrophobicities(Chem::MolecularGraph& molgraph, bool overwrite, bool from_logp = false);
121 
123 
125  } // namespace MolProp
126 } // namespace CDPL
127 
128 #endif // CDPL_MOLPROP_MOLECULARGRAPHFUNCTIONS_HPP
Definition of constants in namespace CDPL::Chem::AtomPropertyFlag.
Definition of the type CDPL::MolProp::ElementHistogram.
Definition of the type CDPL::MolProp::MassComposition.
Definition of the preprocessor macro CDPL_MOLPROP_API.
#define CDPL_MOLPROP_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
MolecularGraph.
Definition: MolecularGraph.hpp:52
A data type for the storage of element histograms of chemical compounds.
Definition: ElementHistogram.hpp:50
A data type for the storage of mass percent compositions of chemical compounds.
Definition: MassComposition.hpp:51
constexpr unsigned int DEFAULT
Represents the default set of atom properties.
Definition: Chem/AtomPropertyFlag.hpp:53
CDPL_MOLPROP_API void calcMassComposition(const Chem::MolecularGraph &molgraph, MassComposition &comp)
CDPL_MOLPROP_API double calcMass(const Chem::MolecularGraph &molgraph)
CDPL_MOLPROP_API double calcMeanPolarizability(const Chem::MolecularGraph &molgraph)
CDPL_MOLPROP_API void calcMHMOProperties(Chem::MolecularGraph &molgraph, bool overwrite)
CDPL_MOLPROP_API void generateMolecularFormula(const Chem::MolecularGraph &molgraph, std::string &formula, const std::string &sep=std::string())
Generates the molecular formula of the molecular graph molgraph.
CDPL_MOLPROP_API double calcXLogP(const Chem::MolecularGraph &molgraph)
CDPL_MOLPROP_API std::size_t getChainAtomCount(const Chem::Atom &atom, const Chem::MolecularGraph &molgraph)
CDPL_MOLPROP_API std::size_t getImplicitHydrogenCount(const Chem::MolecularGraph &molgraph)
CDPL_MOLPROP_API void generateElementHistogram(const Chem::MolecularGraph &molgraph, ElementHistogram &hist, bool append=false)
CDPL_MOLPROP_API std::size_t getHydrogenBondCount(const Chem::MolecularGraph &molgraph)
CDPL_MOLPROP_API std::size_t getChainBondCount(const Chem::Atom &atom, const Chem::MolecularGraph &molgraph)
CDPL_MOLPROP_API void calcAtomHydrophobicities(Chem::MolecularGraph &molgraph, bool overwrite, bool from_logp=false)
CDPL_MOLPROP_API void calcPEOEProperties(Chem::MolecularGraph &molgraph, bool overwrite, std::size_t num_iter=20, double damping=0.48)
CDPL_MOLPROP_API std::size_t getOrdinaryHydrogenCount(const Chem::Atom &atom, const Chem::MolecularGraph &molgraph, unsigned int flags=Chem::AtomPropertyFlag::DEFAULT)
CDPL_MOLPROP_API std::size_t getComponentCount(const Chem::MolecularGraph &molgraph)
CDPL_MOLPROP_API std::size_t getExplicitOrdinaryHydrogenCount(const Chem::MolecularGraph &molgraph, unsigned int flags=Chem::AtomPropertyFlag::DEFAULT)
CDPL_MOLPROP_API void perceiveHBondDonorAtomTypes(Chem::MolecularGraph &molgraph, bool overwrite)
CDPL_MOLPROP_API void generateMassCompositionString(const Chem::MolecularGraph &molgraph, std::string &comp)
CDPL_MOLPROP_API std::size_t calcCyclomaticNumber(const Chem::MolecularGraph &molgraph)
CDPL_MOLPROP_API void perceiveHBondAcceptorAtomTypes(Chem::MolecularGraph &molgraph, bool overwrite)
CDPL_MOLPROP_API std::size_t getAtomCount(const Chem::Atom &atom, const Chem::MolecularGraph &molgraph, unsigned int type, bool strict=true)
CDPL_MOLPROP_API std::size_t getBondCount(const Chem::Atom &atom, const Chem::MolecularGraph &molgraph)
CDPL_MOLPROP_API std::size_t getRotatableBondCount(const Chem::Atom &atom, const Chem::MolecularGraph &molgraph, bool h_rotors=false, bool ring_bonds=false, bool amide_bonds=false)
CDPL_MOLPROP_API double calcTPSA(const Chem::MolecularGraph &molgraph)
CDPL_MOLPROP_API std::size_t getHBondAcceptorAtomCount(const Chem::MolecularGraph &molgraph)
CDPL_MOLPROP_API double calcLogS(const Chem::MolecularGraph &molgraph)
CDPL_MOLPROP_API std::size_t getRuleOfFiveScore(const Chem::MolecularGraph &molgraph)
CDPL_MOLPROP_API std::size_t getHBondDonorAtomCount(const Chem::MolecularGraph &molgraph)
The namespace of the Chemical Data Processing Library.