Skill Tracer
Skills › Scientific Agent Skills › rdkit › descriptors_reference.md

descriptors_reference.md

601 lines · skills/rdkit/references/descriptors_reference.md at 5f2bc03

Open on GitHub
1# RDKit Molecular Descriptors Reference
2
3Selected reference for molecular descriptors available in RDKit's `Descriptors` module.
4

RDKit Molecular Descriptors Reference

Selected reference for molecular descriptors available in RDKit's Descriptors module.

Raw lines 1 to 4
5## Usage
6
7```python
8from rdkit import Chem
9from rdkit.Chem import Descriptors
11mol = Chem.MolFromSmiles('CCO')
13# Calculate individual descriptor
14mw = Descriptors.MolWt(mol)
16# Calculate all descriptors at once
17all_desc = Descriptors.CalcMolDescriptors(mol)
18```

Usage

from rdkit import Chem
from rdkit.Chem import Descriptors

mol = Chem.MolFromSmiles('CCO')

# Calculate individual descriptor
mw = Descriptors.MolWt(mol)

# Calculate all descriptors at once
all_desc = Descriptors.CalcMolDescriptors(mol)
Raw lines 5 to 19
20## Molecular Weight and Mass

Molecular Weight and Mass

Raw lines 20 to 21
22### MolWt
23Average molecular weight (numerically g/mol), including implicit hydrogens.
24```python
25Descriptors.MolWt(mol)
26```

MolWt

Average molecular weight (numerically g/mol), including implicit hydrogens.

Descriptors.MolWt(mol)
Raw lines 22 to 27
28### ExactMolWt
29Monoisotopic mass (Da), honoring specified isotopes; not an ion m/z calculation.
30```python
31Descriptors.ExactMolWt(mol)
32```

ExactMolWt

Monoisotopic mass (Da), honoring specified isotopes; not an ion m/z calculation.

Descriptors.ExactMolWt(mol)
Raw lines 28 to 33
34### HeavyAtomMolWt
35Average molecular weight ignoring hydrogens.
36```python
37Descriptors.HeavyAtomMolWt(mol)
38```

HeavyAtomMolWt

Average molecular weight ignoring hydrogens.

Descriptors.HeavyAtomMolWt(mol)
Raw lines 34 to 39
40## Lipophilicity

Lipophilicity

Raw lines 40 to 41
42### MolLogP
43Wildman-Crippen estimate of octanol/water logP; not measured logP or pH-dependent logD.
44```python
45Descriptors.MolLogP(mol)
46```

MolLogP

Wildman-Crippen estimate of octanol/water logP; not measured logP or pH-dependent logD.

Descriptors.MolLogP(mol)
Raw lines 42 to 47
48### MolMR
49Wildman-Crippen molar refractivity.
50```python
51Descriptors.MolMR(mol)
52```

MolMR

Wildman-Crippen molar refractivity.

Descriptors.MolMR(mol)
Raw lines 48 to 53
54## Polar Surface Area

Polar Surface Area

Raw lines 54 to 55
56### TPSA
57Fragment-based TPSA in square angstrom. The default excludes sulfur/phosphorus
58contributions; request `rdMolDescriptors.CalcTPSA(mol, includeSandP=True)` explicitly
59if that is the intended definition.
60```python
61Descriptors.TPSA(mol)
62```

TPSA

Fragment-based TPSA in square angstrom. The default excludes sulfur/phosphorus contributions; request rdMolDescriptors.CalcTPSA(mol, includeSandP=True) explicitly if that is the intended definition.

Descriptors.TPSA(mol)
Raw lines 56 to 63
64### LabuteASA
65Labute's Approximate Surface Area (ASA).
66```python
67Descriptors.LabuteASA(mol)
68```

LabuteASA

Labute's Approximate Surface Area (ASA).

Descriptors.LabuteASA(mol)
Raw lines 64 to 69
70## Hydrogen Bonding

Hydrogen Bonding

Raw lines 70 to 71
72### NumHDonors
73Count under RDKit donor SMARTS rules; includes eligible N, O and S sites.
74```python
75Descriptors.NumHDonors(mol)
76```

NumHDonors

Count under RDKit donor SMARTS rules; includes eligible N, O and S sites.

Descriptors.NumHDonors(mol)
Raw lines 72 to 77
78### NumHAcceptors
79Count under RDKit acceptor SMARTS rules; not simply the count of N/O atoms.
80```python
81Descriptors.NumHAcceptors(mol)
82```

NumHAcceptors

Count under RDKit acceptor SMARTS rules; not simply the count of N/O atoms.

Descriptors.NumHAcceptors(mol)
Raw lines 78 to 83
84### NOCount
85Number of N and O atoms.
86```python
87Descriptors.NOCount(mol)
88```

NOCount

Number of N and O atoms.

Descriptors.NOCount(mol)
Raw lines 84 to 89
90### NHOHCount
91Number of N-H and O-H bonds.
92```python
93Descriptors.NHOHCount(mol)
94```

NHOHCount

Number of N-H and O-H bonds.

Descriptors.NHOHCount(mol)
Raw lines 90 to 95
96## Atom Counts
98### HeavyAtomCount
99Number of heavy atoms (non-hydrogen).
100```python
101Descriptors.HeavyAtomCount(mol)
102```

HeavyAtomCount

Number of heavy atoms (non-hydrogen).

Descriptors.HeavyAtomCount(mol)
Raw lines 98 to 103
104### NumHeteroatoms
105Number of heteroatoms (non-C and non-H).
106```python
107Descriptors.NumHeteroatoms(mol)
108```

NumHeteroatoms

Number of heteroatoms (non-C and non-H).

Descriptors.NumHeteroatoms(mol)
Raw lines 104 to 109
110### NumValenceElectrons
111Total number of valence electrons.
112```python
113Descriptors.NumValenceElectrons(mol)
114```

NumValenceElectrons

Total number of valence electrons.

Descriptors.NumValenceElectrons(mol)
Raw lines 110 to 115
116### NumRadicalElectrons
117Number of radical electrons.
118```python
119Descriptors.NumRadicalElectrons(mol)
120```

NumRadicalElectrons

Number of radical electrons.

Descriptors.NumRadicalElectrons(mol)
Raw lines 116 to 121
122## Ring Descriptors

Ring Descriptors

Raw lines 122 to 123
124### RingCount
125Number of rings.
126```python
127Descriptors.RingCount(mol)
128```

RingCount

Number of rings.

Descriptors.RingCount(mol)
Raw lines 124 to 129
130### NumAromaticRings
131Number of aromatic rings.
132```python
133Descriptors.NumAromaticRings(mol)
134```

NumAromaticRings

Number of aromatic rings.

Descriptors.NumAromaticRings(mol)
Raw lines 130 to 135
136### NumSaturatedRings
137Number of saturated rings.
138```python
139Descriptors.NumSaturatedRings(mol)
140```

NumSaturatedRings

Number of saturated rings.

Descriptors.NumSaturatedRings(mol)
Raw lines 136 to 141
142### NumAliphaticRings
143Number of aliphatic (non-aromatic) rings.
144```python
145Descriptors.NumAliphaticRings(mol)
146```

NumAliphaticRings

Number of aliphatic (non-aromatic) rings.

Descriptors.NumAliphaticRings(mol)
Raw lines 142 to 147
148### NumAromaticCarbocycles
149Number of aromatic carbocycles (rings with only carbons).
150```python
151Descriptors.NumAromaticCarbocycles(mol)
152```

NumAromaticCarbocycles

Number of aromatic carbocycles (rings with only carbons).

Descriptors.NumAromaticCarbocycles(mol)
Raw lines 148 to 153
154### NumAromaticHeterocycles
155Number of aromatic heterocycles (rings with heteroatoms).
156```python
157Descriptors.NumAromaticHeterocycles(mol)
158```

NumAromaticHeterocycles

Number of aromatic heterocycles (rings with heteroatoms).

Descriptors.NumAromaticHeterocycles(mol)
Raw lines 154 to 159
160### NumSaturatedCarbocycles
161Number of saturated carbocycles.
162```python
163Descriptors.NumSaturatedCarbocycles(mol)
164```

NumSaturatedCarbocycles

Number of saturated carbocycles.

Descriptors.NumSaturatedCarbocycles(mol)
Raw lines 160 to 165
166### NumSaturatedHeterocycles
167Number of saturated heterocycles.
168```python
169Descriptors.NumSaturatedHeterocycles(mol)
170```

NumSaturatedHeterocycles

Number of saturated heterocycles.

Descriptors.NumSaturatedHeterocycles(mol)
Raw lines 166 to 171
172### NumAliphaticCarbocycles
173Number of aliphatic carbocycles.
174```python
175Descriptors.NumAliphaticCarbocycles(mol)
176```

NumAliphaticCarbocycles

Number of aliphatic carbocycles.

Descriptors.NumAliphaticCarbocycles(mol)
Raw lines 172 to 177
178### NumAliphaticHeterocycles
179Number of aliphatic heterocycles.
180```python
181Descriptors.NumAliphaticHeterocycles(mol)
182```

NumAliphaticHeterocycles

Number of aliphatic heterocycles.

Descriptors.NumAliphaticHeterocycles(mol)
Raw lines 178 to 183
184## Rotatable Bonds

Rotatable Bonds

Raw lines 184 to 185
186### NumRotatableBonds
187Number of rotatable bonds (flexibility).
188```python
189Descriptors.NumRotatableBonds(mol)
190```

NumRotatableBonds

Number of rotatable bonds (flexibility).

Descriptors.NumRotatableBonds(mol)
Raw lines 186 to 191
192## Aromatic Atoms

Aromatic Atoms

Raw lines 192 to 193
194### NumAromaticAtoms
195Number of aromatic atoms.
196```python
197sum(atom.GetIsAromatic() for atom in mol.GetAtoms())
198```

NumAromaticAtoms

Number of aromatic atoms.

sum(atom.GetIsAromatic() for atom in mol.GetAtoms())
Raw lines 194 to 199
200## Fraction Descriptors

Fraction Descriptors

Raw lines 200 to 201
202### FractionCSP3
203Fraction of carbons that are sp3 hybridized.
204```python
205Descriptors.FractionCSP3(mol) # also Lipinski.FractionCSP3(mol)
206```

FractionCSP3

Fraction of carbons that are sp3 hybridized.

Descriptors.FractionCSP3(mol)  # also Lipinski.FractionCSP3(mol)
Raw lines 202 to 207
208## Complexity Descriptors

Complexity Descriptors

Raw lines 208 to 209
210### BertzCT
211Bertz complexity index.
212```python
213Descriptors.BertzCT(mol)
214```

BertzCT

Bertz complexity index.

Descriptors.BertzCT(mol)
Raw lines 210 to 215
216### Ipc
217Information content (complexity measure).
218```python
219Descriptors.Ipc(mol)
220```

Ipc

Information content (complexity measure).

Descriptors.Ipc(mol)
Raw lines 216 to 221
222## Kappa Shape Indices
224Molecular shape descriptors based on graph invariants.

Kappa Shape Indices

Molecular shape descriptors based on graph invariants.

Raw lines 222 to 225
226### Kappa1
227First kappa shape index.
228```python
229Descriptors.Kappa1(mol)
230```

Kappa1

First kappa shape index.

Descriptors.Kappa1(mol)
Raw lines 226 to 231
232### Kappa2
233Second kappa shape index.
234```python
235Descriptors.Kappa2(mol)
236```

Kappa2

Second kappa shape index.

Descriptors.Kappa2(mol)
Raw lines 232 to 237
238### Kappa3
239Third kappa shape index.
240```python
241Descriptors.Kappa3(mol)
242```

Kappa3

Third kappa shape index.

Descriptors.Kappa3(mol)
Raw lines 238 to 243
244## Chi Connectivity Indices
246Molecular connectivity indices.

Chi Connectivity Indices

Molecular connectivity indices.

Raw lines 244 to 247
248### Chi0 and Chi1
249Unmodified connectivity indices (higher orders use the n/v families below).
250```python
251Descriptors.Chi0(mol)
252Descriptors.Chi1(mol)
253```

Chi0 and Chi1

Unmodified connectivity indices (higher orders use the n/v families below).

Descriptors.Chi0(mol)
Descriptors.Chi1(mol)
Raw lines 248 to 254
255### Chi0n, Chi1n, Chi2n, Chi3n, Chi4n
256Valence-modified chi connectivity indices.
257```python
258Descriptors.Chi0n(mol)
259Descriptors.Chi1n(mol)
260Descriptors.Chi2n(mol)
261Descriptors.Chi3n(mol)
262Descriptors.Chi4n(mol)
263```

Chi0n, Chi1n, Chi2n, Chi3n, Chi4n

Valence-modified chi connectivity indices.

Descriptors.Chi0n(mol)
Descriptors.Chi1n(mol)
Descriptors.Chi2n(mol)
Descriptors.Chi3n(mol)
Descriptors.Chi4n(mol)
Raw lines 255 to 264
265### Chi0v, Chi1v, Chi2v, Chi3v, Chi4v
266Valence chi connectivity indices.
267```python
268Descriptors.Chi0v(mol)
269Descriptors.Chi1v(mol)
270Descriptors.Chi2v(mol)
271Descriptors.Chi3v(mol)
272Descriptors.Chi4v(mol)
273```

Chi0v, Chi1v, Chi2v, Chi3v, Chi4v

Valence chi connectivity indices.

Descriptors.Chi0v(mol)
Descriptors.Chi1v(mol)
Descriptors.Chi2v(mol)
Descriptors.Chi3v(mol)
Descriptors.Chi4v(mol)
Raw lines 265 to 274
275## Hall-Kier Alpha

Hall-Kier Alpha

Raw lines 275 to 276
277### HallKierAlpha
278Hall-Kier alpha value (molecular flexibility).
279```python
280Descriptors.HallKierAlpha(mol)
281```

HallKierAlpha

Hall-Kier alpha value (molecular flexibility).

Descriptors.HallKierAlpha(mol)
Raw lines 277 to 282
283## Balaban's J Index

Balaban's J Index

Raw lines 283 to 284
285### BalabanJ
286Balaban's J index (branching descriptor).
287```python
288Descriptors.BalabanJ(mol)
289```

BalabanJ

Balaban's J index (branching descriptor).

Descriptors.BalabanJ(mol)
Raw lines 285 to 290
291## EState Indices
293Electrotopological state indices.

EState Indices

Electrotopological state indices.

Raw lines 291 to 294
295### MaxEStateIndex
296Maximum E-state value.
297```python
298Descriptors.MaxEStateIndex(mol)
299```

MaxEStateIndex

Maximum E-state value.

Descriptors.MaxEStateIndex(mol)
Raw lines 295 to 300
301### MinEStateIndex
302Minimum E-state value.
303```python
304Descriptors.MinEStateIndex(mol)
305```

MinEStateIndex

Minimum E-state value.

Descriptors.MinEStateIndex(mol)
Raw lines 301 to 306
307### MaxAbsEStateIndex
308Maximum absolute E-state value.
309```python
310Descriptors.MaxAbsEStateIndex(mol)
311```

MaxAbsEStateIndex

Maximum absolute E-state value.

Descriptors.MaxAbsEStateIndex(mol)
Raw lines 307 to 312
313### MinAbsEStateIndex
314Minimum absolute E-state value.
315```python
316Descriptors.MinAbsEStateIndex(mol)
317```

MinAbsEStateIndex

Minimum absolute E-state value.

Descriptors.MinAbsEStateIndex(mol)
Raw lines 313 to 318
319## Partial Charges

Partial Charges

Raw lines 319 to 320
321### MaxPartialCharge
322Maximum partial charge.
323```python
324Descriptors.MaxPartialCharge(mol)
325```

MaxPartialCharge

Maximum partial charge.

Descriptors.MaxPartialCharge(mol)
Raw lines 321 to 326
327### MinPartialCharge
328Minimum partial charge.
329```python
330Descriptors.MinPartialCharge(mol)
331```

MinPartialCharge

Minimum partial charge.

Descriptors.MinPartialCharge(mol)
Raw lines 327 to 332
333### MaxAbsPartialCharge
334Maximum absolute partial charge.
335```python
336Descriptors.MaxAbsPartialCharge(mol)
337```

MaxAbsPartialCharge

Maximum absolute partial charge.

Descriptors.MaxAbsPartialCharge(mol)
Raw lines 333 to 338
339### MinAbsPartialCharge
340Minimum absolute partial charge.
341```python
342Descriptors.MinAbsPartialCharge(mol)
343```

MinAbsPartialCharge

Minimum absolute partial charge.

Descriptors.MinAbsPartialCharge(mol)
Raw lines 339 to 344
345## Fingerprint Density
347Measures the density of molecular fingerprints.

Fingerprint Density

Measures the density of molecular fingerprints.

Raw lines 345 to 348
349### FpDensityMorgan1
350Morgan fingerprint density at radius 1.
351```python
352Descriptors.FpDensityMorgan1(mol)
353```

FpDensityMorgan1

Morgan fingerprint density at radius 1.

Descriptors.FpDensityMorgan1(mol)
Raw lines 349 to 354
355### FpDensityMorgan2
356Morgan fingerprint density at radius 2.
357```python
358Descriptors.FpDensityMorgan2(mol)
359```

FpDensityMorgan2

Morgan fingerprint density at radius 2.

Descriptors.FpDensityMorgan2(mol)
Raw lines 355 to 360
361### FpDensityMorgan3
362Morgan fingerprint density at radius 3.
363```python
364Descriptors.FpDensityMorgan3(mol)
365```

FpDensityMorgan3

Morgan fingerprint density at radius 3.

Descriptors.FpDensityMorgan3(mol)
Raw lines 361 to 366
367## PEOE VSA Descriptors
369Partial Equalization of Orbital Electronegativities (PEOE) VSA descriptors.

PEOE VSA Descriptors

Partial Equalization of Orbital Electronegativities (PEOE) VSA descriptors.

Raw lines 367 to 370
371### PEOE_VSA1 through PEOE_VSA14
372MOE-type descriptors using partial charges and surface area contributions.
373```python
374Descriptors.PEOE_VSA1(mol)
375# ... through PEOE_VSA14
376```

PEOE_VSA1 through PEOE_VSA14

MOE-type descriptors using partial charges and surface area contributions.

Descriptors.PEOE_VSA1(mol)
# ... through PEOE_VSA14
Raw lines 371 to 377
378## SMR VSA Descriptors
380Molecular refractivity VSA descriptors.

SMR VSA Descriptors

Molecular refractivity VSA descriptors.

Raw lines 378 to 381
382### SMR_VSA1 through SMR_VSA10
383MOE-type descriptors using MR contributions and surface area.
384```python
385Descriptors.SMR_VSA1(mol)
386# ... through SMR_VSA10
387```

SMR_VSA1 through SMR_VSA10

MOE-type descriptors using MR contributions and surface area.

Descriptors.SMR_VSA1(mol)
# ... through SMR_VSA10
Raw lines 382 to 388
389## SLogP VSA Descriptors
391LogP VSA descriptors.

SLogP VSA Descriptors

LogP VSA descriptors.

Raw lines 389 to 392
393### SlogP_VSA1 through SlogP_VSA12
394MOE-type descriptors using LogP contributions and surface area.
395```python
396Descriptors.SlogP_VSA1(mol)
397# ... through SlogP_VSA12
398```

SlogP_VSA1 through SlogP_VSA12

MOE-type descriptors using LogP contributions and surface area.

Descriptors.SlogP_VSA1(mol)
# ... through SlogP_VSA12
Raw lines 393 to 399
400## EState VSA Descriptors

EState VSA Descriptors

Raw lines 400 to 401
402### EState_VSA1 through EState_VSA11
403MOE-type descriptors using E-state indices and surface area.
404```python
405Descriptors.EState_VSA1(mol)
406# ... through EState_VSA11
407```

EState_VSA1 through EState_VSA11

MOE-type descriptors using E-state indices and surface area.

Descriptors.EState_VSA1(mol)
# ... through EState_VSA11
Raw lines 402 to 408
409## VSA Descriptors
411van der Waals surface area descriptors.

VSA Descriptors

van der Waals surface area descriptors.

Raw lines 409 to 412
413### VSA_EState1 through VSA_EState10
414EState VSA descriptors.
415```python
416Descriptors.VSA_EState1(mol)
417# ... through VSA_EState10
418```

VSA_EState1 through VSA_EState10

EState VSA descriptors.

Descriptors.VSA_EState1(mol)
# ... through VSA_EState10
Raw lines 413 to 419
420## BCUT Descriptors
422Burden-CAS-University of Texas eigenvalue descriptors.

BCUT Descriptors

Burden-CAS-University of Texas eigenvalue descriptors.

Raw lines 420 to 423
424### BCUT2D_MWHI
425Highest eigenvalue of Burden matrix weighted by molecular weight.
426```python
427Descriptors.BCUT2D_MWHI(mol)
428```

BCUT2D_MWHI

Highest eigenvalue of Burden matrix weighted by molecular weight.

Descriptors.BCUT2D_MWHI(mol)
Raw lines 424 to 429
430### BCUT2D_MWLOW
431Lowest eigenvalue of Burden matrix weighted by molecular weight.
432```python
433Descriptors.BCUT2D_MWLOW(mol)
434```

BCUT2D_MWLOW

Lowest eigenvalue of Burden matrix weighted by molecular weight.

Descriptors.BCUT2D_MWLOW(mol)
Raw lines 430 to 435
436### BCUT2D_CHGHI
437Highest eigenvalue weighted by partial charges.
438```python
439Descriptors.BCUT2D_CHGHI(mol)
440```

BCUT2D_CHGHI

Highest eigenvalue weighted by partial charges.

Descriptors.BCUT2D_CHGHI(mol)
Raw lines 436 to 441
442### BCUT2D_CHGLO
443Lowest eigenvalue weighted by partial charges.
444```python
445Descriptors.BCUT2D_CHGLO(mol)
446```

BCUT2D_CHGLO

Lowest eigenvalue weighted by partial charges.

Descriptors.BCUT2D_CHGLO(mol)
Raw lines 442 to 447
448### BCUT2D_LOGPHI
449Highest eigenvalue weighted by LogP.
450```python
451Descriptors.BCUT2D_LOGPHI(mol)
452```

BCUT2D_LOGPHI

Highest eigenvalue weighted by LogP.

Descriptors.BCUT2D_LOGPHI(mol)
Raw lines 448 to 453
454### BCUT2D_LOGPLOW
455Lowest eigenvalue weighted by LogP.
456```python
457Descriptors.BCUT2D_LOGPLOW(mol)
458```

BCUT2D_LOGPLOW

Lowest eigenvalue weighted by LogP.

Descriptors.BCUT2D_LOGPLOW(mol)
Raw lines 454 to 459
460### BCUT2D_MRHI
461Highest eigenvalue weighted by molar refractivity.
462```python
463Descriptors.BCUT2D_MRHI(mol)
464```

BCUT2D_MRHI

Highest eigenvalue weighted by molar refractivity.

Descriptors.BCUT2D_MRHI(mol)
Raw lines 460 to 465
466### BCUT2D_MRLOW
467Lowest eigenvalue weighted by molar refractivity.
468```python
469Descriptors.BCUT2D_MRLOW(mol)
470```

BCUT2D_MRLOW

Lowest eigenvalue weighted by molar refractivity.

Descriptors.BCUT2D_MRLOW(mol)
Raw lines 466 to 471
472## Autocorrelation Descriptors

Autocorrelation Descriptors

Raw lines 472 to 473
474### AUTOCORR2D
4752D autocorrelation descriptors (if enabled).
476Various autocorrelation indices measuring spatial distribution of properties.

AUTOCORR2D

2D autocorrelation descriptors (if enabled). Various autocorrelation indices measuring spatial distribution of properties.

Raw lines 474 to 477
478## MQN Descriptors
480Molecular Quantum Numbers - 42 simple descriptors.

MQN Descriptors

Molecular Quantum Numbers - 42 simple descriptors.

Raw lines 478 to 481
482### MQNs_
483The descriptor registry does not supply `mqn1` to `mqn42`. Request the 42-element
484MQN vector directly and retain its documented order.
485```python
486from rdkit.Chem import rdMolDescriptors
487mqns = list(rdMolDescriptors.MQNs_(mol))
488assert len(mqns) == 42
489```

MQNs_

The descriptor registry does not supply mqn1 to mqn42. Request the 42-element MQN vector directly and retain its documented order.

from rdkit.Chem import rdMolDescriptors
mqns = list(rdMolDescriptors.MQNs_(mol))
assert len(mqns) == 42
Raw lines 482 to 490
493### qed
494Quantitative Estimate of Drug-likeness.
495```python
496Descriptors.qed(mol)
497```

qed

Quantitative Estimate of Drug-likeness.

Descriptors.qed(mol)
Raw lines 493 to 498
499## Lipinski's Rule of Five
501Check drug-likeness using Lipinski's criteria:
503```python
504def lipinski_rule_of_five(mol):
505 mw = Descriptors.MolWt(mol) <= 500
506 logp = Descriptors.MolLogP(mol) <= 5
507 hbd = Descriptors.NumHDonors(mol) <= 5
508 hba = Descriptors.NumHAcceptors(mol) <= 10
509 return mw and logp and hbd and hba
510```

Lipinski's Rule of Five

Check drug-likeness using Lipinski's criteria:

def lipinski_rule_of_five(mol):
    mw = Descriptors.MolWt(mol) <= 500
    logp = Descriptors.MolLogP(mol) <= 5
    hbd = Descriptors.NumHDonors(mol) <= 5
    hba = Descriptors.NumHAcceptors(mol) <= 10
    return mw and logp and hbd and hba
Raw lines 499 to 511
512## Batch Descriptor Calculation
514Calculate all descriptors at once:
516```python
517from rdkit import Chem
518from rdkit.Chem import Descriptors
520mol = Chem.MolFromSmiles('CCO')
522# Get all descriptors as dictionary
523all_descriptors = Descriptors.CalcMolDescriptors(mol)
525# Access specific descriptor
526mw = all_descriptors['MolWt']
527logp = all_descriptors['MolLogP']
529# Get list of available descriptor names
530from rdkit.Chem import Descriptors
531descriptor_names = [desc[0] for desc in Descriptors._descList]
532```

Batch Descriptor Calculation

Calculate all descriptors at once:

from rdkit import Chem
from rdkit.Chem import Descriptors

mol = Chem.MolFromSmiles('CCO')

# Get all descriptors as dictionary
all_descriptors = Descriptors.CalcMolDescriptors(mol)

# Access specific descriptor
mw = all_descriptors['MolWt']
logp = all_descriptors['MolLogP']

# Get list of available descriptor names
from rdkit.Chem import Descriptors
descriptor_names = [desc[0] for desc in Descriptors._descList]
Raw lines 512 to 533
534## Descriptor Categories Summary
5361. **Physicochemical**: MolWt, MolLogP, MolMR, TPSA
5372. **Topological**: BertzCT, BalabanJ, Kappa indices
5383. **Electronic**: Partial charges, E-state indices
5394. **Shape**: Kappa indices, BCUT descriptors
5405. **Connectivity**: Chi indices
5416. **2D Fingerprints**: FpDensity descriptors
5427. **Atom counts**: Heavy atoms, heteroatoms, rings
5438. **Drug-likeness**: QED, Lipinski parameters
5449. **Flexibility**: NumRotatableBonds, HallKierAlpha
54510. **Surface area**: VSA-based descriptors

Descriptor Categories Summary

  1. Physicochemical: MolWt, MolLogP, MolMR, TPSA
  2. Topological: BertzCT, BalabanJ, Kappa indices
  3. Electronic: Partial charges, E-state indices
  4. Shape: Kappa indices, BCUT descriptors
  5. Connectivity: Chi indices
  6. 2D Fingerprints: FpDensity descriptors
  7. Atom counts: Heavy atoms, heteroatoms, rings
  8. Drug-likeness: QED, Lipinski parameters
  9. Flexibility: NumRotatableBonds, HallKierAlpha
  10. Surface area: VSA-based descriptors
Raw lines 534 to 546
547## Common Use Cases

Common Use Cases

Raw lines 547 to 548
549### Drug-likeness Screening
551```python
552def screen_druglikeness(mol):
553 return {
554 'MW': Descriptors.MolWt(mol),
555 'LogP': Descriptors.MolLogP(mol),
556 'HBD': Descriptors.NumHDonors(mol),
557 'HBA': Descriptors.NumHAcceptors(mol),
558 'TPSA': Descriptors.TPSA(mol),
559 'RotBonds': Descriptors.NumRotatableBonds(mol),
560 'AromaticRings': Descriptors.NumAromaticRings(mol),
561 'QED': Descriptors.qed(mol)
562 }
563```

Drug-likeness Screening

def screen_druglikeness(mol):
    return {
        'MW': Descriptors.MolWt(mol),
        'LogP': Descriptors.MolLogP(mol),
        'HBD': Descriptors.NumHDonors(mol),
        'HBA': Descriptors.NumHAcceptors(mol),
        'TPSA': Descriptors.TPSA(mol),
        'RotBonds': Descriptors.NumRotatableBonds(mol),
        'AromaticRings': Descriptors.NumAromaticRings(mol),
        'QED': Descriptors.qed(mol)
    }
Raw lines 549 to 564
565### Lead-like Filtering
567```python
568def is_leadlike(mol):
569 mw = 250 <= Descriptors.MolWt(mol) <= 350
570 logp = Descriptors.MolLogP(mol) <= 3.5
571 rot_bonds = Descriptors.NumRotatableBonds(mol) <= 7
572 return mw and logp and rot_bonds
573```

Lead-like Filtering

def is_leadlike(mol):
    mw = 250 <= Descriptors.MolWt(mol) <= 350
    logp = Descriptors.MolLogP(mol) <= 3.5
    rot_bonds = Descriptors.NumRotatableBonds(mol) <= 7
    return mw and logp and rot_bonds
Raw lines 565 to 574
575### Diversity Analysis
577```python
578def molecular_complexity(mol):
579 return {
580 'BertzCT': Descriptors.BertzCT(mol),
581 'NumRings': Descriptors.RingCount(mol),
582 'NumRotBonds': Descriptors.NumRotatableBonds(mol),
583 'FractionCSP3': Descriptors.FractionCSP3(mol),
584 'NumAromaticRings': Descriptors.NumAromaticRings(mol)
585 }
586```

Diversity Analysis

def molecular_complexity(mol):
    return {
        'BertzCT': Descriptors.BertzCT(mol),
        'NumRings': Descriptors.RingCount(mol),
        'NumRotBonds': Descriptors.NumRotatableBonds(mol),
        'FractionCSP3': Descriptors.FractionCSP3(mol),
        'NumAromaticRings': Descriptors.NumAromaticRings(mol)
    }
Raw lines 575 to 587
588## Tips
5901. **Use batch calculation** for multiple descriptors to avoid redundant computations
5912. **Check validity and finiteness** - reject None/zero-atom inputs; `CalcMolDescriptors(mol, missingVal=float("nan"))` can include missing/nonfinite values. Preserve failure masks and feature names/order.
5923. **Fit transforms on training data only**; preserve original IDs across invalid rows and split by the appropriate chemical/scaffold/temporal unit before training.
5934. **Select relevant descriptors** - not all 200+ descriptors are useful for every task
5945. **Consider 3D descriptors** separately (require 3D coordinates)
5956. **Validate ranges** - check if descriptor values are in expected ranges
597QED and strict all-four Lipinski/lead-like cutoffs here are descriptive heuristics,
598not validated predictions of efficacy, toxicity, solubility, or oral exposure.
5992D descriptors usually account for implicit H; indiscriminately adding H can
600change graph descriptors. Record protonation, salts, tautomer policy, and RDKit
601version alongside features.

Tips

  1. Use batch calculation for multiple descriptors to avoid redundant computations
  2. Check validity and finiteness - reject None/zero-atom inputs; CalcMolDescriptors(mol, missingVal=float("nan")) can include missing/nonfinite values. Preserve failure masks and feature names/order.
  3. Fit transforms on training data only; preserve original IDs across invalid rows and split by the appropriate chemical/scaffold/temporal unit before training.
  4. Select relevant descriptors - not all 200+ descriptors are useful for every task
  5. Consider 3D descriptors separately (require 3D coordinates)
  6. Validate ranges - check if descriptor values are in expected ranges

QED and strict all-four Lipinski/lead-like cutoffs here are descriptive heuristics, not validated predictions of efficacy, toxicity, solubility, or oral exposure. 2D descriptors usually account for implicit H; indiscriminately adding H can change graph descriptors. Record protonation, salts, tautomer policy, and RDKit version alongside features.

Raw lines 588 to 601