In-silico mutagenesis backed by real structure prediction — with an honest CPU vs GPU benchmark.
Type a protein, mutate one residue, watch WT and mutant fold — then see exactly what it cost on CPU vs GPU, measured honestly.
A web platform that mutates a protein sequence, re-folds WT and mutant with a real structure-prediction model (OmegaFold; ESMFold fallback), overlays the two structures and reports how much the mutation actually changed the fold — global/local RMSD via Kabsch alignment, TM-score, pLDDT per chain. The inference stack (CPU / fp32-GPU / fp16-GPU) is benchmarked with median + IQR on a 60 W laptop GPU, and the alignment kernel exists in three implementations (NumPy, C++17 OpenMP, CUDA) so you can see where the time really goes.
Beyond the single-mutant picture, a mutagenesis-strength dial generates
ensembles of variants around one position and measures the position's sensitivity
as the distribution of structural responses — statistics and histograms, not an
eyeball comparison of two pictures. A sensitivity map asks the same question
of every position at once — position range × 19 substitutions in one job,
summarized as a heat map, per-position wind-rose glyphs and a percentile ranking,
exportable as ProteinGym-DMS_substitutions-shaped CSV rows.
Everything on screen is real: no fake progress bars, no dummy models — the UI shows the actual backend pipeline stages, and the demo above is a full live run.
The pipeline is validated against experiment: deep-mutational-scanning datasets from the public ProteinGym benchmark are mapped onto a pasted sequence and every dataset row is scored zero-shot by the same model that folds (the PLM stage of OmegaFold, weight-tied logits, one forward pass for the whole protein) — then bounded folding checks whether the structural response agrees with the language-model margins. Correlations against experimental fitness are reported with n and bootstrap confidence intervals, on a pre-registered sign for each pair.
- Real folding models — OmegaFold primary, ESMFold fallback; CPU / fp32-GPU / fp16-GPU profiles switchable in the UI
- WT vs MUT analysis — Kabsch-aligned RMSD (global + local window), TM-score, pLDDT WT/mut/Δ, alignment verdict
- C++17 / CUDA HPC core — batched Kabsch + RMSD kernel behind PyBind11, with PCIe-copy vs device-resident paths measured separately
- Saturation scan — all 19 substitutions at one position, ranked table + chart
- Mutagenesis strength dial — ensembles of K variants around one anchor position: μ simultaneous substitutions per variant (anchor + background sites), each substitution drawn from the Grantham matrix with temperature τ (conservative ↔ radical). Sensitivity = the distribution of responses across the ensemble: median + IQR, histograms of local RMSD and window ΔpLDDT, level/spread badges — no invented 0–100 score. The exhaustive mode ("all 19 substitutions") reproduces the saturation scan exactly — same targets, same artifacts
- Sensitivity map — a chosen range of positions (up to the whole protein) × 19 substitutions in one job: a heat map of positions × compass directions, per-position scalars (max / median local RMSD, sharpness) with the quadrant classification (hedgehog / needle / disk / clover), one-click painting of the WT 3D structure from within-protein percentiles, CSV / JSON export (dataset rows)
- Wind rose glyph — one position's 19 responses drawn as a rose on a fixed physicochemical compass (the same direction per substitution at every position, the WT slot stays empty): petal length = |ΔpLDDT| percentile within the protein, petal color = local RMSD percentile within the position — the shape is the position's signature and stays comparable across positions
- Protein browser — a 2D track view over the sequence: per-residue pLDDT, mutation site, scan results and the ensemble sensitivity heat strip (mean |ΔpLDDT| per residue); ±50-residue window mode, minimap, per-residue tooltips
- Whole-protein PLM screen — all 19 × L substitutions of the entire sequence ranked from a single OmegaPLM forward pass (wild-type-margin zero-shot protocol, Meier et al. 2021-style ESM-1v), no folding and no MSA; optionally the top-K most damaging substitutions per position are folded so the structural response can be checked against the margins (consistency ρ)
- DMS validation against ProteinGym — curated small proteins (≤250 aa, full 19-column sweeps, clean numbering) from
DMS_ProteinGym_substitutionsare mapped onto your sequence (exact substring, else global alignment at ≥90% identity), every single-substitution row gets its PLM margin, a bounded fold plan follows (top-1 per position by the lowest margin — never by fitness, no label leakage — plus a fitness-stratified sample), and six pre-registered correlations are reported: zero-shot ρ(PLM margin, fitness) over all mapped rows, ΔpLDDT / local RMSD on the folded subset, per-position PLM fragility vs mean fitness, PLM↔structure agreement — each with n and a bootstrap 95% CI. Multi-mutant rows are skipped and every honest deviation is listed in an on-screen caveats card - Per-residue pLDDT chart — WT vs mutant, hoverable
- Cross-run comparison — two tables built from job history on the same protein: mutations ranked by local RMSD; positions compared by percentiles within the compared set, since every window has its own model noise floor
- Research presets — KRAS G12D, p53 R82H, HbB E6V, lysozyme I56T, Trp-cage W6F, Aβ42 E22G, α-syn A53T, GFP S65T
- DNA FASTA input — upload a gene, get the codon→amino-acid translation window
- Honest job pipeline — per-stage progress from the real backend (including "waiting for GPU slot"), job history in SQLite
- RU / EN / 中文 interface — the switch covers backend-generated texts too (summaries, presets, stage messages)
Measured on the machine this project was built on: RTX 3050 Laptop 6 GB at a 60 W power limit, torch 2.6.0+cu124. All numbers are median + IQR over repeats with 2 warmup runs dropped — a 60 W laptop throttles, and a single measurement lies.
OmegaFold inference, 76-residue sequence (KRAS):
| Profile | Wall time (median) | VRAM peak |
|---|---|---|
| CPU | 143.5 s | — |
| fp32-GPU | 11.6 s | 3.27 GB |
| fp16-GPU | 8.7 s (16× vs CPU) | 4.86 GB |
Note the trade-off the table makes visible: fp16 is faster but heavier in VRAM.
Kabsch RMSD kernel, 1024 structure pairs × 256 atoms:
| Engine | Wall time (median) |
|---|---|
| NumPy | 31.8 ms |
| C++17 OpenMP | 0.36 ms (88× vs NumPy) |
| CUDA (PCIe copies) | 3.2 ms |
| CUDA (device-resident) | 1.8 ms |
The CUDA kernel only wins once the data lives on the device — crossing PCIe costs
more than the kernel itself. Reproduce: python scripts/10_bench_inference.py,
python scripts/11_bench_kernels.py.
./scripts/00_setup_env.sh # venv + dependencies
source .venv/bin/activate
make -C hpc_core cpu # C++ core (CUDA optional: make cuda)
uvicorn backend.app.main:app --port 8077
cd frontend && npm install && npm run devOpen the frontend, pick a preset or paste a FASTA, then run WT + mutant, a position
scan, a strength-dial ensemble, a whole-protein PLM screen or a DMS validation.
Full pipeline check: python scripts/e2e_smoke.py (ubiquitin + I44A/I3L/P19G
- PLM screen + a PLM-only DMS check when
data/dms/curated.jsonexists).
Validation numbers for the write-up: scripts/30_download_proteingym.py fetches the
ProteinGym substitutions, scripts/34_curate_proteingym.py builds the curated
manifest (data/dms/curated.json, the only committed file — the CSVs stay local),
scripts/35_batch_validation.py runs the full protocol over every curated assay
(also --offline, in-process, without the queue) and scripts/36_thesis_figures.py
renders the figures from data/report/validation/*.json into data/report/figs/.
[Web Client: React / 3Dmol.js / Plotly]
│ REST (polling)
▼
[Backend Gateway: FastAPI]
│ │
▼ ▼
[ML Inference Engine] [C++/CUDA HPC Core]
(OmegaFold / PyTorch) (Kabsch / RMSD, PyBind11)
backend/— FastAPI: job queue (SQLite), validation, telemetryml/— folding-model wrappers + CPU/GPU-fp32/fp16 profileshpc_core/— C++17 + CUDA kernel: Kabsch, RMSD, PyBind11 bindingsfrontend/— Vite + React + TypeScript, 3Dmol.js + Plotly.jsscripts/— environment setup, spike tests, benchmarks, report figures + presentation generator, demo recorder, ProteinGym download/curation + batch DMS validation + thesis figures
The demo GIF is recorded by a Playwright script that drives the real UI end-to-end
on a real GPU run (scripts/20_demo_video.py) — including a check that the recorded
job ran the real model, not a stub.
- OmegaFold (Wu et al., 2022, Apache-2.0) and ESMFold — structure prediction
- ProteinGym (OATML, Marks lab) and the deep mutational scanning studies it aggregates — experimental fitness ground truth for the validation tab; zero-shot scoring follows the wild-type-margin protocol of Meier et al., 2021 (ESM-1v)
- 3Dmol.js — molecular viewer · Plotly.js — charts
- PyBind11 — C++/Python bindings

