YAMC
Yet Another Monte Carlo. Geometry, materials and a neutron or photon source in; fluxes, heating, tritium production, transmuted materials and shutdown dose rates out.
Try it online 🌐 | Documentation 📝 | PyPI 🐍
The browser version needs no install and no account. It is the same Rust transport engine compiled to WebAssembly, against the same continuous-energy data. The simulation runs on your machine; nothing is uploaded.
pip install yamc
import yamc
# pick a neutron data library, downloaded on demand
yamc.neutron_cross_section_data = "endf-b8.1"
# make your own or use inbuilt material definitions
steel = yamc.materials.pnnl.material("Steel, Stainless 316")
breeder = yamc.Material(
composition={"Li": yamc.enriched(2.0, target="Li6", percent=60.0), "Si": 1.0, "O": 4.0},
density=2.4,
)
# build the geometry from surfaces and cells
first_wall = yamc.Sphere(radius=100.0)
blanket = yamc.Sphere(radius=101.0)
outer = yamc.Sphere(radius=150.0, boundary="vacuum")
plasma_cell = yamc.Cell(region=first_wall.below)
wall_cell = yamc.Cell(region=first_wall.above & blanket.below, material=steel)
blanket_cell = yamc.Cell(region=blanket.above & outer.below, material=breeder)
geometry = yamc.Geometry([plasma_cell, wall_cell, blanket_cell])
# a 14.06 MeV D-T fusion neutron point source
source = yamc.NeutronSource(energy=14.06e6)
# score tritium production in the blanket and heating in each cell
tbr = yamc.Tally(scores=["H3-production"], cells=blanket_cell)
heating = yamc.Tally(scores=["heating"], cells=[wall_cell, blanket_cell])
# run on every CPU core (or compute="gpu")
model = yamc.Model(geometry=geometry, source=source, tallies=[tbr, heating])
results = model.simulate_transport(total_particles=100_000)
# every result carries its statistical uncertainty
print("TBR", results[tbr].mean, "+/-", results[tbr].standard_deviation)
print("heating", results[heating].mean, "eV per source neutron")
What it solves
Continuous-energy neutron and photon transport over CSG, CAD or mesh geometry, on CPU or GPU, with tallies, variance reduction, transport-coupled transmutation and shutdown dose rates. The solver is Rust; the wheel needs no compiler and no external toolchain.
Transmutation without transport
If you already have a spectrum and do not need transport, install yani instead. It uses the same materials, schedules and nuclear data, without the geometry.
Licence
Dual-licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.
Metadata
Release files for yamc 0.24.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yamc-0.24.0.tar.gz | 7.5 kB | With provenance | Details for yamc-0.24.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| yamc-0.24.0-py3-none-any.whl | Python 3 | none | any | Details for yamc-0.24.0-py3-none-any.whl |
Total release size: 15.0 kB
Release files / yamc-0.24.0.tar.gz
| Download URL | yamc-0.24.0.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93f0d35f2e0c2cbe3ea019b1f6518d0223761a15f7eb6c1e2a9ff852f75af4ab
|
|
BLAKE2b-256 checksum How to use checksums |
65c6e3cc56fe9c742461bb9f49b2335d2001759920b5139b667577c932c63f5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logRelease files / yamc-0.24.0-py3-none-any.whl
| Download URL | yamc-0.24.0-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7fdacbe04a022fd1adcdab582fef35efbce7862c8e08db48705d6911d5fc120c
|
|
BLAKE2b-256 checksum How to use checksums |
158b0a7f7b3887e355f4a841e1af4cc02e9903d06dd50c4af8e51cdaa3319a05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logSecurity for yamc 0.24.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for yamc-0.24.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.