descriptors_reference.md
601 lines · skills/rdkit/references/descriptors_reference.md at 5f2bc03
RDKit Molecular Descriptors Reference
Selected reference for molecular descriptors available in RDKit's Descriptors module.
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 19Molecular Weight and Mass
Raw lines 20 to 21MolWt
Average molecular weight (numerically g/mol), including implicit hydrogens.
Descriptors.MolWt(mol)Raw lines 22 to 27ExactMolWt
Monoisotopic mass (Da), honoring specified isotopes; not an ion m/z calculation.
Descriptors.ExactMolWt(mol)Raw lines 28 to 33HeavyAtomMolWt
Average molecular weight ignoring hydrogens.
Descriptors.HeavyAtomMolWt(mol)Raw lines 34 to 39Lipophilicity
Raw lines 40 to 41MolLogP
Wildman-Crippen estimate of octanol/water logP; not measured logP or pH-dependent logD.
Descriptors.MolLogP(mol)Raw lines 42 to 47Polar Surface Area
Raw lines 54 to 55TPSA
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 63Hydrogen Bonding
Raw lines 70 to 71NumHDonors
Count under RDKit donor SMARTS rules; includes eligible N, O and S sites.
Descriptors.NumHDonors(mol)Raw lines 72 to 77NumHAcceptors
Count under RDKit acceptor SMARTS rules; not simply the count of N/O atoms.
Descriptors.NumHAcceptors(mol)Raw lines 78 to 83Atom Counts
Raw lines 96 to 97HeavyAtomCount
Number of heavy atoms (non-hydrogen).
Descriptors.HeavyAtomCount(mol)Raw lines 98 to 103NumHeteroatoms
Number of heteroatoms (non-C and non-H).
Descriptors.NumHeteroatoms(mol)Raw lines 104 to 109NumValenceElectrons
Total number of valence electrons.
Descriptors.NumValenceElectrons(mol)Raw lines 110 to 115NumRadicalElectrons
Number of radical electrons.
Descriptors.NumRadicalElectrons(mol)Raw lines 116 to 121Ring Descriptors
Raw lines 122 to 123NumAliphaticRings
Number of aliphatic (non-aromatic) rings.
Descriptors.NumAliphaticRings(mol)Raw lines 142 to 147NumAromaticCarbocycles
Number of aromatic carbocycles (rings with only carbons).
Descriptors.NumAromaticCarbocycles(mol)Raw lines 148 to 153NumAromaticHeterocycles
Number of aromatic heterocycles (rings with heteroatoms).
Descriptors.NumAromaticHeterocycles(mol)Raw lines 154 to 159NumSaturatedCarbocycles
Number of saturated carbocycles.
Descriptors.NumSaturatedCarbocycles(mol)Raw lines 160 to 165NumSaturatedHeterocycles
Number of saturated heterocycles.
Descriptors.NumSaturatedHeterocycles(mol)Raw lines 166 to 171NumAliphaticCarbocycles
Number of aliphatic carbocycles.
Descriptors.NumAliphaticCarbocycles(mol)Raw lines 172 to 177NumAliphaticHeterocycles
Number of aliphatic heterocycles.
Descriptors.NumAliphaticHeterocycles(mol)Raw lines 178 to 183Rotatable Bonds
Raw lines 184 to 185NumRotatableBonds
Number of rotatable bonds (flexibility).
Descriptors.NumRotatableBonds(mol)Raw lines 186 to 191Aromatic Atoms
Raw lines 192 to 193NumAromaticAtoms
Number of aromatic atoms.
sum(atom.GetIsAromatic() for atom in mol.GetAtoms())Raw lines 194 to 199Fraction Descriptors
Raw lines 200 to 201FractionCSP3
Fraction of carbons that are sp3 hybridized.
Descriptors.FractionCSP3(mol) # also Lipinski.FractionCSP3(mol)Raw lines 202 to 207Complexity Descriptors
Raw lines 208 to 209Chi0 and Chi1
Unmodified connectivity indices (higher orders use the n/v families below).
Descriptors.Chi0(mol)
Descriptors.Chi1(mol)Raw lines 248 to 254Chi0n, 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 264Chi0v, 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 274Hall-Kier Alpha
Raw lines 275 to 276HallKierAlpha
Hall-Kier alpha value (molecular flexibility).
Descriptors.HallKierAlpha(mol)Raw lines 277 to 282Balaban's J Index
Raw lines 283 to 284MaxAbsEStateIndex
Maximum absolute E-state value.
Descriptors.MaxAbsEStateIndex(mol)Raw lines 307 to 312MinAbsEStateIndex
Minimum absolute E-state value.
Descriptors.MinAbsEStateIndex(mol)Raw lines 313 to 318Partial Charges
Raw lines 319 to 320MaxAbsPartialCharge
Maximum absolute partial charge.
Descriptors.MaxAbsPartialCharge(mol)Raw lines 333 to 338MinAbsPartialCharge
Minimum absolute partial charge.
Descriptors.MinAbsPartialCharge(mol)Raw lines 339 to 344FpDensityMorgan1
Morgan fingerprint density at radius 1.
Descriptors.FpDensityMorgan1(mol)Raw lines 349 to 354FpDensityMorgan2
Morgan fingerprint density at radius 2.
Descriptors.FpDensityMorgan2(mol)Raw lines 355 to 360FpDensityMorgan3
Morgan fingerprint density at radius 3.
Descriptors.FpDensityMorgan3(mol)Raw lines 361 to 366PEOE VSA Descriptors
Partial Equalization of Orbital Electronegativities (PEOE) VSA descriptors.
Raw lines 367 to 370PEOE_VSA1 through PEOE_VSA14
MOE-type descriptors using partial charges and surface area contributions.
Descriptors.PEOE_VSA1(mol)
# ... through PEOE_VSA14Raw lines 371 to 377SMR_VSA1 through SMR_VSA10
MOE-type descriptors using MR contributions and surface area.
Descriptors.SMR_VSA1(mol)
# ... through SMR_VSA10Raw lines 382 to 388SlogP_VSA1 through SlogP_VSA12
MOE-type descriptors using LogP contributions and surface area.
Descriptors.SlogP_VSA1(mol)
# ... through SlogP_VSA12Raw lines 393 to 399EState VSA Descriptors
Raw lines 400 to 401EState_VSA1 through EState_VSA11
MOE-type descriptors using E-state indices and surface area.
Descriptors.EState_VSA1(mol)
# ... through EState_VSA11Raw lines 402 to 408VSA_EState1 through VSA_EState10
EState VSA descriptors.
Descriptors.VSA_EState1(mol)
# ... through VSA_EState10Raw lines 413 to 419BCUT2D_MWHI
Highest eigenvalue of Burden matrix weighted by molecular weight.
Descriptors.BCUT2D_MWHI(mol)Raw lines 424 to 429BCUT2D_MWLOW
Lowest eigenvalue of Burden matrix weighted by molecular weight.
Descriptors.BCUT2D_MWLOW(mol)Raw lines 430 to 435BCUT2D_CHGHI
Highest eigenvalue weighted by partial charges.
Descriptors.BCUT2D_CHGHI(mol)Raw lines 436 to 441BCUT2D_CHGLO
Lowest eigenvalue weighted by partial charges.
Descriptors.BCUT2D_CHGLO(mol)Raw lines 442 to 447BCUT2D_LOGPLOW
Lowest eigenvalue weighted by LogP.
Descriptors.BCUT2D_LOGPLOW(mol)Raw lines 454 to 459BCUT2D_MRHI
Highest eigenvalue weighted by molar refractivity.
Descriptors.BCUT2D_MRHI(mol)Raw lines 460 to 465BCUT2D_MRLOW
Lowest eigenvalue weighted by molar refractivity.
Descriptors.BCUT2D_MRLOW(mol)Raw lines 466 to 471Autocorrelation Descriptors
Raw lines 472 to 473AUTOCORR2D
2D autocorrelation descriptors (if enabled). Various autocorrelation indices measuring spatial distribution of properties.
Raw lines 474 to 477MQNs_
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) == 42Raw lines 482 to 490Lipinski'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 hbaRaw lines 499 to 511Batch 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 533Descriptor Categories Summary
- Physicochemical: MolWt, MolLogP, MolMR, TPSA
- Topological: BertzCT, BalabanJ, Kappa indices
- Electronic: Partial charges, E-state indices
- Shape: Kappa indices, BCUT descriptors
- Connectivity: Chi indices
- 2D Fingerprints: FpDensity descriptors
- Atom counts: Heavy atoms, heteroatoms, rings
- Drug-likeness: QED, Lipinski parameters
- Flexibility: NumRotatableBonds, HallKierAlpha
- Surface area: VSA-based descriptors
Common Use Cases
Raw lines 547 to 548Drug-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 564Lead-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_bondsRaw lines 565 to 574Diversity 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 587Tips
- Use batch calculation for multiple descriptors to avoid redundant computations
- 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. - Fit transforms on training data only; preserve original IDs across invalid rows and split by the appropriate chemical/scaffold/temporal unit before training.
- Select relevant descriptors - not all 200+ descriptors are useful for every task
- Consider 3D descriptors separately (require 3D coordinates)
- 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