
Atomic Sandbox
2026 · Desktop app · Personal project
A real-time quantum chemistry sandbox, built from scratch in Rust. Its LIRA engine solves the electrons with density functional theory on any GPU, live, so bonds, shapes and reactions emerge from the physics instead of being scripted.
What it does
You place atoms in 3D, drag them around and watch what happens. Nothing chemical is written in: each element is only its atomic number and mass, and the electrons are solved from first principles with real-space Kohn-Sham density functional theory, so bonds, shapes and energies come out of the equations.
The physics runs twice: a 64-bit reference solver on the CPU, and the same solver in WGSL compute shaders on the GPU, checked against each other. A machine-learned model trains itself in the background from the solver's answers, takes over when it is confident, and hands back to the full solve when it is not.
Highlights
- The GPU solver runs 30 to 100 times faster than the CPU reference, and agrees with it to 3.5e-7 Ha or better from H to LiH (4.1e-6 Ha for water)
- The view re-solves about 0.1 to 0.2 seconds after you move an atom
- The learned model answers a dynamics step in about 5 µs, and learned H₂ from nothing in 38 DFT calls
- Every physics change is gated by validation suites against published references: water's bond angle comes out at 104.8°
- Written from scratch in Rust: about ten crates, hand-written WGSL shaders and an egui interface
Built with
Assisted by Claude