Science in your browser
Research software rebuilt to open in a browser tab, with nothing to install, and checked number for number against the code it came from. The first in a series.
- Published
- 28 November 2026
- Read
- 7 min
Fire helium ions at a tungsten wall at 1 keV, the kind of thing that happens all day inside a fusion reactor. Head-on, it takes about 24 ions to knock a single tungsten atom out of the surface. Before reading on, have a guess at what happens if the ions come in at a slant, say 75° from straight on.
It takes nine. The wall wears away 2.7 times faster, and the usual shortcut formula has no angle in it at all. Finding that out properly means running a collision code, which usually means a Windows program or compiling a research library from source. In this case it means opening a browser tab, and that is what this series is about.
I’m doing this to build a portfolio. I hope to build software people will use, and to help scientists get more use out of their own software.
Each app in the series takes an open source package from published research, rebuilds it to run in a web page, and comes with a write-up that leads with what the model finds. Every one is checked against the package it came from, and the write-up says exactly how. This post walks through one of them in full, then shows how the same recipe and the same kind of check carry over to the others. It’s for anyone who uses research software or writes it, and you don’t need to know any of the fields to follow along.
The formula has no angle
The usual shortcut for how fast ions wear a surface away is a fit by Yamamura and Tawara to measured yields for many pairs of ion and target. However, every measurement behind it was made with the beam hitting the surface head-on, and real beams rarely do. A wall designer using the head-on number for a glancing beam could be out by almost a factor of three.
To see what a slanting hit does you have to follow the collisions, one ion at a time. SRIM, the standard program for this, is free but only runs on Windows. RustBCA, from Jon Drobny and Davide Curreli at the University of Illinois, is an open source alternative written in Rust. Using it means building it from source and writing an input file.
The same code, in a browser tab
ions is RustBCA compiled to WebAssembly without changing a line, so it runs inside the page on your own machine. It opens on argon hitting tungsten, drawn as a slice through the metal, and 5,000 ions take about 2 seconds.

From there you can change the ion, the energy and the angle and watch the yield move. Tilting argon pushes its cascade closer to the surface, where more of it can escape, and the yield climbs to 1.56 times the head-on value at 55–60° before collapsing as the ions start skimming off. Helium, being much lighter, peaks later and higher, which is the 75° in the opening.
Checked number for number
None of that is worth much if the browser version doesn’t give the same answers as the original. RustBCA’s documentation works through an example of 10,000 argon ions into tungsten at 1 keV. Upstream counts 10,291 sputtered atoms and 3,297 reflected ions. The page counts 10,291 and 3,297, with the reflected energy agreeing to 12 decimal places. Fifteen more reference runs, some at a slant and one below the energy needed to sputter anything, match count for count as well.
ions is the easiest kind of check, because it’s the same code. Most apps in the series aren’t, and I think it helps to separate three levels:
- Same code. The original compiled for the browser. The check is that the numbers come out identical.
- Same method. The algorithm rewritten, following the original’s choices. The check goes stage by stage, so any difference can be pinned to the part that was written differently.
- Same equations. Nothing shared but the maths in the paper. The check is against the original on benchmarks, ideally ones with exact answers.
range is the second kind. It maps where a species’ climate suits it, following elapid’s version of MaxEnt, with its own fitting step in place of the glmnet library elapid calls. The features built from the climate data agree with elapid’s to 10⁻¹². Given elapid’s fitted coefficients, range reproduces its map to 10⁻⁵. With range doing its own fitting, the finished maps correlate at 0.996 or better on seven species. A correlation on its own could hide a small bug that happens to wash out, but the first two numbers rule that out everywhere except the fitting.

column is the third. It simulates a chromatography column, the step that pulls antibody drugs out of everything else a cell culture makes, and shares no code at all with CADET, the open source reference simulator. On a benchmark with exact solutions its peaks are within 0.17% in height. Set up with an identical model, grid and scheme, the two programs’ outlet curves agree to single-precision rounding.

Nine so far
Here is every app with a check against its original, and what the check found.
| App | Field | Original | Check |
|---|---|---|---|
| ions | plasma physics | RustBCA | identical counts on 16 reference runs |
| range | ecology | elapid | maps correlate at 0.996 or better |
| column | bioprocessing | CADET | peaks within 0.17% on a benchmark |
| pulse | physiology | systole | heart rate variability to one part in a million |
| dose | pharmacology | drc | the published fit to every printed digit |
| laws | machine learning | PySINDy | fitted coefficients to 10⁻⁹ |
| pores | porous materials | PoreSpy | identical checksums on generated images |
| gtrax | porous materials | pytrax | tortuosity within 1% on every axis |
| neuron | neuroscience | Jaxley | converges to within 1.4% |
Several of these do the job of programs people pay for or have to install. pulse reads an ECG the way Kubios HRV does, dose fits curves the way GraphPad Prism does, and column covers ground that commercial software such as Cytiva’s GoSilico covers. None of them does everything the desktop programs do, and each write-up says what’s missing.
When the check finds something
Most of the time the check just agrees, which is the point of it. Now and then it turns something up.
One of the originals is pytrax, which I published with colleagues in 2019. It sends random walkers through an image of a porous material to measure how much the structure slows diffusion. Its browser version, gtrax, agrees with it within 1%. However, fitting the same walks a second way showed that on an image with large pores, pytrax’s own fit reads 23% low, because it includes the early steps before the walkers have left the pore they started in. Both programs gave the same pair of numbers, so it isn’t a bug in either. It’s a weakness in the fit pytrax uses, and it only came out because the rebuild had to be checked.

The neuron check against Jaxley looked 11% out at first. Giving both programs 2, 4 and then 8 times as many points showed neuron’s answers barely moving while Jaxley’s crept up to meet them. The two just divide the cell up differently.
And sometimes the check stops a fix. Boron fired into silicon runs too deep in RustBCA, and multiplying one of its inputs by 1.5 lands it right on the usual range tables. Against 12 measurements, though, the shortfall wanders between 0.98 and 1.55, and no single factor fits them within 10%. So there’s no fudge factor, and the page warns you instead.
What a check can’t tell you
Every one of these checks compares a program with another program, not with the world. For argon on tungsten at 556 eV, RustBCA gives 0.671 atoms per ion against 0.488 from the Yamamura–Tawara fit to measurements, and ions matching RustBCA does nothing to close that gap. A good map of where the midge lives now says nothing certain about 2100. The write-ups say so, with the numbers.
So back to the helium. On the page, the yield at 75° is 2.7 times the head-on value, and you can see it for yourself in a couple of seconds. Whether real tungsten agrees is a question for measurements, and the people best placed to answer it are the ones who wrote the original code. If you’re one of them and something in my version looks off, please tell me.
ions is the first in the series, and the others follow every couple of weeks.