Skip to main content

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

at your option.

Metadata

Release files for yamc 0.26.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yamc 0.26.0
File Size Uploaded Provenance Actions
yamc-0.26.0.tar.gz 7.5 kB With provenance Details for yamc-0.26.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for yamc 0.26.0
File Interpreter ABI Platform Actions
yamc-0.26.0-py3-none-any.whl Python 3 none any Details for yamc-0.26.0-py3-none-any.whl

Total release size: 15.0 kB

Release files / yamc-0.26.0.tar.gz

Download URL yamc-0.26.0.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b77a3c33935afd31ac7f46a23a60a585adbf52efe517cf3fc2a0c050e72ff37f
BLAKE2b-256 checksum
How to use checksums
25b04892f8f089238ffb92f2e7e00b451677bdea44b82b2c910c7f114bb461ff
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 23, 2026.

Transparency log

Release files / yamc-0.26.0-py3-none-any.whl

Download URL yamc-0.26.0-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f6ddcb919ed798a93ea35c0cb869afafe0b09ba27801d55267bfb205fb3ab69b
BLAKE2b-256 checksum
How to use checksums
4782fe830c71c3262bbda4a75932378e8bd3d1fdceab4861972cb636a2fd8965
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 23, 2026.

Transparency log

Security for yamc 0.26.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.

Select from 2 files

Attestation for yamc-0.26.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 23, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page