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
