A clean-room, MIT-licensed Rust engine for Monte Carlo transport of ions and electrons in matter. It computes implantation range profiles, damage, sputtering and backscatter for ions, and energy deposition for low-energy electrons. SRIM/TRIM covers the same problem class; lindhard uses none of its code or data.
Status: early, pre-release (0.0.1). The amorphous ion core (milestone M0) is the most mature part, with the electron engine (M1), crystalline targets (M2) and dynamic composition and geometry (M3) under active development. Milestones and their state are tracked in
WORK_PLAN.md, the design indocs/architecture.md. Known deviations from published data and from other codes are reported, not hidden, indocs/validation.md.
cargo run -p lindhard-cli -- check examples/b_5keV_si.toml
cargo run --release -p lindhard-cli -- run examples/b_5keV_si.toml --out out/b_5keV_sirun writes summary.json and CSV profiles into the output directory. The
input schema and output layout are in docs/cli.md; more
inputs are in examples/.
Some open codes already handle parts of this problem well. The gaps are in license and scope:
- SRIM/TRIM is closed source, Windows-only and non-commercial. It treats every target as amorphous and as fixed, so the target never changes with dose.
- Crystalline implant simulation is not available in any open, maintained code. That covers channeling under tilt and twist, screen oxides, and damage that builds up to amorphization. Today it means IMSIL, Crystal-TRIM, MARLOWE or commercial TCAD.
- Ion codes that are open are either copyleft (RustBCA, iradina, IM3D) or use stopping tables taken from SRIM (OpenTRIM).
- Low-energy electron transport (eV–50 keV, for e-beam lithography proximity functions, SEM and EBIC) has one permissive open code, Nebula, and it has stalled. The reference physics lives inside Geant4 or AGPL codes.
lindhard aims to be permissive, embeddable, fast, reproducible and validated:
- MIT license, with no copyleft dependency anywhere in the build.
- A library first; the CLI and the Python bindings sit on top of it (WASM later).
- Every ion runs on its own seeded random stream, so results do not depend on the thread count.
- Every model is checked against analytic limits, independent codes and
published measurements (
docs/validation.md).
docs/prior-art.md is the survey this project starts
from. docs/history.md traces the method back to the
1947 Los Alamos neutron histories.
The name honours Jens Lindhard. His LSS theory is the standard theory of ion range, he did the foundational work on channeling, and his dielectric function is the starting point for inelastic electron scattering. Between them those cover both halves of this project.
| Path | What |
|---|---|
lindhard/ |
The library: materials, potentials, stopping, transport, tallies |
lindhard-cli/ |
lindhard binary: TOML in, JSON/CSV out |
lindhard-py/ |
lindhard Python package (pyo3 + maturin): NumPy arrays out, same TOML schema |
examples/ |
Example CLI inputs |
book/ |
Source of the lindhard book (physics manual and user guide), built with mdBook |
tools/ |
Developer tools: profiling helpers |
validation/ |
Validation harness: oracle runner, experimental datasets, results |
docs/ |
Design, physics and project documentation (index below) |
- The lindhard book (source in
book/): the physics manual, one page per model, and the user guide, including a first run from start to finish. docs/architecture.md: design and module plan.docs/cli.md: thelindhardcommand, input schema and outputs.docs/stopping-models.md: electronic stopping models, their validity ranges and sources.docs/validation.md: validation plan and current results.docs/benchmarks.md: how performance is measured, and first numbers.docs/data-provenance.md: where every dataset comes from.docs/python.md: the Python bindings.docs/README.md: the full documentation index.docs/prior-art.mdanddocs/history.md: the survey and the lineage.
Read CONTRIBUTING.md first. It sets out the clean-room
rule: what may be learned from other codes, what may be ported, and what may
never enter this tree.
MIT. See LICENSE.