RDKit
Open-source cheminformatics and machine learning.
ConnectivityDescriptors.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2012 Greg Landrum
3 //
4 // @@ All Rights Reserved @@
5 // This file is part of the RDKit.
6 // The contents are covered by the terms of the BSD license
7 // which is included in the file license.txt, found at the root
8 // of the RDKit source tree.
9 //
10 
11 /*! \file ConnectivityDescriptors.h
12 
13  \brief Use MolDescriptors.h in client code.
14 
15 */
16 #include <RDGeneral/export.h>
17 #ifndef __RD_CONNECTIVITYDESCRIPTORS_H__
18 #define __RD_CONNECTIVITYDESCRIPTORS_H__
19 
20 #include <string>
21 #include <vector>
22 #include <boost/smart_ptr.hpp>
23 
24 namespace RDKit {
25 class ROMol;
26 namespace Descriptors {
27 
28 //! From equations (5),(9) and (10) of Rev. Comp. Chem. vol 2, 367-422, (1991)
29 /*!
30  \param mol the molecule of interest
31  \param force forces the value to be recalculated instead
32  of pulled from the cache
33 */
34 RDKIT_DESCRIPTORS_EXPORT double calcChi0v(const ROMol &mol, bool force = false);
35 const std::string chi0vVersion = "1.2.0";
36 //! From equations (5),(9) and (10) of Rev. Comp. Chem. vol 2, 367-422, (1991)
37 /*!
38  \param mol the molecule of interest
39  \param force forces the value to be recalculated instead
40  of pulled from the cache
41 */
42 RDKIT_DESCRIPTORS_EXPORT double calcChi1v(const ROMol &mol, bool force = false);
43 const std::string chi1vVersion = "1.2.0";
44 //! From equations (5),(9) and (10) of Rev. Comp. Chem. vol 2, 367-422, (1991)
45 /*!
46  \param mol the molecule of interest
47  \param force forces the value to be recalculated instead
48  of pulled from the cache
49 */
50 RDKIT_DESCRIPTORS_EXPORT double calcChi2v(const ROMol &mol, bool force = false);
51 const std::string chi2vVersion = "1.2.0";
52 //! From equations (5),(9) and (10) of Rev. Comp. Chem. vol 2, 367-422, (1991)
53 /*!
54  \param mol the molecule of interest
55  \param force forces the value to be recalculated instead
56  of pulled from the cache
57 */
58 RDKIT_DESCRIPTORS_EXPORT double calcChi3v(const ROMol &mol, bool force = false);
59 const std::string chi3vVersion = "1.2.0";
60 //! From equations (5),(9) and (10) of Rev. Comp. Chem. vol 2, 367-422, (1991)
61 /*!
62  \param mol the molecule of interest
63  \param force forces the value to be recalculated instead
64  of pulled from the cache
65 */
66 RDKIT_DESCRIPTORS_EXPORT double calcChi4v(const ROMol &mol, bool force = false);
67 const std::string chi4vVersion = "1.2.0";
68 //! From equations (5),(9) and (10) of Rev. Comp. Chem. vol 2, 367-422, (1991)
69 /*!
70  \param mol the molecule of interest
71  \param n the order of the connectivity index
72  \param force forces the value to be recalculated instead
73  of pulled from the cache
74 */
75 RDKIT_DESCRIPTORS_EXPORT double calcChiNv(const ROMol &mol, unsigned int n,
76  bool force = false);
77 const std::string chiNvVersion = "1.2.0";
78 
79 //! Similar to Hall Kier ChiXv, but uses nVal instead of valence
80 //! This makes a big difference after we get out of the first row.
81 /*!
82  \param mol the molecule of interest
83  \param force forces the value to be recalculated instead
84  of pulled from the cache
85 */
86 RDKIT_DESCRIPTORS_EXPORT double calcChi0n(const ROMol &mol, bool force = false);
87 const std::string chi0nVersion = "1.2.0";
88 //! Similar to Hall Kier ChiXv, but uses nVal instead of valence
89 //! This makes a big difference after we get out of the first row.
90 /*!
91  \param mol the molecule of interest
92  \param force forces the value to be recalculated instead
93  of pulled from the cache
94 */
95 RDKIT_DESCRIPTORS_EXPORT double calcChi1n(const ROMol &mol, bool force = false);
96 const std::string chi1nVersion = "1.2.0";
97 //! Similar to Hall Kier ChiXv, but uses nVal instead of valence
98 //! This makes a big difference after we get out of the first row.
99 /*!
100  \param mol the molecule of interest
101  \param force forces the value to be recalculated instead
102  of pulled from the cache
103 */
104 RDKIT_DESCRIPTORS_EXPORT double calcChi2n(const ROMol &mol, bool force = false);
105 const std::string chi2nVersion = "1.2.0";
106 //! Similar to Hall Kier ChiXv, but uses nVal instead of valence
107 //! This makes a big difference after we get out of the first row.
108 /*!
109  \param mol the molecule of interest
110  \param force forces the value to be recalculated instead
111  of pulled from the cache
112 */
113 RDKIT_DESCRIPTORS_EXPORT double calcChi3n(const ROMol &mol, bool force = false);
114 const std::string chi3nVersion = "1.2.0";
115 //! Similar to Hall Kier ChiXv, but uses nVal instead of valence
116 //! This makes a big difference after we get out of the first row.
117 /*!
118  \param mol the molecule of interest
119  \param force forces the value to be recalculated instead
120  of pulled from the cache
121 */
122 RDKIT_DESCRIPTORS_EXPORT double calcChi4n(const ROMol &mol, bool force = false);
123 const std::string chi4nVersion = "1.2.0";
124 //! Similar to Hall Kier ChiXv, but uses nVal instead of valence
125 //! This makes a big difference after we get out of the first row.
126 /*!
127  \param mol the molecule of interest
128  \param n the order of the connectivity index
129  \param force forces the value to be recalculated instead
130  of pulled from the cache
131 */
132 RDKIT_DESCRIPTORS_EXPORT double calcChiNn(const ROMol &mol, unsigned int n,
133  bool force = false);
134 const std::string chiNnVersion = "1.2.0";
135 
136 //! calculate the Hall-Kier alpha value for a molecule
137 //! From equation (58) of Rev. Comp. Chem. vol 2, 367-422, (1991)
138 /*!
139  \param mol the molecule of interest
140  \param atomContribs if provided, this will be used to return the
141  contributions
142  of the individual atoms to the value. These do not
143  neccessarily sum to the full value.
144  Note: this can be a time-consuming calculation.
145 */
147  const ROMol &mol, std::vector<double> *atomContribs = 0);
148 const std::string hallKierAlphaVersion = "1.2.0";
149 
150 //! calculate the Hall-Kier kappa1 value for a molecule
151 //! From equations (58) and (59) of Rev. Comp. Chem. vol 2, 367-422, (1991)
152 /*!
153  \param mol the molecule of interest
154 */
155 RDKIT_DESCRIPTORS_EXPORT double calcKappa1(const ROMol &mol);
156 const std::string kappa1Version = "1.1.0";
157 
158 //! calculate the Hall-Kier kappa2 value for a molecule
159 //! From equations (58) and (60) of Rev. Comp. Chem. vol 2, 367-422, (1991)
160 /*!
161  \param mol the molecule of interest
162 */
163 RDKIT_DESCRIPTORS_EXPORT double calcKappa2(const ROMol &mol);
164 const std::string kappa2Version = "1.1.0";
165 
166 //! calculate the Hall-Kier kappa3 value for a molecule
167 //! From equations (58), (61) and (62) of Rev. Comp. Chem. vol 2, 367-422,
168 //(1991)
169 /*!
170  \param mol the molecule of interest
171 */
172 RDKIT_DESCRIPTORS_EXPORT double calcKappa3(const ROMol &mol);
173 const std::string kappa3Version = "1.1.0";
174 
175 namespace detail {
176 RDKIT_DESCRIPTORS_EXPORT void hkDeltas(const ROMol &mol,
177  std::vector<double> &deltas, bool force);
178 }
179 
180 } // end of namespace Descriptors
181 } // namespace RDKit
182 
183 #endif
RDKit::Descriptors::chi0nVersion
const std::string chi0nVersion
Definition: ConnectivityDescriptors.h:87
RDKit::Descriptors::chi4nVersion
const std::string chi4nVersion
Definition: ConnectivityDescriptors.h:123
RDKit::Descriptors::calcChiNn
RDKIT_DESCRIPTORS_EXPORT double calcChiNn(const ROMol &mol, unsigned int n, bool force=false)
RDKit::Descriptors::kappa2Version
const std::string kappa2Version
Definition: ConnectivityDescriptors.h:164
RDKit::Descriptors::chi2nVersion
const std::string chi2nVersion
Definition: ConnectivityDescriptors.h:105
RDKit::Descriptors::calcChi3v
RDKIT_DESCRIPTORS_EXPORT double calcChi3v(const ROMol &mol, bool force=false)
From equations (5),(9) and (10) of Rev. Comp. Chem. vol 2, 367-422, (1991)
RDKIT_DESCRIPTORS_EXPORT
#define RDKIT_DESCRIPTORS_EXPORT
Definition: export.h:138
RDKit::Descriptors::chiNvVersion
const std::string chiNvVersion
Definition: ConnectivityDescriptors.h:77
RDKit::Descriptors::calcKappa2
RDKIT_DESCRIPTORS_EXPORT double calcKappa2(const ROMol &mol)
RDKit::Descriptors::chi1vVersion
const std::string chi1vVersion
Definition: ConnectivityDescriptors.h:43
RDKit::Descriptors::calcChi0v
RDKIT_DESCRIPTORS_EXPORT double calcChi0v(const ROMol &mol, bool force=false)
From equations (5),(9) and (10) of Rev. Comp. Chem. vol 2, 367-422, (1991)
RDKit::Descriptors::kappa1Version
const std::string kappa1Version
Definition: ConnectivityDescriptors.h:156
RDKit::Descriptors::calcKappa3
RDKIT_DESCRIPTORS_EXPORT double calcKappa3(const ROMol &mol)
RDKit::Descriptors::chi4vVersion
const std::string chi4vVersion
Definition: ConnectivityDescriptors.h:67
RDKit::ROMol
Definition: ROMol.h:171
RDKit::Descriptors::chi3nVersion
const std::string chi3nVersion
Definition: ConnectivityDescriptors.h:114
RDKit::Descriptors::calcChi4n
RDKIT_DESCRIPTORS_EXPORT double calcChi4n(const ROMol &mol, bool force=false)
RDKit::Descriptors::calcKappa1
RDKIT_DESCRIPTORS_EXPORT double calcKappa1(const ROMol &mol)
RDKit::Descriptors::calcChi1v
RDKIT_DESCRIPTORS_EXPORT double calcChi1v(const ROMol &mol, bool force=false)
From equations (5),(9) and (10) of Rev. Comp. Chem. vol 2, 367-422, (1991)
RDKit::Descriptors::chi2vVersion
const std::string chi2vVersion
Definition: ConnectivityDescriptors.h:51
RDKit::Descriptors::kappa3Version
const std::string kappa3Version
Definition: ConnectivityDescriptors.h:173
RDKit::Descriptors::chiNnVersion
const std::string chiNnVersion
Definition: ConnectivityDescriptors.h:134
RDKit::Descriptors::calcChi2v
RDKIT_DESCRIPTORS_EXPORT double calcChi2v(const ROMol &mol, bool force=false)
From equations (5),(9) and (10) of Rev. Comp. Chem. vol 2, 367-422, (1991)
RDKit::Descriptors::calcChiNv
RDKIT_DESCRIPTORS_EXPORT double calcChiNv(const ROMol &mol, unsigned int n, bool force=false)
From equations (5),(9) and (10) of Rev. Comp. Chem. vol 2, 367-422, (1991)
RDKit::Descriptors::calcChi4v
RDKIT_DESCRIPTORS_EXPORT double calcChi4v(const ROMol &mol, bool force=false)
From equations (5),(9) and (10) of Rev. Comp. Chem. vol 2, 367-422, (1991)
RDKit::Descriptors::calcHallKierAlpha
RDKIT_DESCRIPTORS_EXPORT double calcHallKierAlpha(const ROMol &mol, std::vector< double > *atomContribs=0)
RDKit::Descriptors::calcChi2n
RDKIT_DESCRIPTORS_EXPORT double calcChi2n(const ROMol &mol, bool force=false)
RDKit::Descriptors::calcChi1n
RDKIT_DESCRIPTORS_EXPORT double calcChi1n(const ROMol &mol, bool force=false)
RDKit::Descriptors::calcChi3n
RDKIT_DESCRIPTORS_EXPORT double calcChi3n(const ROMol &mol, bool force=false)
RDKit
Std stuff.
Definition: Atom.h:30
RDKit::Descriptors::hallKierAlphaVersion
const std::string hallKierAlphaVersion
Definition: ConnectivityDescriptors.h:148
RDKit::Descriptors::chi0vVersion
const std::string chi0vVersion
Definition: ConnectivityDescriptors.h:35
RDKit::Descriptors::chi3vVersion
const std::string chi3vVersion
Definition: ConnectivityDescriptors.h:59
RDKit::Descriptors::detail::hkDeltas
RDKIT_DESCRIPTORS_EXPORT void hkDeltas(const ROMol &mol, std::vector< double > &deltas, bool force)
RDKit::Descriptors::calcChi0n
RDKIT_DESCRIPTORS_EXPORT double calcChi0n(const ROMol &mol, bool force=false)
RDKit::Descriptors::chi1nVersion
const std::string chi1nVersion
Definition: ConnectivityDescriptors.h:96
export.h