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