RDKit: Lipinski.h Source File

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
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
22namespace RDKit {
23class ROMol;
24namespace 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
35 enum NumRotatableBondsOptions {
36 Default = -1,
37 NonStrict = 0,
38 Strict = 1,
39 StrictLinkages = 2,
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*/
52 RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumRotatableBonds(
53 const ROMol &mol, 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,
62 bool strict);
63
64 RDKIT_DESCRIPTORS_EXPORT extern const std::string NumHBDVersion;
65//! calculates the number of H-bond donors
66 RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumHBD(const ROMol &mol);
67
68 RDKIT_DESCRIPTORS_EXPORT extern const std::string NumHBAVersion;
69//! calculates the number of H-bond acceptors
70 RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumHBA(const ROMol &mol);
71
72 RDKIT_DESCRIPTORS_EXPORT extern const std::string NumHeteroatomsVersion;
73//! calculates the number of heteroatoms
74 RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumHeteroatoms(const ROMol &mol);
75
76 RDKIT_DESCRIPTORS_EXPORT extern const std::string NumAmideBondsVersion;
77//! calculates the number of amide bonds
78 RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAmideBonds(const ROMol &mol);
79
80 RDKIT_DESCRIPTORS_EXPORT extern const std::string FractionCSP3Version;
81//! calculates the fraction of carbons that are SP3 hybridized
82 RDKIT_DESCRIPTORS_EXPORT double calcFractionCSP3(const ROMol &mol);
83
84 RDKIT_DESCRIPTORS_EXPORT extern const std::string NumRingsVersion;
85//! calculates the number of SSSR rings
86 RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumRings(const ROMol &mol);
87
88 RDKIT_DESCRIPTORS_EXPORT extern const std::string NumAromaticRingsVersion;
89//! calculates the number of aromatic SSSR rings
90 RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAromaticRings(const ROMol &mol);
91
92 RDKIT_DESCRIPTORS_EXPORT extern const std::string NumAliphaticRingsVersion;
93//! calculates the number of aliphatic (at least one non-aromatic bond) SSSR
94/// rings
95 RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAliphaticRings(const ROMol &mol);
96
97 RDKIT_DESCRIPTORS_EXPORT extern const std::string NumSaturatedRingsVersion;
98//! calculates the number of saturated SSSR rings
99 RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumSaturatedRings(const ROMol &mol);
100
101 RDKIT_DESCRIPTORS_EXPORT extern const std::string NumHeterocyclesVersion;
102//! calculates the number of SSSR heterocycles
103 RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumHeterocycles(const ROMol &mol);
104
105 RDKIT_DESCRIPTORS_EXPORT extern const std::string
106 NumAromaticHeterocyclesVersion;
107//! calculates the number of aromatic SSSR heterocycles
108 RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAromaticHeterocycles(
109 const ROMol &mol);
110
111 RDKIT_DESCRIPTORS_EXPORT extern const std::string NumAromaticCarbocyclesVersion;
112//! calculates the number of aromatic SSSR carbocycles
113 RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAromaticCarbocycles(
114 const ROMol &mol);
115
116 RDKIT_DESCRIPTORS_EXPORT extern const std::string
117 NumSaturatedHeterocyclesVersion;
118//! calculates the number of saturated SSSR heterocycles
119 RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumSaturatedHeterocycles(
120 const ROMol &mol);
121
122 RDKIT_DESCRIPTORS_EXPORT extern const std::string
123 NumSaturatedCarbocyclesVersion;
124//! calculates the number of saturated SSSR carbocycles
125 RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumSaturatedCarbocycles(
126 const ROMol &mol);
127
128 RDKIT_DESCRIPTORS_EXPORT extern const std::string
129 NumAliphaticHeterocyclesVersion;
130//! calculates the number of aliphatic (at least one non-aromatic bond) SSSR
131/// heterocycles
132 RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAliphaticHeterocycles(
133 const ROMol &mol);
134
135 RDKIT_DESCRIPTORS_EXPORT extern const std::string
136 NumAliphaticCarbocyclesVersion;
137//! calculates the number of aliphatic (at least one non-aromatic bond) SSSR
138/// carbocycles
139 RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAliphaticCarbocycles(
140 const ROMol &mol);
141
142 RDKIT_DESCRIPTORS_EXPORT extern const std::string NumSpiroAtomsVersion;
143//! calculates the number of spiro atoms (atoms shared between rings that share
144/// exactly one atom)
145 RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumSpiroAtoms(
146 const ROMol &mol, std::vector<unsigned int> *atoms = nullptr);
147
148 RDKIT_DESCRIPTORS_EXPORT extern const std::string NumBridgeheadAtomsVersion;
149//! calculates the number of bridgehead atoms (atoms shared between rings that
150/// share at least two bonds)
151 RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumBridgeheadAtoms(
152 const ROMol &mol, std::vector<unsigned int> *atoms = nullptr);
153
154 RDKIT_DESCRIPTORS_EXPORT extern const std::string NumAtomStereoCentersVersion;
155//! calculates the total number of atom stereo centers
156 RDKIT_DESCRIPTORS_EXPORT unsigned numAtomStereoCenters(const ROMol &mol);
157
158//! calculates the number of unspecified stereo atom stereo centers
159 RDKIT_DESCRIPTORS_EXPORT extern const std::string
160 NumUnspecifiedAtomStereoCentersVersion;
161 RDKIT_DESCRIPTORS_EXPORT unsigned numUnspecifiedAtomStereoCenters(
162 const ROMol &mol);
163
164//! Helper function to register the descriptors with the descriptor service
165 RDKIT_DESCRIPTORS_EXPORT void registerDescriptors();
166} // end of namespace Descriptors
167} // end of namespace RDKit
168
169#endif
RegisterDescriptor.h
RDKit::ROMol
Definition ROMol.h:199
export.h
RDKIT_DESCRIPTORS_EXPORT
#define RDKIT_DESCRIPTORS_EXPORT
Definition export.h:113
RDKit::Descriptors
Definition AtomFeat.h:30
RDKit::Descriptors::calcNumSaturatedCarbocycles
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumSaturatedCarbocycles(const ROMol &mol)
calculates the number of saturated SSSR carbocycles
RDKit::Descriptors::NumAmideBondsVersion
RDKIT_DESCRIPTORS_EXPORT const std::string NumAmideBondsVersion
RDKit::Descriptors::calcNumHBA
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumHBA(const ROMol &mol)
calculates the number of H-bond acceptors
RDKit::Descriptors::calcNumHBD
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumHBD(const ROMol &mol)
calculates the number of H-bond donors
RDKit::Descriptors::calcNumBridgeheadAtoms
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumBridgeheadAtoms(const ROMol &mol, std::vector< unsigned int > *atoms=nullptr)
RDKit::Descriptors::NumHBDVersion
RDKIT_DESCRIPTORS_EXPORT const std::string NumHBDVersion
RDKit::Descriptors::lipinskiHBDVersion
const std::string lipinskiHBDVersion
Definition Lipinski.h:30
RDKit::Descriptors::NumRotatableBondsVersion
RDKIT_DESCRIPTORS_EXPORT const std::string NumRotatableBondsVersion
RDKit::Descriptors::NumSaturatedCarbocyclesVersion
RDKIT_DESCRIPTORS_EXPORT const std::string NumSaturatedCarbocyclesVersion
RDKit::Descriptors::FractionCSP3Version
RDKIT_DESCRIPTORS_EXPORT const std::string FractionCSP3Version
RDKit::Descriptors::calcNumAliphaticRings
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAliphaticRings(const ROMol &mol)
RDKit::Descriptors::numUnspecifiedAtomStereoCenters
RDKIT_DESCRIPTORS_EXPORT unsigned numUnspecifiedAtomStereoCenters(const ROMol &mol)
RDKit::Descriptors::NumBridgeheadAtomsVersion
RDKIT_DESCRIPTORS_EXPORT const std::string NumBridgeheadAtomsVersion
RDKit::Descriptors::calcNumAromaticRings
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAromaticRings(const ROMol &mol)
calculates the number of aromatic SSSR rings
RDKit::Descriptors::calcFractionCSP3
RDKIT_DESCRIPTORS_EXPORT double calcFractionCSP3(const ROMol &mol)
calculates the fraction of carbons that are SP3 hybridized
RDKit::Descriptors::calcLipinskiHBA
RDKIT_DESCRIPTORS_EXPORT unsigned int calcLipinskiHBA(const ROMol &mol)
calculates the standard Lipinski HBA definition (number of Ns and Os)
RDKit::Descriptors::calcNumRotatableBonds
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumRotatableBonds(const ROMol &mol, NumRotatableBondsOptions useStrictDefinition=Default)
calculates the number of rotatable bonds
RDKit::Descriptors::NumHeteroatomsVersion
RDKIT_DESCRIPTORS_EXPORT const std::string NumHeteroatomsVersion
RDKit::Descriptors::NumAromaticRingsVersion
RDKIT_DESCRIPTORS_EXPORT const std::string NumAromaticRingsVersion
RDKit::Descriptors::NumHBAVersion
RDKIT_DESCRIPTORS_EXPORT const std::string NumHBAVersion
RDKit::Descriptors::lipinskiHBAVersion
const std::string lipinskiHBAVersion
Definition Lipinski.h:26
RDKit::Descriptors::calcNumSpiroAtoms
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumSpiroAtoms(const ROMol &mol, std::vector< unsigned int > *atoms=nullptr)
RDKit::Descriptors::calcNumAliphaticCarbocycles
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAliphaticCarbocycles(const ROMol &mol)
RDKit::Descriptors::NumAtomStereoCentersVersion
RDKIT_DESCRIPTORS_EXPORT const std::string NumAtomStereoCentersVersion
RDKit::Descriptors::calcNumAromaticCarbocycles
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAromaticCarbocycles(const ROMol &mol)
calculates the number of aromatic SSSR carbocycles
RDKit::Descriptors::calcLipinskiHBD
RDKIT_DESCRIPTORS_EXPORT unsigned int calcLipinskiHBD(const ROMol &mol)
RDKit::Descriptors::NumRingsVersion
RDKIT_DESCRIPTORS_EXPORT const std::string NumRingsVersion
RDKit::Descriptors::NumSaturatedRingsVersion
RDKIT_DESCRIPTORS_EXPORT const std::string NumSaturatedRingsVersion
RDKit::Descriptors::NumSpiroAtomsVersion
RDKIT_DESCRIPTORS_EXPORT const std::string NumSpiroAtomsVersion
RDKit::Descriptors::registerDescriptors
RDKIT_DESCRIPTORS_EXPORT void registerDescriptors()
Helper function to register the descriptors with the descriptor service.
RDKit::Descriptors::calcNumSaturatedHeterocycles
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumSaturatedHeterocycles(const ROMol &mol)
calculates the number of saturated SSSR heterocycles
RDKit::Descriptors::NumSaturatedHeterocyclesVersion
RDKIT_DESCRIPTORS_EXPORT const std::string NumSaturatedHeterocyclesVersion
RDKit::Descriptors::calcNumAliphaticHeterocycles
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAliphaticHeterocycles(const ROMol &mol)
RDKit::Descriptors::NumUnspecifiedAtomStereoCentersVersion
RDKIT_DESCRIPTORS_EXPORT const std::string NumUnspecifiedAtomStereoCentersVersion
calculates the number of unspecified stereo atom stereo centers
RDKit::Descriptors::calcNumHeteroatoms
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumHeteroatoms(const ROMol &mol)
calculates the number of heteroatoms
RDKit::Descriptors::calcNumSaturatedRings
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumSaturatedRings(const ROMol &mol)
calculates the number of saturated SSSR rings
RDKit::Descriptors::NumAliphaticCarbocyclesVersion
RDKIT_DESCRIPTORS_EXPORT const std::string NumAliphaticCarbocyclesVersion
RDKit::Descriptors::NumAromaticHeterocyclesVersion
RDKIT_DESCRIPTORS_EXPORT const std::string NumAromaticHeterocyclesVersion
RDKit::Descriptors::NumAromaticCarbocyclesVersion
RDKIT_DESCRIPTORS_EXPORT const std::string NumAromaticCarbocyclesVersion
RDKit::Descriptors::calcNumAmideBonds
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAmideBonds(const ROMol &mol)
calculates the number of amide bonds
RDKit::Descriptors::calcNumHeterocycles
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumHeterocycles(const ROMol &mol)
calculates the number of SSSR heterocycles
RDKit::Descriptors::numAtomStereoCenters
RDKIT_DESCRIPTORS_EXPORT unsigned numAtomStereoCenters(const ROMol &mol)
calculates the total number of atom stereo centers
RDKit::Descriptors::NumRotatableBondsOptions
NumRotatableBondsOptions
Definition Lipinski.h:35
RDKit::Descriptors::Default
@ Default
Definition Lipinski.h:36
RDKit::Descriptors::Strict
@ Strict
Definition Lipinski.h:38
RDKit::Descriptors::StrictLinkages
@ StrictLinkages
Definition Lipinski.h:39
RDKit::Descriptors::NonStrict
@ NonStrict
Definition Lipinski.h:37
RDKit::Descriptors::NumAliphaticHeterocyclesVersion
RDKIT_DESCRIPTORS_EXPORT const std::string NumAliphaticHeterocyclesVersion
RDKit::Descriptors::NumAliphaticRingsVersion
RDKIT_DESCRIPTORS_EXPORT const std::string NumAliphaticRingsVersion
RDKit::Descriptors::calcNumRings
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumRings(const ROMol &mol)
calculates the number of SSSR rings
RDKit::Descriptors::calcNumAromaticHeterocycles
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAromaticHeterocycles(const ROMol &mol)
calculates the number of aromatic SSSR heterocycles
RDKit::Descriptors::NumHeterocyclesVersion
RDKIT_DESCRIPTORS_EXPORT const std::string NumHeterocyclesVersion
RDKit
Std stuff.
Definition Abbreviations.h:19