Module 12: In Silico ADMET & Safety Assessment
Use properties, hazard models, and experimental evidence to prioritize drug-discovery hypotheses; these methods cannot establish drug potential or clinical safety alone. Start with the physicochemical rules of ADME and oral drug-likeness (Lipinski, Veber), then predict toxicity endpoints (cardiotoxicity, hepatotoxicity, mutagenicity) with machine learning, comparing models with DeLong's test and interpreting alerts using SHAP values.
Learning outcomes
- Profile oral drug-likeness with Lipinski and Veber, treating both as alerts not gates.
- Explain the mechanisms behind hERG, DILI, and Ames liabilities.
- Build and validate a toxicity classifier for an imbalanced dataset.
- Interpret SHAP attributions on a toxicophore and state their limits.
- Say what a structure-derived safety prediction cannot tell you about exposure.
1. Critical Safety Endpoints in Drug Discovery
Up to 30% of drug candidates fail in clinical trials due to safety and toxicity issues. Discovery toxicology leverages in silico models to predict hazard profiles early, filtering out toxic compounds before they reach animal or human testing. Three primary endpoints dominate chemical safety screening:
Cardiotoxicity (hERG)
Blockade of the potassium voltage-gated channel hERG delays cardiac repolarization, causing QT interval prolongation and potentially fatal arrhythmias. Models can estimate assay-defined hERG inhibition using regression or classification. Channel inhibition, QT prolongation, and clinical arrhythmia are distinct endpoints; exposure margins and integrated evidence are needed.
Hepatotoxicity (DILI)
Drug-Induced Liver Injury (DILI) is a leading cause of drug withdrawals. Hepatotoxicity arises from metabolic activation (e.g. generating reactive quinone-imines), mitochondrial dysfunction, or bile duct obstruction, modeled using binary classifiers.
Mutagenicity (Ames Test)
The Ames test measures bacterial mutagenicity, usually with and without metabolic activation. Structural alerts can prioritize follow-up, but an alert or a predicted Ames result does not establish human carcinogenicity; mechanisms, exposure, and other evidence matter.
2. ADME & Drug-Likeness: The Physicochemical Gatekeepers
Before toxicity, a candidate must actually reach its target and survive the body. ADME — Absorption, Distribution, Metabolism, Excretion — is governed largely by a few physicochemical properties. Simple rule-based filters flag molecules unlikely to be orally bioavailable long before expensive assays.
Lipophilicity (LogP / LogD)
The octanol/water partition coefficient. LogDaccounts for ionization at a given pH. Too low → poor membrane permeation; too high (>5) → poor solubility, promiscuity, and hERG/off-target risk.
Polar Surface Area (TPSA)
The surface area over polar (N, O) atoms and their attached hydrogens. Values such as 140 Ų for oral absorption and 90 Ų for brain penetration are screening heuristics, not hard boundaries. Ionization, transporters, and conformation also affect permeability.
Metabolism & Clearance
Hepatic CYP450 enzymes (3A4, 2D6, 2C9) run phase-I oxidation; phase-II conjugation follows. Renal clearance favors small, polar compounds. These set the dose and half-life.
Interactive Playground: Drug-Likeness Scorecard
Load aspirin, then terfenadine, then atorvastatin. The pass/fail lights are alerts. The notes underneath say which physical problem the alert is pointing at, and where an approved drug breaks a rule without being undruglike.
0 violations — within the ≤ 1 tolerance.
TPSA < 90 Ų — passive absorption is plausible, and CNS exposure is harder to rule out.
No Lipinski or Veber alert is lit. That does not show the compound is absorbed, selective, or safe.
3. Explainable AI: Demystifying Toxicophores with SHAP
A toxicity model can be hard to read from its weights alone. The OECD principles for QSAR validation ask for a mechanistic interpretation when one is available. They do not require a SHAP analysis, and neither do current regulatory filings as a general rule. SHAP (SHapley Additive exPlanations), from cooperative game theory, assigns each feature a share of this model's output.
In cooperative game theory, Shapley values distribute a total payoff fairly among players based on their marginal contributions. In machine learning, the "payoff" is the model prediction, and the "players" are the individual molecular features. The Shapley value for a feature i is defined as:
F is the set of all features, S is a subset that excludes feature i, and f(S) is the model's prediction from that subset. The sum gives feature i its average marginal contribution across subsets. Mapped back onto a fingerprint, a positive value means that bit pushed this prediction toward the toxic class. The bit may be a real toxicophore, a correlate of one, or an artefact of the training set. Attribution is not the mechanism.
4. Step-by-Step Toxicology Modeling & SHAP Interpretation
Below is a minimal RDKit, Scikit-learn, and SHAP API demonstration. Its three example compounds cannot support validation, calibration, or an applicability-domain claim. Use assay-matched data, independent evaluation, and a separately assessed domain before interpreting predictions:
Code Architecture Explained:
- Lines 1–18 (Data Setup & Fingerprints): RDKit parses SMILES strings into connection tables. It calculates circular Morgan Fingerprints (radius=2, equivalent to ECFP4) to represent the structure as a binary array of active substructural bits.
- Lines 20–23 (Random Forest Training): Scikit-learn fits an ensemble classifier containing 100 decision trees. The model learns to establish non-linear relationships between molecular fragments and toxicity.
- Lines 25–29 (Model Explainer): The tree-based explainer analyzes decision trees to compute Shapley values.
- Lines 31–38 (SHAP Value Calculation): A positive value means that bit pushed this model toward the toxic class. A negative value pushed it the other way. Either one can be a real structural effect or a pattern the training set happened to contain.
Interactive Playground: Discovery Toxicology Sandbox
Compare illustrative structural alerts, then use the separate synthetic DeLong exercise to interpret paired ROC-AUC estimates.
1. Illustrative Toxicology Annotations
Select a compound to compare invented endpoint scores and qualitative structural annotations. No fitted model or SHAP calculation runs in this profiler.
CC(C)(C)C1=CC=C(C=C1)C(O)CCCN2CCC(CC2)C(O)(C3=CC=CC=C3)C4=CC=CC=C4A basic center can support hERG binding in some chemotypes; pKa, geometry, concentration, and assay evidence matter.
Promotes non-specific membrane accumulation and off-target bindings.
Forms stable hydrophobic interactions with aromatic residues inside the hERG vestibule.
No obvious electrophilic alert in this illustration; absence of an alert does not establish a negative Ames result.
These values and bars are hand-authored teaching examples, not measured risks, calibrated probabilities, or endpoint-specific SHAP values. They have no additive baseline and must not be summed to reconstruct an endpoint. A real explanation must identify its model, endpoint, output scale, background data, and applicability domain.
2. Paired DeLong ROC Explorer
Compare two models on the same synthetic holdout set. Model A uses a chemical signal; Model B receives an adjustable orthogonal signal representing a possible contribution from Cell Painting. AUCs, covariance, confidence intervals, and the paired DeLong test are calculated from the sample-level scores.
Difference detected in this paired sample
The two-sided paired DeLong p-value is 0.0353. This supports a difference between these two synthetic score vectors; it does not establish that Cell Painting will improve an external dataset.
Simulation boundary: the records and prediction scores are deterministic teaching data, not an experimental Cell Painting benchmark. The statistics are calculated from those paired scores using DeLong placement values and covariance; real claims require a locked external test set and endpoint-specific validation.
5. What These Predictions Cannot Tell You
ADMET models are the most over-trusted tools in computational chemistry, because they return a clean probability for a question — is this compound safe? — that no model can actually answer. Four limits are worth carrying forward.
A rule is an alert, not a verdict
Lipinski and Veber describe tendencies in oral drugs, not requirements. Plenty of approved drugs violate them, and entire modalities — PROTACs, macrocycles, peptides — sit far outside that space by design. Use the rules to raise questions, never to close them.
Toxicity models inherit their training sets
A hERG or DILI classifier learned from historical compounds knows historical chemistry. Present it a novel chemotype and it will answer confidently from outside its applicability domain (Module 9). Check the domain before believing the probability.
SHAP explains the model, not the biology
A Shapley value tells you which features drove this model's output. If the model learned a dataset artefact, SHAP will explain the artefact fluently and persuasively. Attribution is not mechanism.
Structure is not exposure
Everything in this module is computed from a structure. Whether a compound reaches a harmful concentration at a sensitive tissue depends on dose, clearance, protein binding, and route — which is where Module 15 picks up.
Used well, these models reorder your synthesis queue and catch liabilities while they are still cheap to fix. Used as a pass/fail gate, they discard good compounds and wave through bad ones with equal confidence.
Knowledge check
Research decision checkpoint
An illustrative hERG score is high, but target-site exposure is unknown. Can you call the compound unsafe?
Your output: Write a safety-triage memo separating measured hazards, predictions, structural alerts, exposure margins, and follow-up assays.
Compare your reasoning
Do not convert an invented score into probability or clinical risk. hERG inhibition, QT effects, arrhythmia, bacterial mutagenicity, and human carcinogenicity are distinct endpoints.