AI Drug Discovery: A Compute Pipeline from Molecule Generation to ADMET Prediction
Note: This is a review article (no first-hand experimental data), based on public literature and industry practice.
Experiment Objective
AI drug discovery is a typical industry where "AI-compute × scientific computing" meet: molecular dynamics (supercomputing) provides conformational data; generative models and ADMET prediction (AI-compute) provide candidates and screening; the two iterate in a loop. Goal: dissect a complete drug-discovery compute pipeline — molecular representation → generation → virtual screening (docking/dynamics) → ADMET prediction → wet-lab loop — clarifying the model type, compute footprint, and data source of each stage, plus how to engineer around the "pitfalls of virtual screening" (unreliable docking scores, data bias, public-benchmark overfitting).
Code Walkthrough
Part 1: Molecular representation and data loading
# RDKit: SMILES → graph/features (pipeline entry)
from rdkit import Chem
from rdkit.Chem import Descriptors, rdMolDescriptors
def smiles_to_features(smiles):
mol = Chem.MolFromSmiles(smiles)
if mol is None:
return None # filter invalid SMILES immediately
return {
'n_atoms': mol.GetNumAtoms(),
'mw': Descriptors.MolWt(mol),
'logp': Descriptors.MolLogP(mol), # lipophilicity
'tpsa': rdMolDescriptors.CalcTPSA(mol), # polar surface area
'rotb': rdMolDescriptors.CalcNumRotatableBonds(mol),
}Key points:
- SMILES is the entry; RDKit is the standard tool: a SMILES string encodes a molecule in one line; RDKit parses it and computes descriptors;
MolFromSmilesreturningNonemeans dirty data — the pipeline's first job is filtering. - Descriptors are "rule features": MW/logP/TPSA are classical QSAR features, complementary to deep-learning representations (graph/3D conformer) — good pipelines use both.
- Three molecular representation forms: string (SMILES, for generative models), graph (atoms/bonds, for GNNs), 3D conformer (for geometric models and docking) — each form maps to a model class; the pipeline must maintain three data views.
Part 2: Virtual screening and scoring
# Docking scoring (illustrative): ligand-target binding, commonly AutoDock/Vina
def docking_score(smiles, pdb_id):
# Real docking: prepare ligand/receptor → search conformations → score function
# Illustrated: binding free-energy approximation
return -8.3 # kcal/mol level, illustrative
# Multi-stage funnel: rule(ADMET) → docking → dynamics
candidates = load_smiles('enumerated_library.csv') # up to millions
rules_hit = [s for s in candidates if smiles_to_features(s)['logp'] < 5]
docked = sorted(rules_hit, key=docking_score)[:500] # top 500 by docking
# Final 20-50 go to molecular dynamics refinement (supercomputing, expensive)Key points:
- Funnel screening: the candidate space converges from millions down step by step — rule filtering (seconds) → docking scoring (minutes) → molecular dynamics (days). Compute cost grows by orders of magnitude, so each stage only passes the top-ranked.
- Docking scores are notoriously unreliable: score functions are approximations (cheap proxies of binding free energy); good for ranking, not for absolute values. Industry consensus: docking ranks and enriches, it does not judge absolutely.
- Dynamics refinement is expensive but accurate: molecular dynamics (ch04's ML-potential technique) simulates binding stability, the computational verification closest to wet lab — but days of compute per molecule, so only for the final tens.
Principles
The four model classes and their compute profile
| Stage | Model type | Data | Compute profile |
|---|---|---|---|
| Molecule generation | RNN/Transformer/diffusion | known-drug SMILES libraries | AI-compute: heavy training, light inference |
| Property/ADMET | GNN/Transformer | public + proprietary labels | AI-compute: medium |
| Docking | score functions/geometry | target structures | supercomputing: parallel enumeration |
| Molecular dynamics | potentials (classical/ML) | force fields/DFT data | supercomputing: heaviest |
Clear dual-stack division: generation + ADMET (data-driven AI-compute) alternates with docking + dynamics (physics-driven supercomputing), forming a closed loop of "AI generates hypotheses → physics verifies → feedback corrects AI" — the concrete embodiment of "AI-compute × supercomputing reinforcement" in pharma.
Three pitfalls and engineering avoidance
- Data bias: public datasets (e.g. ChEMBL) skew toward known drug space; generated molecules lean into known chemistry — supplement with diversity rewards and proprietary data.
- Public-benchmark overfitting: many models "top-score" on MoleculeNet-style benchmarks yet generalize poorly — acceptance must use held-out sets and activity back-testing, not benchmark scores.
- Wet-lab loop cost: the endpoint of computational screening is wet lab; feedback (hit rates, activity) must flow back to training — a pipeline without the loop is just a "generator," not a "discovery engine."
Results
(Estimated, not measured; typical pipeline scale)
| Stage | Candidates | Per-step time | Compute |
|---|---|---|---|
| Enumerated library | 10⁵-10⁷ | seconds/molecule | AI-compute GPU |
| Rule filtering | ~10-50% left | seconds | CPU fine |
| Docking scoring | 10³-10⁴ left | minutes/molecule | supercomputing parallel |
| Dynamics refinement | 20-50 left | days/molecule | supercomputing heaviest |
| Wet-lab verification | 3-10 left | weeks-months | experiment |
Engineering Takeaways
- Build the funnel before choosing models: fix the convergence ratios and compute budget of each screening stage first, then choose models — "how many can you screen" decides success before "how accurate the model is."
- Scores rank, never judge absolutely: treat docking/ADMET scores as ranking tools; absolute judgment belongs to dynamics and wet lab.
- Manage the three molecular views uniformly: SMILES/graph/3D conformer are different projections of the same molecule; keep the three views consistent (one ID system) or upstream/downstream data misaligns.
- The closed loop is the moat: wet-lab back-test data flowing back to training set and model updates is what separates an AI-drug pipeline from a "paper demo" — the data flywheel is worth more than the model itself.
Next article preview: the drug pipeline cannot live without quality data; next we build the foundation — "Scientific Data Pipelines: Engineering from Experimental Data to Training Sets."