RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
Crippen.h
Go to the documentation of this file.
1//
2// Copyright (C) 2004-2007 Greg Landrum and Rational Discovery LLC
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 Crippen.h
12
13 \brief Use MolDescriptors.h in client code.
14
15*/
16#include <RDGeneral/export.h>
17#ifndef __RD_CRIPPEN_H__
18#define __RD_CRIPPEN_H__
19
20#include <string>
21#include <vector>
22#include <boost/smart_ptr.hpp>
23
24namespace RDKit {
25class ROMol;
26namespace Descriptors {
27const std::string crippenVersion = "1.2.0";
28
29//! generate atomic contributions to the Wildman-Crippen LogP and MR
30//! estimates for a molecule
31/*!
32 Uses an atom-based scheme based on the values in the paper:
33 S. A. Wildman and G. M. Crippen JCICS 39 868-873 (1999)
34
35 \param mol the molecule of interest
36 \param logpContribs used to return the logp contributions, must
37 be equal in length to the number of atoms
38 \param mrContribs used to return the MR contributions, must
39 be equal in length to the number of atoms
40 \param force forces the value to be recalculated instead
41 of pulled from the cache
42 \param atomTypes if provided will be used to return the indices
43 of the atom types, should be as long as the
44 number of atoms
45 \param atomTypeLabels if provided will be used to return the labels
46 of the atom types, should be as long as the
47 number of atoms
48
49*/
51 const ROMol &mol, std::vector<double> &logpContribs,
52 std::vector<double> &mrContribs, bool force = false,
53 std::vector<unsigned int> *atomTypes = nullptr,
54 std::vector<std::string> *atomTypeLabels = nullptr);
55
56//! generate Wildman-Crippen LogP and MR estimates for a molecule
57/*!
58 Uses an atom-based scheme based on the values in the paper:
59 S. A. Wildman and G. M. Crippen JCICS 39 868-873 (1999)
60
61 \param mol the molecule of interest
62 \param logp used to return the logp estimate
63 \param mr used to return the MR estimate
64 \param includeHs (optional) if this is true (the default), a
65 copy of \c mol is made and Hs are added to it. If false,
66 Hs that are not explicitly present in the graph will not
67 be included.
68 \param force forces the value to be recalculated instead of
69 pulled from the cache
70
71*/
73 double &logp, double &mr,
74 bool includeHs = true,
75 bool force = false);
76
77//! a class used to store Crippen parameters
79 public:
80 boost::shared_ptr<const ROMol> dp_pattern;
81 unsigned int idx;
82 std::string label;
83 std::string smarts;
84 double logp;
85 double mr;
87};
88
90//! calculate the default Wildman-Crippen LogP for a molecule
91/*!
92 See calcCrippenDescriptors
93 \param mol the molecule of interest
94 */
96
97const std::string CrippenMRVersion = crippenVersion;
98//! calculate the default Wildman-Crippen MR Estimate for a molecule
99/*!
100 See calcCrippenDescriptors
101 \param mol the molecule of interest
102 */
104
105//! singleton class for retrieving Crippen parameters
106/*!
107 Use the singleton like this:
108
109 \verbatim
110 CrippenParamCollection *params=CrippenParamCollection::getParams();
111 \endverbatim
112
113 If you have your own parameter data, it can be supplied as a string:
114 \verbatim
115 CrippenParamCollection *params=CrippenParamCollection::getParams(myParamData);
116 \endverbatim
117 You are responsible for making sure that the data is in the correct
118 format (see Crippen.cpp for an example).
119
120*/
122 public:
123 typedef std::vector<CrippenParams> ParamsVect;
125 const std::string &paramData = "");
126 ParamsVect::const_iterator begin() const { return d_params.begin(); }
127 ParamsVect::const_iterator end() const { return d_params.end(); }
128
129 CrippenParamCollection(const std::string &paramData);
130
131 private:
132 ParamsVect d_params; //!< the parameters
133};
134} // end of namespace Descriptors
135} // namespace RDKit
136
137#endif
singleton class for retrieving Crippen parameters
Definition Crippen.h:121
static const CrippenParamCollection * getParams(const std::string &paramData="")
ParamsVect::const_iterator begin() const
Definition Crippen.h:126
ParamsVect::const_iterator end() const
Definition Crippen.h:127
CrippenParamCollection(const std::string &paramData)
std::vector< CrippenParams > ParamsVect
Definition Crippen.h:123
a class used to store Crippen parameters
Definition Crippen.h:78
boost::shared_ptr< const ROMol > dp_pattern
Definition Crippen.h:80
#define RDKIT_DESCRIPTORS_EXPORT
Definition export.h:105
RDKIT_DESCRIPTORS_EXPORT double calcMR(const ROMol &mol)
calculate the default Wildman-Crippen MR Estimate for a molecule
const std::string CrippenMRVersion
Definition Crippen.h:97
RDKIT_DESCRIPTORS_EXPORT void calcCrippenDescriptors(const ROMol &mol, double &logp, double &mr, bool includeHs=true, bool force=false)
generate Wildman-Crippen LogP and MR estimates for a molecule
const std::string crippenVersion
Definition Crippen.h:27
const std::string CrippenClogPVersion
Definition Crippen.h:89
RDKIT_DESCRIPTORS_EXPORT double calcClogP(const ROMol &mol)
calculate the default Wildman-Crippen LogP for a molecule
RDKIT_DESCRIPTORS_EXPORT void getCrippenAtomContribs(const ROMol &mol, std::vector< double > &logpContribs, std::vector< double > &mrContribs, bool force=false, std::vector< unsigned int > *atomTypes=nullptr, std::vector< std::string > *atomTypeLabels=nullptr)
Std stuff.
bool rdvalue_is(const RDValue_cast_t)