Releases: abgnydn/webgpu-dna
Release list
v0.7.0 — real Born excitation, parameter-free, sub-keV CSDA closed
v0.7.0 — real Born excitation, parameter-free, sub-keV CSDA closed
This release came out of a Geant4-DNA expert review of the project. It addresses
the three top concerns at once, and the headline is a physics win where it matters
most: the low-energy end of the track.
The audit (reviewer #1: physics-list consistency)
A source audit (E29) settled whether the cascade and chemistry were validated
against the same Geant4 physics list. They are: both dnaphysics (cascade
oracle) and chem6 (chemistry oracle) register G4EmDNAPhysics_option2 —
no seam. And for option2, G4EmDNABuilder never enables the Emfietzoglou
models (the energy limit is 0; only option4 enables them), so the reference
excitation is Born, across the whole electron range.
The fix (reviewer #2: remove the σ_exc fudge)
The codebase had been approximating Born excitation by flat-scaling an
Emfietzoglou table (SIGMA_EXC_SCALE = 0.39). But the Emfietzoglou/Born ratio is
energy-dependent (~2.5× at keV, ~10× at ~10 eV), so one scalar left
low-energy secondaries over-excited ~4×. v0.7.0 loads the real
sigma_excitation_e_born cross section and removes the scalar — the
track-structure physics is now parameter-free (with RECOMB_BOOST already
gone since v0.5.0).
The result (reviewer #3: the sub-keV CSDA)
| 100 eV | 300 eV | 500 eV | 1 keV | 10 keV | |
|---|---|---|---|---|---|
| before (scaled-Emf) | 0.782× | 0.852× | 0.894× | 0.933× | 0.997× |
| v0.7.0 (Born) | 0.956× | 0.986× | 0.994× | 0.987× | 0.997× |
The chronic sub-keV deficit — the project's weakest spot for its whole history,
and the energy range where track-structure codes earn their keep (the track ends,
the dense terminal clusters break DNA) — is closed. All 8 energies are now
0.956–1.005×. Cascade ions 0.937→0.942×; chemistry RMS flat at 7.0% (the G(H)
overshoot is gone); energy conservation 99.89%; primary bit-exact; 46/46 tests.
Honest notes
- The SSB indirect/direct ratio drifted 2.72→3.26 with the new physics.
P_indirect
is a calibrated fit; we report the drift honestly rather than re-tune it to
the band — it demonstrates exactly why we treat DNA damage as methodology, not
validated absolute physics. - Scope: electrons, 100 eV–20 keV, low LET. Protons/heavier ions and realistic
chromatin geometry are future work.
v0.6.1 — σ_exc → Born level (clean win)
v0.6.1 — σ_exc → Born level (clean win)
A one-parameter refinement that the v0.6.0 full electron cascade unlocked.
What changed
SIGMA_EXC_SCALE lowered 0.5 → 0.39 (≈ Born level). The 0.5 value had been
tuned for the truncated cascade — it over-excited to compensate for the
missing tertiary radicals. Once v0.6.0 tracked the full cascade and supplied
those radicals, ≈Born excitation became better on every axis, with nothing
regressing — and it shrinks the Emfietzoglou-vs-Born divergence, so the model
is more Geant4-faithful:
| metric | v0.6.0 (σ=0.5) | v0.6.1 (σ=0.39) |
|---|---|---|
| CSDA @ 100 eV | 0.736× | 0.782× |
| CSDA @ 1 keV | 0.912× | 0.933× |
| CSDA @ 10 keV | 0.994× | 0.997× |
| cascade ions | 0.931× | 0.937× |
| chemistry RMS vs chem6 | 7.6% | 6.8% |
| G(H) overshoot | 1.085× | 1.055× |
| G(e⁻aq) | 0.887× | 0.899× |
| SSB ratio | 2.53 | 2.72 (in band) |
How it was found
By directly testing — and refuting — my own prior conclusion. E26 had inferred
the residual cascade deficit was an immovable "σ_exc Emfietzoglou floor," and
E7e had read that σ_exc couldn't be lowered without breaking the chemistry. Both
were true for the truncated cascade and false for the full one — a direct
flip-and-measure test (E28) showed σ_exc=0.39 improves everything. Verify against
ground truth, don't trust the inference.
Validated end-to-end: CSDA (8 energies), cascade ions, chemistry G-values @ 1 µs,
SSB ratio, 0.1 ps initial yields. All artifacts under experiments/results/2026-06-09/.
v0.6.0 — full electron cascade
v0.6.0 — full electron cascade
The secondary shader now tracks the full electron cascade (tertiary / gen3+), instead of absorbing tertiary electrons in place. This resolves the long-standing cascade-ion deficit and is a clean win on every axis:
| metric | v0.5.0 | v0.6.0 |
|---|---|---|
| cascade ions @10 keV vs Geant4 | 0.766× | 0.931× |
| chemistry RMS vs chem6 | 19.7% | 7.6% |
| G(H₂) vs chem6 | 0.74× | 0.99× |
| G(H₂O₂) vs chem6 | 0.69× | 0.93× |
| SSB indirect/direct | 2.32 | 2.53 (band 2–3) |
- The chem6 1 µs gap — the H₂/H₂O₂ deficits that stood through the entire project history — is largely closed.
- Primary track is bit-exact vs Geant4 (195.4 ionisations/primary vs 195.6, by trackID in the 6.8 GB ntuple).
- Validated across all 8 ESTAR energies; the browser build is bit-identical to the native runtime; energy conserved (99.9%).
How
secondary.wgsl emits tertiary electrons into sec_buf (G4DNABornAngle direction sampling, OH+H₃O⁺ products, deferred eaq); dispatch.ts grows the Phase B wavefront in chunks so they get tracked.
Honest note
The investigation included a self-caught error: a normalization bug in the analysis (run_irt invoked with the wrong n_therm) briefly made the fix look like it broke chemistry, and two experiments (E23–E24) chased a phantom before verify-before-asserting caught it (E25). The fix was always a clean win.
Full details in CHANGELOG.md.
v0.5.0 — parameter-free pipeline
v0.5.0 — parameter-free pipeline
The last unphysical tuning fudge (RECOMB_BOOST) is removed (set to its neutral 1.0). The pipeline is now parameter-free — the only remaining non-unity scalar, SIGMA_EXC_SCALE = 0.5, is a documented Emfietzoglou-vs-Born physics divergence, not a tuning knob.
The flip was validated end-to-end on all three gates:
- Cascade ions recover 0.677× → 0.766× (32% → 23% deficit). Source archaeology found
RECOMB_BOOST=2.0was destroying ~⅓ of the autoionisation H₃O⁺ ions via boosted geminate recombination; at the physical1.0they survive. [E7d] - Chemistry stays parameter-free at +1.4 pp RMS and improves OH/eaq/H (removes the H overshoot). [E10r]
- SSB indirect/direct ratio holds in PARTRAC's 2–3 band at 2.32 (was 2.46) with no
P_indirectrecalibration. [E13d]
Removing the fudge improved the cascade-ion deficit and made the chemistry parameter-free — the former "two-knob tradeoff" was an artifact of the fudge fighting the physics, not fundamental.
Production, README §Numbers, the paper, and the live site (webgpudna.com) all now report the same parameter-free config.
Also in this release
- E12-local-exact: exact voxel dose (C=991) confirms the C≈981 proxy to 1% — L5 absolute-yield vindication now rests on measured dose.
- Free-compute infrastructure (
FREE_COMPUTE.md): IRT chemistry + SSB/DSB validation run GPU-free on GitHub Actions 16 GB runners. Kaggle/Colab GPU path tested and closed (compute-only, no Vulkan). Oracle Always Free runbook for Geant4.
Full details in CHANGELOG.md and the corrected paper (paper/main.pdf).
Validation inputs (rad_buf dumps for CI chemistry)
Pre-chemistry rad_buf dumps + 10 keV dose grid (WebGPU Phase A+B output) for the CI chemistry/SSB validation. Shaders: parameter-free production (σ_exc=0.5, RECOMB_BOOST=1.0) as of 2026-06-08. N=4096 primaries. Regenerable via experiments/lib/regenerate-dumps.mjs. rad_E10000_recomb1.bin is the same 1.0 dump kept for the E13d artifact provenance.
v0.4.1 — paper + parameter-free chemistry
Paper + parameter-free chemistry. Adds the arXiv-style preprint and resolves
the chemistry stage's reliance on an unphysical knob.
Added
paper/— arXiv-style LaTeX preprint (main.tex,refs.bib,main.pdf)
with six figures generated from the committed artifacts (figs/make_figs.py).
All references verified against the publisher (exact pages + DOIs).- E10r — parameter-free chemistry measurement. Re-ran the IRT at
RECOMB_BOOST = 1.0(regenerated dump): the unphysical knob is not
load-bearing — removing it shifts the 5-species RMS vs chem6 @1µs by only
~1.4 pp (18.3% → 19.7%), improves G(OH)/G(eaq), and removes the G(H)
overshoot. The paper now reports the parameter-free yields as primary.
Changed
- Corrected gMicroMC/MPEXS attribution: both use a Smoluchowski
reaction-radius contact test, not the Brownian bridge; the bridge is
re-attributed to Clifford et al. 1986. - README documents the real deploy path (Cloudflare Pages via
wrangler,
projectwebgpudna) and the parallel Vercel mirror. GEANT4_DIVERGENCES.mdB2 row updated with the measured non-load-bearing
result; removed the emptytests/integration/directory.
v0.3.0 — Research-grade closure release
Live: https://webgpudna.com — every number on the site is now backed by a falsifiable JSON artifact under experiments/results/, with README § Numbers as the single source of truth.
Highlights
- L5 marquee closure — SSB indirect / direct ratio 0 → 2.96 (in PARTRAC's published 2-3 band) via 4 stages:
- Split
SSB_R_DAMAGE_NMintodirect=0.29+indirect=1.0 - Instrument
public/irt-worker.jsto score every OH-death event + 1 μs survivors - Calibrate
SSB_P_INDIRECT0.4 → 0.05 (the IRT-time accumulator visits ~10× more events than the 1 μs-only scan, so the per-event probability needed scaling down) - Thread the per-bp hit mask into the DSB clusterer so co-located strand-0/1 indirect hits cluster correctly
- Split
- Joint physics fix in
src/shaders/—SIGMA_EXC_SCALE = 0.5(partial Emfietzoglou rollback) +RECOMB_BOOST = 2.0(approximates Geant4's time-integrated e-h recomb). E10i measures RMS dev vs chem6 dropping 30.3% → 19.0%, CSDA @ 100 eV lifting 0.587× → 0.74×, G(H₂) closure 0.51× → 0.78×. - E5b surfaces the energy-dependent CSDA deficit — 0.587× @ 100 eV → 0.992× @ 20 keV. The previously isolated "0.988× @ 10 keV / 3.59σ" was the tail of a much larger sub-keV deficit, not an isolated artifact.
- E10e/f/g/h decompose the 0.1 ps H₂/H₂O₂ deficit:
- Cross-event recomb: REFUTED (3.5% of gap)
- Per-primary IRT partitioning: REFUTED at 0.1 ps; CONFIRMED for 96% of 1 μs gap
- Recomb-rate sensitivity: linear sweep places the missing factor at ~25%
- Time-integrated recomb with proper H₂Ovib branching: 30% → 22% RMS dev but G(eaq) takes collateral damage (two-knob structural limit)
- README restructured — every quantitative claim moved into a single § Numbers section at the bottom.
CLAUDE.md,index.html, and the OG image are summaries that link back; no number lives in two places.
Validation status
Per-level results (all rows backed by JSON artifacts in experiments/results/):
- L0 (env): 2/2 pass — B0 browser env, B1 harness liveness
- L1 (cross sections): 9/9 pass — E1/E1b/E1c, E2/E2b, E3/E3b, E4/E4b
- L2 (track structure): 3 pass / 2 honest negative / 1 partial — E5/E5b/E6/E6b/E7/E8
- L3 (pre-chem): 1 honest negative — E9
- L4 (chemistry): E10/E10b pass, E10c/E10d/E11 honest negatives, E10e refuted, E10f mixed, E10g/E10h/E10i quantify the path forward
- L5 (DNA damage): L5 indirect SSB gap closed in E13c (ratio 2.96 in PARTRAC band); E12 within factor-5 pass band
- L6 (performance): 455× vs Geant4 11.4.1 single-thread, 280× vs Geant4 MT-8 (production-realistic), 40× kernel-fusion factor
46 / 46 unit tests pass.
Changelog
See CHANGELOG.md for the full list of changes, including:
- 4 new experiment IDs (E5b, E10e, E10f, E10g, E10h, E10i)
- Joint shader fix (
SIGMA_EXC_SCALE,RECOMB_BOOSTconstants) - L5 indirect-SSB scoring refactor in
public/irt-worker.js - Docs consolidation into README § Numbers
- Build fix: pin
fetch-demo.mjstodemo-v1tag
What's next
PHYSICS_DIAGNOSIS.md tracks the remaining open gaps:
- H₂O+ tracking with proper time-integrated recomb (~3 hr) — replace the
RECOMB_BOOSTconstant with the physical model - W_sec distribution shifter (~2 hr) as a third knob
- E14 vs molecularDNA full chromatin geometry (~1 day, deferred)
🤖 Generated with Claude Code
v0.1.0 — WebGPU Geant4-DNA in a browser tab
First versioned release of webgpu-dna — a WebGPU port of Geant4-DNA
running entirely in the browser.
Live: https://webgpudna.com
Highlights
- CSDA range 0.985× of Geant4-DNA at 10 keV (N = 4096 primaries)
- Energy conservation 100.0%, ions per primary ratio 1.00×
- Karamitros 2011 9-reaction IRT chemistry in a Web Worker
- 21×21 parallel B-DNA fibers × 3 μm — 3.89 Mbp scoring grid
- 46 unit tests across 7 files (Vitest)
- Mobile-friendly WGDNA-4D Gaussian-splat viewer with touch + pinch
What's in this release
See CHANGELOG.md for the full list including the physics
engine, chemistry pipeline, DNA scoring, validation harness, G4EMLOW
converter, and the 4D viewer.
Get started
```bash
git clone https://github.com/abgnydn/webgpu-dna
cd webgpu-dna
npm install
npm run dev # → http://localhost:8765
```
WebGPU support required (Chrome/Edge 113+, Safari 26+, Chrome 121+ Android,
Firefox 141+ Windows / 145+ macOS Apple Silicon).
MIT licensed. Author: @abgnydn.
This release supersedes the existing `demo-v1` tag (which is a snapshot of
the WGDNA-4D demo .bin data, hosted out-of-repo to avoid git bloat — that
tag stays around as a download mirror).
WGDNA-4D demo snapshot v1
Bundled demo snapshot for the /splat.html 4D viewer.
Generated by the Geant4-DNA WebGPU validation harness:
- 4096 primaries @ 10 keV
- 50,000 radicals subsampled per checkpoint
- 8 checkpoints across 1 ps → 1 microsecond
- 21x21 B-DNA fiber grid included
Hosted as a release asset so the 8.4 MB binary stays out of the git history.
The viewer fetches the latest copy via:
https://github.com/abgnydn/webgpu-dna/releases/latest/download/wgdna-default.bin