liveBook · Manning

Dimorphite-DL

As explained in Build AI Drug Discovery Pipelines

Dimorphite-DL is a software package that predicts chemically plausible protonation states of molecules over a specified pH range.

Dimorphite-DL predicts plausible protonation states across a chosen pH interval. Protonation changes can also influence tautomerization, so enumerating both forms expands molecular representations for downstream modeling. section 6.1.2

Use Dimorphite-DL in a molecular-preparation workflow:

  • Choose a pH range that matches the experimental environment; near-physiological assays use pH 6.4–8.4 around pH 7.4. section 6.1.2
  • Enumerate tautomers for the resulting protomers when the modeling task requires alternative bond arrangements. section 6.1.2
Listing 6.1 Load Data and Generate Protomers
hiv_tar1 = pd.read_csv(    #A
    "data/CH06_hargrove_data.csv",    #A
    usecols=[    #A
        "Name", "SMILES", "kon", "koff", "KD", "lnkon", "lnkoff", "lnKD"
    ]    #A
)    #A
 
# Narrow this range to match your own assay conditions before modeling.
dimorphite_dl = DimorphiteDL(    #B
    min_ph=6.4,    #B
    max_ph=8.4,    #B
    max_variants=128,    #B
    label_states=False,    #B
)    #B
 
tautomer_enumerator = rdMolStandardize.TautomerEnumerator()
 
def enumerate_protomers(smi):    #C
    if Chem.MolFromSmiles(smi) is None:
        print(f"WARNING: unparseable input SMILES, skipping: {smi}")
        return []
    seen, protomers = set(), []
    for prot_smi in dimorphite_dl.protonate(smi):
        prot = Chem.MolFromSmiles(prot_smi)
        if prot is None:
            continue
        for taut in tautomer_enumerator.Enumerate(prot):    #C
            if taut is None:
                continue
            canonical = Chem.MolToSmiles(taut)    #D
            if canonical and canonical not in seen:    #E
                seen.add(canonical)    #E
                protomers.append(taut)    #E
    return protomers
 
mols = []
ligand2protomers = {}
for ligand_idx, smi in enumerate(hiv_tar1["SMILES"].tolist()):
    mols.append(Chem.MolFromSmiles(smi))
    try:
        ligand2protomers[ligand_idx] = enumerate_protomers(smi)
    except Exception as err:
        print(f"WARNING: enumeration failed for {smi}: {err}")
        ligand2protomers[ligand_idx] = []

Runnable Python code loads assay data, configures Dimorphite-DL, and begins generating validated protomers with a maximum variant limit. section 6.1.2

How Build AI Drug Discovery Pipelines covers it

How deep it goes
Explains pH selection and connects protonation with tautomerization, but defers the package’s internal prediction rules.
Examples
Expands 48 ligands to roughly 1,500 protomers using a pH window from 6.4 to 8.4.
What it assumes
Assumes basic molecular structures and SMILES while teaching pH-dependent protonation and its relationship to tautomerization.
What you can do after
Apply it via Dimorphite-DL to generate validated protonated molecular variants for subsequent tautomer and descriptor enumeration.
How it connects
Connects protonation states with pH, tautomerization, SMILES, molecular descriptors, and experimental assay conditions.

This explainer was generated by Manning's knowledge graph from the text of Build AI Drug Discovery Pipelines. The section links point to the parts of the book it draws on.