RDKit
Open-source cheminformatics and machine learning.
Lipinski.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2007-2011 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 Lipinski.h
12 
13  \brief Contains Lipinski and Lipinski-like descriptors. Use MolDescriptors.h
14  in client code.
15 
16 */
17 #ifndef __RD_LIPINSKI_H__
18 #define __RD_LIPINSKI_H__
19 #include "RegisterDescriptor.h"
20 
21 namespace RDKit {
22 class ROMol;
23 namespace Descriptors {
24 
25 const std::string lipinskiHBAVersion = "1.0.0";
26 //! calculates the standard Lipinski HBA definition (number of Ns and Os)
27 unsigned int calcLipinskiHBA(const ROMol &mol);
28 
29 const std::string lipinskiHBDVersion = "2.0.0";
30 //! calculates the standard Lipinski HBA definition (number of N-H and O-H
31 // bonds)
32 unsigned int calcLipinskiHBD(const ROMol &mol);
33 
35  Default = -1,
36  NonStrict = 0,
37  Strict = 1,
39 };
40 
41 extern const std::string NumRotatableBondsVersion;
42 //! calculates the number of rotatable bonds
43 /*!
44  \param mol the molecule of interest
45  \param strict if Strict, a stricter definition of rotable bonds is used
46  this excludes amides, esters, etc.
47  if StrictLinkages, a much stricter definition that
48  handles rotatable bonds between rings as well.
49  if Default - uses the default choice (normally Strict)
50 */
51 unsigned int calcNumRotatableBonds(const ROMol &mol,
52  NumRotatableBondsOptions useStrictDefinition=Default);
53 
54 //! calculates the number of rotatable bonds ( backwards compatibility function,
55 //! deprecated, please use calcNumRotatableBonds(const ROMol&, int)
56 /*!
57  \param mol the molecule of interest
58  \param strict if Strict == true, uses NumRotatableBondsOptions::Strict
59 */
60 unsigned int calcNumRotatableBonds(const ROMol &mol, bool strict);
61 
62 extern const std::string NumHBDVersion;
63 //! calculates the number of H-bond donors
64 unsigned int calcNumHBD(const ROMol &mol);
65 
66 extern const std::string NumHBAVersion;
67 //! calculates the number of H-bond acceptors
68 unsigned int calcNumHBA(const ROMol &mol);
69 
70 extern const std::string NumHeteroatomsVersion;
71 //! calculates the number of heteroatoms
72 unsigned int calcNumHeteroatoms(const ROMol &mol);
73 
74 extern const std::string NumAmideBondsVersion;
75 //! calculates the number of amide bonds
76 unsigned int calcNumAmideBonds(const ROMol &mol);
77 
78 extern const std::string FractionCSP3Version;
79 //! calculates the fraction of carbons that are SP3 hybridized
80 double calcFractionCSP3(const ROMol &mol);
81 
82 extern const std::string NumRingsVersion;
83 //! calculates the number of SSSR rings
84 unsigned int calcNumRings(const ROMol &mol);
85 
86 extern const std::string NumAromaticRingsVersion;
87 //! calculates the number of aromatic SSSR rings
88 unsigned int calcNumAromaticRings(const ROMol &mol);
89 
90 extern const std::string NumAliphaticRingsVersion;
91 //! calculates the number of aliphatic (at least one non-aromatic bond) SSSR
92 // rings
93 unsigned int calcNumAliphaticRings(const ROMol &mol);
94 
95 extern const std::string NumSaturatedRingsVersion;
96 //! calculates the number of saturated SSSR rings
97 unsigned int calcNumSaturatedRings(const ROMol &mol);
98 
99 extern const std::string NumHeterocyclesVersion;
100 //! calculates the number of SSSR heterocycles
101 unsigned int calcNumHeterocycles(const ROMol &mol);
102 
103 extern const std::string NumAromaticHeterocyclesVersion;
104 //! calculates the number of aromatic SSSR heterocycles
105 unsigned int calcNumAromaticHeterocycles(const ROMol &mol);
106 
107 extern const std::string NumAromaticCarbocyclesVersion;
108 //! calculates the number of aromatic SSSR carbocycles
109 unsigned int calcNumAromaticCarbocycles(const ROMol &mol);
110 
111 extern const std::string NumSaturatedHeterocyclesVersion;
112 //! calculates the number of saturated SSSR heterocycles
113 unsigned int calcNumSaturatedHeterocycles(const ROMol &mol);
114 
115 extern const std::string NumSaturatedCarbocyclesVersion;
116 //! calculates the number of saturated SSSR carbocycles
117 unsigned int calcNumSaturatedCarbocycles(const ROMol &mol);
118 
119 extern const std::string NumAliphaticHeterocyclesVersion;
120 //! calculates the number of aliphatic (at least one non-aromatic bond) SSSR
121 // heterocycles
122 unsigned int calcNumAliphaticHeterocycles(const ROMol &mol);
123 
124 extern const std::string NumAliphaticCarbocyclesVersion;
125 //! calculates the number of aliphatic (at least one non-aromatic bond) SSSR
126 // carbocycles
127 unsigned int calcNumAliphaticCarbocycles(const ROMol &mol);
128 
129 extern const std::string NumSpiroAtomsVersion;
130 //! calculates the number of spiro atoms (atoms shared between rings that share
131 // exactly one atom)
132 unsigned int calcNumSpiroAtoms(const ROMol &mol,
133  std::vector<unsigned int> *atoms = NULL);
134 
135 extern const std::string NumBridgeheadAtomsVersion;
136 //! calculates the number of bridgehead atoms (atoms shared between rings that
137 // share at least two bonds)
138 unsigned int calcNumBridgeheadAtoms(const ROMol &mol,
139  std::vector<unsigned int> *atoms = NULL);
140 
141 extern const std::string NumAtomStereoCentersVersion;
142 //! calculates the number of stereo atom stereo centers
143 unsigned numAtomStereoCenters(const ROMol &mol);
144 
145 //! calculates the number of unspecified stereo atom stereo centers
146 extern const std::string NumUnspecifiedAtomStereoCentersVersion;
147 unsigned numUnspecifiedAtomStereoCenters(const ROMol &mol);
148 
149 //! Helper function to register the descriptors with the descriptor service
150 void registerDescriptors();
151 } // end of namespace Descriptors
152 } // end of namespace RDKit
153 
154 #endif
unsigned int calcNumSpiroAtoms(const ROMol &mol, std::vector< unsigned int > *atoms=NULL)
calculates the number of spiro atoms (atoms shared between rings that share
const std::string NumAtomStereoCentersVersion
const std::string NumAliphaticCarbocyclesVersion
const std::string NumRotatableBondsVersion
unsigned int calcNumAromaticHeterocycles(const ROMol &mol)
calculates the number of aromatic SSSR heterocycles
const std::string NumAliphaticHeterocyclesVersion
const std::string NumSaturatedHeterocyclesVersion
void registerDescriptors()
Helper function to register the descriptors with the descriptor service.
const std::string NumUnspecifiedAtomStereoCentersVersion
calculates the number of unspecified stereo atom stereo centers
const std::string NumAliphaticRingsVersion
unsigned int calcNumSaturatedHeterocycles(const ROMol &mol)
calculates the number of saturated SSSR heterocycles
unsigned int calcNumHBD(const ROMol &mol)
calculates the number of H-bond donors
unsigned int calcNumSaturatedRings(const ROMol &mol)
calculates the number of saturated SSSR rings
const std::string FractionCSP3Version
const std::string NumAmideBondsVersion
const std::string NumAromaticRingsVersion
unsigned int calcNumAliphaticRings(const ROMol &mol)
calculates the number of aliphatic (at least one non-aromatic bond) SSSR
unsigned numUnspecifiedAtomStereoCenters(const ROMol &mol)
unsigned int calcNumBridgeheadAtoms(const ROMol &mol, std::vector< unsigned int > *atoms=NULL)
calculates the number of bridgehead atoms (atoms shared between rings that
ROMol is a molecule class that is intended to have a fixed topology.
Definition: ROMol.h:103
const std::string NumHeterocyclesVersion
unsigned int calcNumAromaticRings(const ROMol &mol)
calculates the number of aromatic SSSR rings
unsigned int calcLipinskiHBA(const ROMol &mol)
calculates the standard Lipinski HBA definition (number of Ns and Os)
unsigned int calcNumAliphaticCarbocycles(const ROMol &mol)
calculates the number of aliphatic (at least one non-aromatic bond) SSSR
unsigned int calcNumHeterocycles(const ROMol &mol)
calculates the number of SSSR heterocycles
const std::string NumRingsVersion
unsigned int calcNumAmideBonds(const ROMol &mol)
calculates the number of amide bonds
const std::string NumSpiroAtomsVersion
unsigned int calcNumRings(const ROMol &mol)
calculates the number of SSSR rings
unsigned int calcLipinskiHBD(const ROMol &mol)
calculates the standard Lipinski HBA definition (number of N-H and O-H
const std::string NumSaturatedRingsVersion
Includes a bunch of functionality for handling Atom and Bond queries.
Definition: Atom.h:29
unsigned int calcNumHBA(const ROMol &mol)
calculates the number of H-bond acceptors
const std::string NumHBAVersion
unsigned numAtomStereoCenters(const ROMol &mol)
calculates the number of stereo atom stereo centers
double calcFractionCSP3(const ROMol &mol)
calculates the fraction of carbons that are SP3 hybridized
const std::string NumAromaticHeterocyclesVersion
const std::string lipinskiHBDVersion
Definition: Lipinski.h:29
unsigned int calcNumSaturatedCarbocycles(const ROMol &mol)
calculates the number of saturated SSSR carbocycles
unsigned int calcNumAliphaticHeterocycles(const ROMol &mol)
calculates the number of aliphatic (at least one non-aromatic bond) SSSR
const std::string NumBridgeheadAtomsVersion
unsigned int calcNumHeteroatoms(const ROMol &mol)
calculates the number of heteroatoms
const std::string lipinskiHBAVersion
Definition: Lipinski.h:25
const std::string NumSaturatedCarbocyclesVersion
unsigned int calcNumRotatableBonds(const ROMol &mol, NumRotatableBondsOptions useStrictDefinition=Default)
calculates the number of rotatable bonds
const std::string NumHBDVersion
unsigned int calcNumAromaticCarbocycles(const ROMol &mol)
calculates the number of aromatic SSSR carbocycles
const std::string NumHeteroatomsVersion
const std::string NumAromaticCarbocyclesVersion