Repository navigation
Releases
Releases · The-Studio-of-Sadiq/Electron-Scattering
2.0.0: ELSEPA 2021 engine and Electron Density editor
Electron Scattering Simulator 2.0.0 switches the physics engine to ELSEPA 2021 and adds a visual Electron Density editor, so every workbench input can be edited and reaches ELSEPA.
Highlights
- ELSEPA 2021 engine. The app now runs the 2021 release of ELSEPA (package elsepa-2020 with RADIAL; F. Salvat, A. Jablonski, C. J. Powell, Comput. Phys. Commun. 261 (2021) 107704). At the request of the ELSEPA authors, the 2005 version is no longer distributed. ELSEPA's sources, data tables and WebAssembly build are licensed under CC BY-NC 3.0, which permits non-commercial use with attribution. The app code remains MIT.
- Electron Density editor (new tab):
- load ELSEPA's Dirac–Fock, DHFS, TFD or TFM densities, a file, or the current workbench density
- drag-edit the curve; normalize, ionize (including negative ions), scale, truncate, smooth and mix
- check N, ⟨r⟩, R50 and R90
- download an ELSEPA
.denfile, or send the density straight to the workbench
- Every input is editable and takes effect. Atomic weight, nuclear radius and skin reach ELSEPA through a small, documented build-time extension (
wasm/patch-elsepa.mjs, which adds the keywords ATWGHT, NUCRAD and NUCSKN). The authors' files infortran/stay unmodified. The polarization cutoff radius maps exactly onto ELSEPA's VPOLB, and ELSEPA's defaults are shown with a reset control. - Negative ions. Ion charges from −Z to +Z are accepted.
- Grids and densities:
- custom energy grids (logarithmic ranges or arbitrary lists)
- user-supplied electron densities, up to 999 points
- a custom angular grid, with the partial cross section over that range
- Cancel button with an elapsed timer for long runs, plus a warning for ion + polarization combinations, which converge very slowly in ELSEPA 2021.
Quality
- Parity CI compares the WebAssembly build with native gfortran ELSEPA and with reference tables regenerated with ELSEPA 2021 (21 cases, including the authors' official 2021 example output).
- New test suites cover features, the density tools, the overrides and negative ions, plus browser-only and offline operation.
Project
- Project website: https://thestudioofsadiq.tech/Electron-Scattering/
- Wiki, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT, CITATION.cff, issue forms and a PR template
- CI/CD: type check and build on Node 20/22, Docker build, the engine suite on engine changes, automatic website deployment. Each release attaches a static web bundle and publishes a Docker image:
docker run -p 3000:3000 ghcr.io/the-studio-of-sadiq/electron-scattering:2.0.0
Full list: CHANGELOG.md
1.2.0: ELSEPA in the browser (WebAssembly)
The official ELSEPA Fortran (Salvat, Jablonski & Powell) now runs in the browser as WebAssembly. Every result in the app comes from ELSEPA itself, and automated tests check this on every change.
Highlights
- ELSEPA in the browser. ELSCATA and ELSCATM, Fortran 77, are translated with f2c and compiled with Emscripten. Each calculation runs in a Web Worker on a fresh module instance. The app needs no installation, works offline as a PWA, and can be served from any static host. The physics routines are unmodified; only file I/O changed.
- No silent approximations. The optional native server (gfortran) now returns an error when ELSEPA can't run. It no longer falls back to the TypeScript model, and the browser engine takes over instead. Energy sweeps run ELSEPA at every energy. The simplified TypeScript model is opt-in ("TS Approximation") and its results are marked as approximate.
- More ELSEPA models in the interface:
- positive ions
- the muffin-tin model for atoms in solids
- the Helm nuclear model
- LDA correlation–polarization
- TFM, TFD and DHFS electron densities, alongside the numerical Dirac–Fock density
- Complete outputs:
- spin-rotation functions T and U, computed from the scattering amplitudes
- the absorption cross section
- complex phase shifts when absorption is on
- ELSEPA's own warnings, such as the angular limit of the DCS for ions
Validation
- Parity test, 20 cases. CI compares every number in every
dcs_*.datfile across three sources: the WebAssembly build, native gfortran ELSEPA, and (for 13 cases) stored reference tables.- Every cross section and DCS value is identical.
- Of 86,421 values compared with native ELSEPA, 435 are not bit-identical. All of these are near-zero Sherman values (differences below 1e-9) or ELSEPA's 2-digit error estimate.
- NIST comparison. Against the NIST Electron Elastic-Scattering Cross-Section Database (SRD 64), cross sections agree within 0.04% at 255 angles for H, Cu and Au at 1 and 100 keV.
- Benchmark. The WebAssembly engine takes 1.24–1.53× the time of native gfortran on the same inputs. CI writes this table to the run summary.
- Further tests. Server and output tests check that the server always uses ELSEPA, that every ELSEPA result is read, and that every model option reaches ELSEPA.
Also in this release
- New architecture figures in
docs/figures/(SVG and PNG, plus the script that draws them). - README and Documentation.md rewritten to describe what the code actually does.
- Dockerfile now ships the molecular (ELSCATM) binary.
Full changelog: 1.1.1...1.2.0
Iterative One
What's Changed
- Metadata fixes and preset bug fix by @princekhan7748 in #1
- Update README with UI typography section by @princekhan7748 in #2
- feat: add Physics Guide tab by @princekhan7748 in #3
New Contributors
- @princekhan7748 made their first contribution in #1
Full Changelog: 1.0...1.1.1
