Skip to main content

    Descriptors & Property Checks

    Calculate molecular descriptors (MW, logP, TPSA, HBA/HBD) and run drug-likeness checks with RDKit.

    Descriptors let you profile a molecule's physicochemical properties — molecular weight, logP, TPSA, hydrogen-bond donors and acceptors — and gate compounds through drug-likeness checks before expensive steps. The property bounds you set in your QC gate are what most affect how much of your set passes through to conformer generation or docking.

    Common descriptors

    • Molecular weight: Descriptors.MolWt(mol)
    • logP: Descriptors.MolLogP(mol)
    • TPSA: Descriptors.TPSA(mol)
    • HBA/HBD: Lipinski.NumHAcceptors, Lipinski.NumHDonors
    • Rotatable bonds: Lipinski.NumRotatableBonds
    from rdkit import Chem
    from rdkit.Chem import Descriptors, Lipinski
    
    mol = Chem.MolFromSmiles("CC(=O)Oc1ccccc1C(=O)O")
    
    summary = {
        "mw": Descriptors.MolWt(mol),
        "logp": Descriptors.MolLogP(mol),
        "tpsa": Descriptors.TPSA(mol),
        "hba": Lipinski.NumHAcceptors(mol),
        "hbd": Lipinski.NumHDonors(mol),
        "rot_bonds": Lipinski.NumRotatableBonds(mol),
    }
    print(summary)

    QC gates

    def passes_qc(mol) -> bool:
        if mol is None:
            return False
        mw = Descriptors.MolWt(mol)
        logp = Descriptors.MolLogP(mol)
        rb = Lipinski.NumRotatableBonds(mol)
        if not (150 <= mw <= 600):
            return False
        if not (-1.5 <= logp <= 5.5):
            return False
        if rb > 10:
            return False
        return True

    Apply passes_qc before expensive steps (conformer generation, docking) to save time.

    Batch workflow

    • Parse SMILES → run QC → write passing molecules to CSV/SDF.
    • Log counts for pass/fail buckets to spot over-filtering.
    • For large sets, run QC in chunks and stream outputs to avoid high memory use.

    Was this page helpful?

    On this page

    On this page

    Loading...