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, bool force = false);
76 const std::string chiNvVersion = "1.2.0";
77 
78 //! Similar to Hall Kier ChiXv, but uses nVal instead of valence
79 //! This makes a big difference after we get out of the first row.
80 /*!
81  \param mol the molecule of interest
82  \param force forces the value to be recalculated instead
83  of pulled from the cache
84 */
85 RDKIT_DESCRIPTORS_EXPORT double calcChi0n(const ROMol &mol, bool force = false);
86 const std::string chi0nVersion = "1.2.0";
87 //! Similar to Hall Kier ChiXv, but uses nVal instead of valence
88 //! This makes a big difference after we get out of the first row.
89 /*!
90  \param mol the molecule of interest
91  \param force forces the value to be recalculated instead
92  of pulled from the cache
93 */
94 RDKIT_DESCRIPTORS_EXPORT double calcChi1n(const ROMol &mol, bool force = false);
95 const std::string chi1nVersion = "1.2.0";
96 //! Similar to Hall Kier ChiXv, but uses nVal instead of valence
97 //! This makes a big difference after we get out of the first row.
98 /*!
99  \param mol the molecule of interest
100  \param force forces the value to be recalculated instead
101  of pulled from the cache
102 */
103 RDKIT_DESCRIPTORS_EXPORT double calcChi2n(const ROMol &mol, bool force = false);
104 const std::string chi2nVersion = "1.2.0";
105 //! Similar to Hall Kier ChiXv, but uses nVal instead of valence
106 //! This makes a big difference after we get out of the first row.
107 /*!
108  \param mol the molecule of interest
109  \param force forces the value to be recalculated instead
110  of pulled from the cache
111 */
112 RDKIT_DESCRIPTORS_EXPORT double calcChi3n(const ROMol &mol, bool force = false);
113 const std::string chi3nVersion = "1.2.0";
114 //! Similar to Hall Kier ChiXv, but uses nVal instead of valence
115 //! This makes a big difference after we get out of the first row.
116 /*!
117  \param mol the molecule of interest
118  \param force forces the value to be recalculated instead
119  of pulled from the cache
120 */
121 RDKIT_DESCRIPTORS_EXPORT double calcChi4n(const ROMol &mol, bool force = false);
122 const std::string chi4nVersion = "1.2.0";
123 //! Similar to Hall Kier ChiXv, but uses nVal instead of valence
124 //! This makes a big difference after we get out of the first row.
125 /*!
126  \param mol the molecule of interest
127  \param n the order of the connectivity index
128  \param force forces the value to be recalculated instead
129  of pulled from the cache
130 */
131 RDKIT_DESCRIPTORS_EXPORT double calcChiNn(const ROMol &mol, unsigned int n, bool force = false);
132 const std::string chiNnVersion = "1.2.0";
133 
134 //! calculate the Hall-Kier alpha value for a molecule
135 //! From equation (58) of Rev. Comp. Chem. vol 2, 367-422, (1991)
136 /*!
137  \param mol the molecule of interest
138  \param atomContribs if provided, this will be used to return the
139  contributions
140  of the individual atoms to the value. These do not
141  neccessarily sum to the full value.
142  Note: this can be a time-consuming calculation.
143 */
145  std::vector<double> *atomContribs = 0);
146 const std::string hallKierAlphaVersion = "1.2.0";
147 
148 //! calculate the Hall-Kier kappa1 value for a molecule
149 //! From equations (58) and (59) of Rev. Comp. Chem. vol 2, 367-422, (1991)
150 /*!
151  \param mol the molecule of interest
152 */
153 RDKIT_DESCRIPTORS_EXPORT double calcKappa1(const ROMol &mol);
154 const std::string kappa1Version = "1.1.0";
155 
156 //! calculate the Hall-Kier kappa2 value for a molecule
157 //! From equations (58) and (60) of Rev. Comp. Chem. vol 2, 367-422, (1991)
158 /*!
159  \param mol the molecule of interest
160 */
161 RDKIT_DESCRIPTORS_EXPORT double calcKappa2(const ROMol &mol);
162 const std::string kappa2Version = "1.1.0";
163 
164 //! calculate the Hall-Kier kappa3 value for a molecule
165 //! From equations (58), (61) and (62) of Rev. Comp. Chem. vol 2, 367-422,
166 //(1991)
167 /*!
168  \param mol the molecule of interest
169 */
170 RDKIT_DESCRIPTORS_EXPORT double calcKappa3(const ROMol &mol);
171 const std::string kappa3Version = "1.1.0";
172 
173 namespace detail {
174 RDKIT_DESCRIPTORS_EXPORT void hkDeltas(const ROMol &mol, std::vector<double> &deltas, bool force);
175 }
176 
177 } // end of namespace Descriptors
178 }
179 
180 #endif
const std::string chi4vVersion
const std::string chiNvVersion
const std::string chi2nVersion
const std::string chi1nVersion
RDKIT_DESCRIPTORS_EXPORT void hkDeltas(const ROMol &mol, std::vector< double > &deltas, bool force)
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)
const std::string kappa1Version
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_EXPORT double calcChi2v(const ROMol &mol, bool force=false)
From equations (5),(9) and (10) of Rev. Comp. Chem. vol 2, 367-422, (1991)
const std::string chiNnVersion
const std::string kappa2Version
#define RDKIT_DESCRIPTORS_EXPORT
Definition: export.h:138
RDKIT_DESCRIPTORS_EXPORT double calcChi4n(const ROMol &mol, bool force=false)
const std::string chi3nVersion
const std::string chi1vVersion
const std::string hallKierAlphaVersion
RDKIT_DESCRIPTORS_EXPORT double calcHallKierAlpha(const ROMol &mol, std::vector< double > *atomContribs=0)
RDKIT_DESCRIPTORS_EXPORT double calcChi2n(const ROMol &mol, bool force=false)
const std::string chi3vVersion
const std::string kappa3Version
Std stuff.
Definition: Atom.h:30
RDKIT_DESCRIPTORS_EXPORT double calcKappa3(const ROMol &mol)
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_EXPORT double calcKappa1(const ROMol &mol)
RDKIT_DESCRIPTORS_EXPORT double calcChi0n(const ROMol &mol, bool force=false)
RDKIT_DESCRIPTORS_EXPORT double calcChi1n(const ROMol &mol, bool force=false)
const std::string chi2vVersion
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)
const std::string chi0nVersion
const std::string chi4nVersion
RDKIT_DESCRIPTORS_EXPORT double calcChiNn(const ROMol &mol, unsigned int n, bool force=false)
RDKIT_DESCRIPTORS_EXPORT double calcChi3n(const ROMol &mol, bool force=false)
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)
const std::string chi0vVersion
RDKIT_DESCRIPTORS_EXPORT double calcKappa2(const ROMol &mol)