Python API
Nucleide exposes a typed pure-Python package at python/nucleide/ that re-exports
a compiled PyO3 extension built from bindings/python/. The extension module is
named nucleide._internal; users import from the nucleide domain submodules,
which mirror the Rust workspace crates.
Module layout
import nucleide as nuc
The top level carries version(), nucleide.__version__, and the domain
submodules below (so nuc.nuclei.Nuclide(...) works directly). Each submodule
re-exports its symbols from nucleide._internal. If you are looking for a
task-oriented entry point rather than the full module map, jump to
Common workflows below:
-
nucleide.nuclei— Nuclide identifiers, nuclear data, and reaction names ·nucleide-nuclei -
nucleide.material— Materials, activation, and the PNNL compendium (backed bynucleide-material). · pure Python -
nucleide.mcnp— MCNP file readers and writers ·nucleide-mcnp-io -
nucleide.mcpl— MCPL particle-list interchange ·nucleide-mcpl-io -
nucleide.serpent— Serpent output readers ·nucleide-serpent-io -
nucleide.fluka— FLUKA USRBIN readers and material-card builders ·nucleide-fluka-io -
nucleide.vr— Variance-reduction tools ·nucleide-vr-tools -
nucleide.enrichment— Enrichment cascade solving ·nucleide-enrichment -
nucleide.depletion— Depletion chains and CRAM solvers ·nucleide-depletion -
nucleide.kinetics— Prescribed-reactivity point kinetics ·nucleide-kinetics -
nucleide.spectroscopy— Gamma-ray spectroscopy and measurement ·nucleide-spectroscopy -
nucleide.unfold— Neutron spectrum unfolding ·nucleide-unfold -
nucleide.tritium— 1D tritium diffusion-trapping kernel ·nucleide-tritium -
nucleide.plasma_source— Tokamak fusion neutron sources ·nucleide-plasma-source -
nucleide.damage— Damage and gas-production metrics ·nucleide-damage -
nucleide.blanket— TBR and blanket power bookkeeping ·nucleide-blanket -
nucleide.equilib— Equilibrium data readers ·nucleide-equilib-io -
nucleide.alara— ALARA activation-code interop ·nucleide-alara-io -
nucleide.cccc— CCCC binary-standard readers and PARTISN deck writer ·nucleide-cccc-io -
nucleide.fispact— FISPACT-II output parser ·nucleide-fispact-io -
nucleide.origen— Scoped ORIGEN 2.2 TAPE readers ·nucleide-origen-io -
nucleide.r2s— Rigorous two-step (R2S) shutdown-dose-rate orchestration ·nucleide-r2s -
nucleide.emit— Single-material emission to legacy transport-code cards ·nucleide-emit -
nucleide.uq— Seeded UQ-lite sampling kernel and decay perturber ·nucleide-linalg -
nucleide.data— Download Nucleide data files pinned to a release tag, branch, or commit. · pure Python -
nucleide.openmc— OpenMC statepoint tally bridge (pure Python; caller-side OpenMC). · pure Python
Common workflows
The module sections below list every symbol; these are the shortest paths into
the most common tasks. Snippets use the same from nucleide.<domain> import ... idiom as the tutorials, which cover each workflow in depth.
Parse a legacy output file
from nucleide.mcnp import read_meshtal
from nucleide.serpent import read_serpent
tallies = read_meshtal("path/to/meshtal").tallies
res = read_serpent("path/to/filename_res.m", "res")
Tutorials: Parse MCNP output, Parse Serpent output, Parse FLUKA output.
Build a material
from nucleide.data import fetch_compendium
from nucleide.material import MaterialsCompendium, from_formula
comp = from_formula("UO2")
lib = MaterialsCompendium.load(fetch_compendium())
Tutorial: Build materials.
Run depletion
from nucleide.depletion import deplete, read_chain
chain = read_chain("path/to/chain.xml")
out = deplete(chain, {"U235": 1.0, "U238": 20.0}, dt=1e6)
Tutorial: Run depletion.
Solve an enrichment cascade
from nucleide.enrichment import Cascade
cascade = Cascade.default_uranium()
cascade.solve()
Tutorial: Enrichment cascade.
Run a kinetics transient
from nucleide.kinetics import solve
betas = [0.00021, 0.00141, 0.00127, 0.00255, 0.00074, 0.00032]
lambdas = [0.01, 0.03, 0.1, 0.3, 1.0, 3.0]
out = solve(betas, lambdas, Lambda=1e-5,
rho={"kind": "step", "t_step": 1.0, "rho_init": 0.0, "rho_final": 0.002},
t=[0.5, 1.0, 2.0], n0=1.0)
Tutorial: Run kinetics.
nucleide.nuclei
Backing crate: nucleide-nuclei · source dir
-
Nuclide— A nuclide identifier with naming-convention conversions.__init__(name: str) -> Nonename: str(property)nucid: int(property)zzaaam: int(property)z: int(property)a: int(property)state: int(property)zaid: int(property)zzllaaam: str(property)serpent: str(property)nist: str(property)cinder: int(property)alara: str(property)sza: int(property)mass: float | None(property)abundance: float | None(property)fluka() -> str
-
Particle— A particle species with cross-code name translations.__init__(spec: str | int) -> Nonename: str(property)describe: str(property)mcnp() -> str | Nonemcnp6() -> str | Nonefluka() -> str | Nonegeant4() -> str | None
-
rxname_id_from_nucdelta(from_nucid: int, to_nucid: int, projectile: str = 'n') -> int -
rxname_child(parent: str, rx: int | str, projectile: str = 'n') -> str -
rxname_parent(child: str, rx: int | str, projectile: str = 'n') -> str -
decay_branch_fraction(parent: str, progeny: str) -> float | None -
fission_yields(parent: str, origin: str = 'n', kind: str = 'independent') -> list[tuple[float, list[tuple[str, float, float]]]] -
dose_factor(name: str, pathway: str, source: str = 'EPA') -> float | None -
dose_lung_model(name: str, source: str = 'EPA') -> str | None -
parse_fgr15_table(text: str, expected_rows: int) -> dict[str, Any] -
load_fgr15_table(scenario: str, *, expected_rows: int = 1252, dest: str | Path | None = None, url: str | None = None) -> dict[str, Any] -
fgr15_dose_rate(nuclide: str, scenario: str, age: str, *, expected_rows: int = 1252, dest: str | Path | None = None, url: str | None = None) -> tuple[float, str]
nucleide.material
Backing crate: pure Python · source file
-
MaterialsCompendium— PNNL/DOE Materials Compendium (411 named materials).load(path: str) -> MaterialsCompendium__len__() -> intnames() -> list[str]get(name: str, as_material: bool = False) -> dict[str, Any] | None
-
Cusum— One-sided upper Page CUSUM change detector with Welford statistics.__init__(ref_shift_k: float = 0.5, alarm_h: float = 4.0, startup: int = 10) -> Noneupdate(x: float) -> boolstatus() -> boolstatistic() -> floatcount() -> intmean() -> floatvariance() -> floatstd() -> floatreset() -> None
-
dose_per_g(comp: dict[str, float], pathway: str, source: str = 'EPA') -> float -
to_xml(comp: dict[str, float], name: str, density: float, units: str = 'g/cm3') -> str -
check_labels(comp: dict[str, float], widths: list[int] | None = None) -> list[dict[str, Any]] -
audit_material(comp: dict[str, float]) -> list[dict[str, str]] -
blend_material(parts: list[tuple[dict[str, float], float]]) -> dict[str, float] -
mix_by_mass(parts: list[tuple[dict[str, float], float]]) -> dict[str, float] -
mix_by_volume(parts: list[tuple[dict[str, float], float, float]]) -> dict[str, float] -
materials_doc_to_xml(entries: list[tuple[str, dict[str, float], float]], cross_sections: str | None = None) -> str -
collapse_elements(comp: dict[str, float]) -> dict[str, float]
nucleide.mcnp
Backing crate: nucleide-mcnp-io · source dir
-
Xsdir— Parsed MCNP xsdir cross-section index.datapath: str | None(property)awr: dict[int, float](property)tables: list[XsdirTable](property)find_table(name: str) -> list[XsdirTable]nucs() -> list[int]
-
XsdirTable— One xsdir directory entry.name: str(property)awr: float(property)filename: str(property)filetype: int(property)address: int(property)tablelength: int(property)temperature: float | None(property)ptable: bool(property)zaid() -> strto_serpent(directory: str = '') -> str
-
Meshtal— Parsed MCNP meshtal file.version: str(property)ld: str(property)title: str(property)histories: int(property)tallies: dict[int, MeshTally](property)
-
MeshTally— One fmesh4 tally from a meshtal file.tally_number: int(property)particle: str(property)dose_response: bool(property)x_bounds: list[float](property)y_bounds: list[float](property)z_bounds: list[float](property)e_bounds: list[float](property)result: list[list[float]](property)rel_error: list[list[float]](property)total_result: list[float](property)total_rel_error: list[float](property)dims() -> tuple[int, int, int]num_ves() -> intnum_e_groups() -> intcell(i: int, j: int, k: int) -> tuple[list[float], list[float]]cell_total(i: int, j: int, k: int) -> tuple[float, float]to_list() -> tuple[list[list[float]], list[list[float]]]totals_list() -> tuple[list[float], list[float]]result_array() -> tuple[np.ndarray, np.ndarray]totals_array() -> tuple[np.ndarray, np.ndarray]
-
Wwinp— Parsed MCNP WWINP weight-window file (Cartesian).ni: int(property)nr: int(property)ne: list[int](property)nf: tuple[int, int, int](property)origin: tuple[float, float, float](property)nc: tuple[int, int, int](property)cm: list[list[float]](property)bounds: list[list[float]](property)e: list[list[float]](property)ww_row(particle: int, group: int) -> list[float]ww_column(particle: int, ve: int) -> list[float]ww_row_array(particle: int, group: int) -> np.ndarrayww_column_array(particle: int, ve: int) -> np.ndarrayww_particle_array(particle: int) -> np.ndarray
-
Mctal— Parsed MCNP MCTAL file: header, standard + mesh tally bodies, and kcode data.code_name: str(property)comment: str(property)n_histories: int(property)n_cycles: int(property)n_inactive: int(property)vars_per_cycle: int(property)npert: str | None(property)tally_nums: list[int](property)tallies: list[dict[str, Any]](property)mesh_tallies: list[dict[str, Any]](property)k_col: list[float](property)k_abs: list[float](property)k_path: list[float](property)prompt_life_col: list[float](property)prompt_life_path: list[float](property)averages: list[dict[str, float]](property)k_arrays() -> tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray]averages_array() -> np.ndarraytally_vals_array(number: int) -> np.ndarraymesh_tally_vals_array(number: int) -> np.ndarray
-
SurfSrc— Parsed MCNP SSW surface-source file.kod: str(property)ver: str(property)np1: int(property)orignp1: int(property)nrss: int(property)ncrd: int(property)njsw: int(property)niss: int(property)print_header() -> strtracks() -> list[dict[str, float]]
-
PtracFile— Parsed MCNP PTRAC event file.problem_title: str(property)width_code: int(property)variable_nums: dict[str, int](property)events() -> list[dict[str, float]]events_array() -> np.ndarrayevent_field_array(field: str) -> np.ndarray
-
EndlLibrary— Parsed ENDL evaluation file (EEDL/EPDL scope).-
nuclides() -> list[int] -
get_rx:get_rx(nuc: int | str, p_in: int, rdesc: int, rprop: int, x1: int | None = None, p_out: int | None = None) -> list[list[float]]
-
-
DeckProblem— Parsed MCNP input deck with format-preserving write-back.loads(text: str) -> DeckProblemmessage: str(property)title: str(property)cells: list[dict[str, str]](property)surfs: list[dict[str, str]](property)material_numbers: list[int](property)data_names: list[str](property)mode: dict[str, str](property)transforms: list[dict[str, str]](property)universes: list[dict[str, str]](property)lattices: list[dict[str, str]](property)fills: list[dict[str, str]](property)importances: list[dict[str, str]](property)volumes: list[dict[str, str]](property)tallies: list[dict[str, str]](property)sdef: dict[str, Any] | None(property)dumps() -> strvalidate() -> Nonevalidation_notes() -> list[str]set_cell_density(cell: int, dens: float) -> Noneset_cell_material(cell: int, mat: int) -> Noneset_mode(particles: list[str]) -> Noneset_cell_universe(cell: int, universe: int, not_truncated: bool) -> Noneset_cell_lattice(cell: int, lattice: int | None) -> Noneset_cell_fill(cell: int, universe: int) -> None
-
write_ssw(ssw: SurfSrc, path: str, tracks: list[dict[str, float]] | None = None) -> None -
parse_csg_to_openmc(text: str) -> tuple[str, list[dict[str, str]]] -
read_csg_to_openmc(path: str) -> tuple[str, list[dict[str, str]]] -
parse_csg_to_serpent(text: str) -> tuple[str, list[dict[str, str]]] -
read_csg_to_serpent(path: str) -> tuple[str, list[dict[str, str]]] -
parse_csg_to_phits(text: str) -> tuple[str, list[dict[str, str]]] -
read_csg_to_phits(path: str) -> tuple[str, list[dict[str, str]]] -
parse_csg_to_gdml(text: str) -> tuple[str, list[dict[str, str]]] -
read_csg_to_gdml(path: str) -> tuple[str, list[dict[str, str]]] -
mesh_to_geom(x_bounds: Sequence[float], y_bounds: Sequence[float], z_bounds: Sequence[float], cell_materials: Sequence[tuple[str, float] | None], title_card: str) -> str -
write_ptrac_hdf5(ptrac_path: str, hdf5_path: str, table_name: str = 'ptrac', table_title: str = 'Ptrac data', show_progress: bool = False) -> int -
ptrac_to_hdf5_main(argv: Sequence[str] | None = None) -> int -
meshtal_mesh_data(path: str, as_numpy: bool = False) -> dict[str, Any]
nucleide.mcpl
Backing crate: nucleide-mcpl-io · source dir
-
McplFile— Parsed MCPL particle-list file (header eagerly; particles on demand).version: int(property)nparticles: int(property)srcname: str(property)comments: list[str](property)has_userflags: bool(property)has_polarisation: bool(property)double_prec: bool(property)universal_pdgcode: int | None(property)universal_weight: float | None(property)blobs: list[tuple[str, bytes]](property)particles() -> list[dict[str, Any]]
-
write_mcpl(path: str, header: dict[str, Any], particles: list[dict[str, Any]]) -> None -
extract_mcpl(src_path: str, out_path: str, options: dict[str, Any] | None = None) -> int -
ssw2mcpl(ssw_path: str, mcpl_path: str, surfs: list[int], kinds: list[str], options: dict[str, Any] | None = None) -> int -
mcpl2ssw(mcpl_path: str, reference_ssw_path: str, ssw_out_path: str, surface: int | None = None, force_cs_to_one: bool = False, niss: int | None = None, allow_polarisation: bool = False) -> int
nucleide.serpent
Backing crate: nucleide-serpent-io · source dir
nucleide.fluka
Backing crate: nucleide-fluka-io · source dir
-
UsrbinTally— One FLUKA USRBIN detector.name: str(property)particle: str(property)nx: int(property)ny: int(property)nz: int(property)x_bounds: list[float](property)y_bounds: list[float](property)z_bounds: list[float](property)data: list[float](property)error: list[float](property)dims() -> tuple[int, int, int]
-
fluka_material_str(fid: int, nuc: str, density: float) -> str -
fluka_compound_str(fid: int, compound_name: str, density: float, frac_type: str = 'mass', components: list[tuple[str, float]] | None = None) -> str
nucleide.vr
Backing crate: nucleide-vr-tools · source dir
-
magic(tally: MeshTally, per_group: bool = False, tolerance: float = 0.5) -> MagicOutput -
magic_with(tally: MeshTally, selection: str = 'total', tolerance: float = 0.5, null_value: float = 0.0) -> MagicOutput -
MagicOutput— MAGIC weight-window generation output.lower_bounds_ww: list[float](property)groups_per_ve: int(property)scale_factors: list[float](property)e_upper_bounds: list[float](property)ww_tag_name: str(property)
-
emit_openmc_weight_windows(tally: MeshTally, output: MagicOutput, mesh_id: int = 1, window_id: int = 1, upper_bound_ratio: float = 5.0, survival_ratio: float = 3.0, max_split: int = 10, weight_cutoff: float = 1e-38) -> dict[str, Any] -
emit_serpent_wwin(tally: MeshTally, output: MagicOutput, name: str = 'ww1', file: str = 'wwindows.wwd') -> dict[str, Any] -
AliasTable— Walker alias table for discrete sampling.__init__(pdf: list[float]) -> Nonesample(r1: float, r2: float) -> intpdf: list[float](property)__len__() -> int
-
MeshSourceSampler— Mesh source sampler over a meshtal tally (analog/uniform/user).__init__(tally: MeshTally, mode: str, user_pdf: list[float] | None = None) -> Nonesample(r1: float, r2: float) -> dict[str, float]mode() -> strnum_voxels() -> inttable_len() -> int
-
KdeSampler— Gaussian KDE sampler over caller particle vectors.__init__(samples: list[list[float]], bandwidth: str | list[float] = ...) -> Nonepdf(point: list[float]) -> floatdraw(u: float, normals: list[float]) -> list[float]bandwidths() -> list[float]n_samples() -> int
nucleide.enrichment
Backing crate: nucleide-enrichment · source dir
-
Cascade— Enrichment cascade with numeric multicomponent solving.-
default_uranium() -> Cascade -
__init__:__init__(alpha: float, Mstar: float, j: int, k: int, N: float, M: float, x_feed_j: float, x_prod_j: float, x_tail_j: float, mat_feed: dict[str, float]) -> None -
solve(tolerance: float | None = None, max_iterations: int | None = None) -> None -
solve_multicomponent(tolerance: float | None = None, max_iterations: int | None = None) -> None -
alpha: float(property) -
Mstar: float(property) -
N: float(property) -
M: float(property) -
x_feed_j: float(property) -
x_prod_j: float(property) -
x_tail_j: float(property) -
l_t_per_feed: float(property) -
swu_per_feed: float(property) -
swu_per_prod: float(property) -
mat_feed: dict[str, float](property) -
mat_prod: dict[str, float](property) -
mat_tail: dict[str, float](property) -
separative_work_per_product() -> float
-
-
swu_per_feed(x_feed: float, x_prod: float, x_tail: float) -> float -
swu_per_prod(x_feed: float, x_prod: float, x_tail: float) -> float -
swu_per_tail(x_feed: float, x_prod: float, x_tail: float) -> float -
prod_per_feed(x_feed: float, x_prod: float, x_tail: float) -> float -
tail_per_feed(x_feed: float, x_prod: float, x_tail: float) -> float -
tail_per_prod(x_feed: float, x_prod: float, x_tail: float) -> float -
feed_per_prod(x_feed: float, x_prod: float, x_tail: float) -> float -
feed_per_tail(x_feed: float, x_prod: float, x_tail: float) -> float -
prod_per_tail(x_feed: float, x_prod: float, x_tail: float) -> float -
alphastar_i(alpha: float, Mstar: float, M_i: float) -> float
nucleide.depletion
Backing crate: nucleide-depletion · source dir
-
Chain— Parsed depletion chain (XML format).nuclides: list[str](property)index_of(name: str) -> int | None
-
DepletionSystem— Pre-built depletion system for repeated CRAM/Bateman solves.solve(n0: dict[str, float], dt: float, order: int = 48, method: str = 'cram48') -> dict[str, float]solve_vec(n0: list[float], dt: float, order: int = 48, method: str = 'cram48') -> list[float]
-
Inventory— Unit-aware decay inventory over a depletion chain.-
__init__(chain: Chain, comp: dict[str, float], units: str = 'atoms') -> None -
numbers() -> dict[str, float] -
decay:decay(dt: float, time_unit: str = 's', rates: dict[str, float] | None = None, order: int = 48, method: str = 'cram48') -> Inventory -
activities(units: str) -> dict[str, float] -
masses(units: str) -> dict[str, float] -
moles(units: str) -> dict[str, float] -
activity_fractions() -> dict[str, float] -
mass_fractions() -> dict[str, float] -
mole_fractions() -> dict[str, float] -
half_lives_readable() -> dict[str, str] -
add(other: Inventory) -> Inventory -
sub(other: Inventory) -> Inventory -
mul(scalar: float) -> Inventory -
div(scalar: float) -> Inventory -
to_csv() -> str -
from_csv(chain: Chain, text: str) -> Inventory
-
-
build_depletion_system(chain: Chain, rates: dict[str, float]) -> DepletionSystem -
deplete(chain: Chain, n0: dict[str, float], dt: float, rates: dict[str, float] | None = None, order: int = 48, method: str = 'cram48') -> dict[str, float] -
deplete_series(chain: Chain, n0: dict[str, float], dts: list[float], rates: dict[str, float] | None = None, rates_list: list[dict[str, float] | None] | None = None, integrator: str = 'predictor', order: int = 48, method: str = 'cram48') -> dict[str, Any] -
cumulative_decays(chain: Chain, n0: dict[str, float], dt: float, rates: dict[str, float] | None = None) -> dict[str, float] -
progeny(chain: Chain, name: str) -> list[tuple[str, float, str]] -
branching_fraction(chain: Chain, parent: str, child: str) -> float | None -
decay_mode(chain: Chain, parent: str, child: str) -> str | None -
chain_edges(chain: Chain) -> list[tuple[str, str, float, str]]
nucleide.kinetics
Backing crate: nucleide-kinetics · source dir
-
solve(betas: list[float], lambdas: list[float], Lambda: float, rho: dict[str, Any], t: list[float], n0: float, C0: list[float] | None = None, method: str = 'trapezoidal', rtol: float = 1e-09, atol: float = 1e-12, dt_min: float = 1e-14, dt_max: float | None = None, max_steps: int = 1000000) -> dict[str, Any] -
equilibrium(betas: list[float], lambdas: list[float], Lambda: float, n0: float) -> list[float] -
initial_rate(betas: list[float], lambdas: list[float], Lambda: float, rho: dict[str, Any], n0: float, C0: list[float] | None = None) -> float -
inhour_rho(betas: list[float], lambdas: list[float], Lambda: float, omega: float) -> float -
stable_period(betas: list[float], lambdas: list[float], Lambda: float, rho: float) -> float -
prompt_jump(n_before: float, rho_before: float, rho_after: float, beta_total: float) -> float -
from_ifp(betas: list[float], lambda_gen: float, lambdas: list[float]) -> dict[str, Any]
nucleide.tritium
Backing crate: nucleide-tritium · source dir
-
steady(length: float, cells: int, D: float, left: dict[str, Any], right: dict[str, Any], traps: list[dict[str, Any]] | None = None, temperature: list[float] | None = None, source: list[float] | None = None, E_D: float = 0.0) -> dict[str, Any] -
transient(length: float, cells: int, D: float, left: dict[str, Any], right: dict[str, Any], t: list[float], traps: list[dict[str, Any]] | None = None, temperature: list[float] | None = None, source: list[float] | None = None, E_D: float = 0.0, mobile0: list[float] | None = None, trapped0: list[list[float]] | None = None, method: str = 'crank_nicolson', rtol: float = 1e-09, atol: float = 1e-12, dt_min: float = 1e-14, dt_max: float | None = None, max_steps: int = 1000000) -> dict[str, Any] -
steady_layers(layers: list[dict[str, Any]], left: dict[str, Any], right: dict[str, Any], interfaces: list[Any] | None = None) -> dict[str, Any] -
transient_layers(layers: list[dict[str, Any]], left: dict[str, Any], right: dict[str, Any], t: list[float], mobile0: list[float] | None = None, trapped0: list[list[float]] | None = None, method: str = 'crank_nicolson', rtol: float = 1e-09, atol: float = 1e-12, dt_min: float = 1e-14, dt_max: float | None = None, max_steps: int = 1000000, interfaces: list[Any] | None = None) -> dict[str, Any] -
breakthrough(D: float, length: float, times: list[float]) -> list[float] -
irreversible_fill(k: float, c: float, N: float, times: list[float]) -> list[float] -
recombination_rate(kr0: float, e_r: float, temp: float) -> float
nucleide.plasma_source
Backing crate: nucleide-plasma-source · source dir
-
particles(spec: dict[str, Any], n: int, seed: int) -> dict[str, Any] -
emit_source_cards(spec: dict[str, Any], bins: int = 21) -> dict[str, Any] -
spectrum_moments(reaction: str, ion_temperature_kev: float) -> dict[str, Any] -
reactivity(reaction: str, ion_temperature_kev: float) -> float -
ecrh_scalars(frequency_ghz: float, harmonic: int = 1, electron_temperature_kev: float | None = None, field_t: float | None = None) -> dict[str, Any] -
ecrh_accessibility(s_m: list[float], b_t: list[float], ne_m3: list[float], frequency_ghz: float, harmonic: int = 1, electron_temperature_kev: float | None = None) -> dict[str, Any]
nucleide.damage
Damage and gas-production metrics by spectral folding: NRT-dpa (Norgett–Robinson–Torrens
1975) and arc-dpa (Nordlund et al. 2018) displacement functions, He/H production in appm,
and He/dpa ratios — the folds take caller-supplied group fluxes and response cross
sections (piecewise-constant per group), and fold_uq propagates caller-block
uncertainties through the seeded MVN machinery. Coil fast-fluence and lifetime
bookkeeping (coil_fast_flux/coil_fast_fluence/coil_accumulate/coil_lifetime/
coil_remaining) accumulates caller spectra against caller-supplied limit tables.
Backing crate: nucleide-damage · source dir
-
nrt_dpa(flux: list[float], response: list[float], bounds: list[float], seconds: float) -> float -
arc_dpa(flux: list[float], response: list[float], bounds: list[float], seconds: float) -> float -
gas_appm(flux: list[float], response: list[float], bounds: list[float], seconds: float) -> float -
he_dpa_ratio(flux: list[float], he_response: list[float], damage_response: list[float], bounds: list[float], seconds: float) -> float -
lindhard_partition(t_ev: float, recoil: str | int, lattice: str | int) -> float -
damage_energy(t_ev: float, recoil: str | int, lattice: str | int) -> float -
nrt_displacements(t_ev: float, ed_ev: float, target: str | int) -> float -
arc_efficiency(t_dam_ev: float, ed_ev: float, b_arc: float, c_arc: float) -> float -
arc_displacements(t_ev: float, ed_ev: float, target: str | int, b_arc: float, c_arc: float) -> float -
fold_uq(metric: str, flux: list[float], response: list[float], bounds: list[float], seconds: float, mean: list[float], cov: list[list[float]], n: int, seed: int, k: float) -> dict[str, Any] -
he_dpa_ratio_uq(flux: list[float], he_response: list[float], damage_response: list[float], bounds: list[float], seconds: float, mean: list[float], cov: list[list[float]], n: int, seed: int, k: float) -> dict[str, Any] -
coil_fast_flux(flux: list[float], bounds: list[float], threshold_mev: float) -> float -
coil_accumulate(rates: list[float], durations: list[float]) -> float -
coil_lifetime(limits: list[float], rates: list[float]) -> dict[str, Any] -
coil_remaining(limits: list[float], accumulated: list[float], rates: list[float]) -> dict[str, Any]
nucleide.blanket
Backing crate: nucleide-blanket · source dir
tbr_from_tallies(tritons_bred: float, source_neutrons: float) -> floatapply_port_penalty(raw_tbr: float, port_fractions: list[float]) -> floatbreeding_margin(effective_tbr: float) -> floatmeets_requirement(effective_tbr: float, required_tbr: float) -> boolenergy_multiplication(blanket_power_mw: float, fusion_power_mw: float) -> floatblanket_power(fusion_power_mw: float, multiplication: float) -> floattritium_burn_g_per_day(fusion_power_mw: float) -> floatnet_surplus_g_per_day(effective_tbr: float, fusion_power_mw: float) -> float
nucleide.equilib
Backing crate: nucleide-equilib-io · source dir
-
jacobian(xm: list[float], xn: list[float], coeffs: list[float], theta: float, zeta: float) -> float -
jacobian_grid(xm: list[float], xn: list[float], coeffs: list[float], nfp: int, ntheta: int, nzeta: int) -> list[list[float]] -
wall_load(s_edges: list[float], ntheta: int, nzeta: int, nfp: int, birth: list[float], jacobian: list[float]) -> dict[str, Any] -
indata_series_1d(parsed: dict[str, Any], name: str) -> list[tuple[int, float]] -
indata_table_2d(parsed: dict[str, Any], name: str) -> list[tuple[tuple[int, int], float]]
nucleide.spectroscopy
Backing crate: nucleide-spectroscopy · source dir
-
calc_bg(counts: list[float], channels: list[float], c1: int, c2: int, m: int) -> float -
gross_count(counts: list[float], channels: list[float], c1: int, c2: int) -> float -
net_counts(counts: list[float], channels: list[float], c1: int, c2: int, m: int) -> float -
energy_bins(channels: list[float], calib_e_fit: list[float]) -> list[float] -
detector_efficiency(energy_mev: float, eff_coeff: list[float], eff_fit: int = 1) -> float -
fit_efficiency(energies: list[float], effs: list[float], weights: list[float], order: int, eff_fit: int = 1) -> list[float] -
xray_lines(atomic: dict[str, float], k_conv: float | None = None, l_conv: float | None = None) -> list[tuple[float, float]] -
sdef_decay_source(lines: list[tuple[float, float]], *, x: float = 0.0, y: float = 0.0, z: float = 0.0, u: float = 0.0, v: float = 0.0, w: float = 0.0, weight: float = 1.0, particle: str = 'Neutron', version: int = 5) -> tuple[list[tuple[float, float]], str]
nucleide.unfold
Backing crate: nucleide-unfold · source dir
-
sandii(response: list[list[float]], rates: list[float], guess: list[float], *, tolerance: float = 0.001, max_iterations: int = 200) -> dict[str, Any] -
staysl(response: list[list[float]], rates: list[float], sigmas: list[float], guess: list[float], *, tolerance: float = 0.001, max_iterations: int = 200, damping: float = 0.001) -> dict[str, Any] -
gravel(response: list[list[float]], rates: list[float], sigmas: list[float], guess: list[float], *, tolerance: float = 0.001, max_iterations: int = 200) -> dict[str, Any] -
maxed(response: list[list[float]], rates: list[float], sigmas: list[float], guess: list[float], *, target_chi2: float | None = None, tolerance: float = 0.001, max_iterations: int = 200) -> dict[str, Any] -
forward_fold(response: list[list[float]], spectrum: list[float]) -> list[float]
nucleide.alara
Backing crate: nucleide-alara-io · source dir
-
alara_parse_output(text: str, run_lbl: str) -> list[dict[str, Any]] -
alara_expand_schedule(deck_text: str, top: str | None = None) -> list[dict[str, Any]] -
alara_output_totals(text: str, run_lbl: str) -> list[dict[str, Any]] -
alara_output_total_activity(text: str, run_lbl: str) -> float -
alara_schedule_total_time(deck_text: str, top: str | None = None) -> float -
alara_clearance_es_table(landfill: Literal['inert', 'non_hazardous', 'hazardous'], material: Literal['rocks', 'ashes', 'sands', 'slags', 'oil_gas']) -> dict[str, float] -
alara_clearance_index(inventory: dict[str, float], limits: dict[str, float] | None = None) -> float -
alara_total_activity(entries: list[dict[str, Any]]) -> dict[str, float] -
alara_decay_heat(entries: list[dict[str, Any]]) -> dict[str, float] -
alara_ingestion_hazard(entries: list[dict[str, Any]]) -> dict[str, float] -
alara_inhalation_hazard(entries: list[dict[str, Any]]) -> dict[str, float] -
alara_transport_ratio(entries: list[dict[str, Any]]) -> dict[str, float] -
alara_iaea_clearance_index(total_mass_kg: float, entries: list[dict[str, Any]]) -> dict[str, Any] -
alara_dose_slab(activity_bq_per_kg: float, groups: list[dict[str, Any]]) -> dict[str, float] -
alara_dose_point(activity_bq_per_kg: float, source_mass_kg: float, distance_m: float, groups: list[dict[str, Any]]) -> dict[str, Any] -
alara_dose_mixture_mu(fractions: list[float], element_mus: list[list[float]]) -> list[float]
nucleide.cccc
Backing crate: nucleide-cccc-io · source dir
isotxs_parse(text: str) -> dict[str, Any]rtflux_parse(text: str, kind: str = 'rtflux') -> dict[str, Any]partisn_render(deck: dict[str, Any]) -> strpartisn_validate(deck: dict[str, Any], isotxs_text: str) -> Nonecccc_parse_isotxs(text: str) -> dict[str, Any](alias ofisotxs_parse)cccc_parse_rtflux(text: str, kind: str = 'rtflux') -> dict[str, Any](alias ofrtflux_parse)cccc_render_partisn(deck: dict[str, Any]) -> str(alias ofpartisn_render)cccc_validate_partisn(deck: dict[str, Any], isotxs_text: str) -> None(alias ofpartisn_validate)cccc_rtflux_npoints(text: str, kind: str = 'rtflux') -> intcccc_rtflux_point(text: str, kind: str = 'rtflux', index: int = 0) -> list[float] | Nonecccc_rtflux_total(text: str, kind: str = 'rtflux') -> floatcccc_isotxs_find(text: str, label: str) -> dict[str, Any] | Nonecccc_isotxs_len(text: str) -> int
nucleide.fispact
Backing crate: nucleide-fispact-io · source dir
fispact_parse_output(text: str, run_lbl: str) -> list[dict[str, Any]]parse_output(text: str, run_lbl: str) -> list[dict[str, Any]](alias offispact_parse_output)fispact_parse_clearance(text: str) -> list[dict[str, Any]]fispact_is_output(path: str) -> bool
nucleide.origen
Backing crate: nucleide-origen-io · source dir
origen_parse_tape5(text: str) -> dict[str, Any]origen_parse_tape6(text: str) -> dict[str, Any]origen_parse_tape9(text: str) -> list[dict[str, Any]]tape5_parse(text: str) -> dict[str, Any](alias oforigen_parse_tape5)tape6_parse(text: str) -> dict[str, Any](alias oforigen_parse_tape6)tape9_parse(text: str) -> list[dict[str, Any]](alias oforigen_parse_tape9)origen_tape6_find(text: str, nuclide: str) -> dict[str, Any] | Noneorigen_tape6_total_activity(text: str) -> floatorigen_tape9_find(text: str, nuclide: str) -> dict[str, Any] | None
nucleide.r2s
Backing crate: nucleide-r2s · source dir
-
r2s_from_snapshot(snapshot: dict[str, Any]) -> dict[str, Any] -
r2s_validate(workflow: dict[str, Any], deck_text: str) -> None -
r2s_expand(deck_text: str, top: str | None = None) -> list[dict[str, Any]] -
r2s_assemble(output_text: str, run_lbl: str, zone: str, groups: int) -> dict[str, Any] -
r2s_photon_group_sums(photon_text: str, nuclides: list[str], time_s: float) -> dict[str, Any] -
r2s_snapshot_inventory(snapshot: dict[str, Any]) -> dict[str, float] -
r2s_expand_sweep(axes: list[dict[str, Any]]) -> list[dict[str, str]] -
from_deck(deck_text: str) -> dict[str, Any](alias ofr2s_from_deck) -
from_snapshot(snapshot: dict[str, Any]) -> dict[str, Any](alias ofr2s_from_snapshot) -
validate(workflow: dict[str, Any], deck_text: str) -> None(alias ofr2s_validate) -
expand(deck_text: str, top: str | None = None) -> list[dict[str, Any]](alias ofr2s_expand) -
assemble(output_text: str, run_lbl: str, zone: str, groups: int) -> dict[str, Any](alias ofr2s_assemble) -
tag_zone_strength(totals: list[float], zone_of_voxel: list[int], split: bool = False) -> dict[str, Any](alias of
r2s_tag_zone_strength) -
photon_group_sums(photon_text: str, nuclides: list[str], time_s: float) -> dict[str, Any](alias of
r2s_photon_group_sums) -
snapshot_inventory(snapshot: dict[str, Any]) -> dict[str, float](alias ofr2s_snapshot_inventory) -
expand_sweep(axes: list[dict[str, Any]]) -> list[dict[str, str]](alias ofr2s_expand_sweep)
nucleide.emit
Backing crate: nucleide-emit · source dir
-
emit_armi_cards(comp: dict[str, float], name: str, density: float | None = None, mcnp_number: int = 1, xs_suffix: str = '80c', serpent_lib: str = '03c', fluka_fid: int = 1, partisn_zone: int = 1) -> dict[str, str] -
emit_armi_drift_table(comp: dict[str, float], name: str, density: float | None = None, mcnp_number: int = 1, xs_suffix: str = '80c', serpent_lib: str = '03c', fluka_fid: int = 1, partisn_zone: int = 1) -> list[dict[str, Any]] -
emit_cards(comp: dict[str, float], name: str, density: float | None = None, mcnp_number: int = 1, xs_suffix: str = '80c', serpent_lib: str = '03c', fluka_fid: int = 1, partisn_zone: int = 1) -> dict[str, str] -
emit_drift_table(comp: dict[str, float], name: str, density: float | None = None, mcnp_number: int = 1, xs_suffix: str = '80c', serpent_lib: str = '03c', fluka_fid: int = 1, partisn_zone: int = 1) -> list[dict[str, Any]]
nucleide.uq
Backing crate: nucleide-linalg · source dir
-
sample_mvn(mean: list[float], cov: list[list[float]], n: int, seed: int) -> dict[str, Any] -
sample_lhs(mean: list[float], cov: list[list[float]], n: int, seed: int) -> dict[str, Any] -
sample_lognormal(mean_log: list[float], cov: list[list[float]], n: int, seed: int) -> dict[str, Any] -
lognormal_mean(mean_log: list[float], cov: list[list[float]]) -> list[float] -
lognormal_cov(mean_log: list[float], cov: list[list[float]]) -> list[list[float]] -
check_convergence(mean: list[float], cov: list[list[float]], samples: list[list[float]], mean_tol: float, cov_tol: float) -> dict[str, Any] -
perturb_branches(base: list[float], rel: list[float]) -> list[float] -
perturb_energies(base: list[float], delta: list[float], convention: str = 'relative') -> list[float] -
perturb_fission_yields(base: list[float], rel: list[float]) -> list[float]
nucleide.data
Pure-Python helpers (no backing crate) for downloading repo data files that the wheel does not bundle, pinned to the installed release:
Backing crate: pure Python · source file
COMPENDIUM_PATH = 'fixtures/data/MaterialsCompendium.json'FGR15_SHA256 = '71314b3f1d73c197da8b589e74c450f61befce48c66ace6ac1f6e0597560bd91'FGR15_URL = 'https://www.epa.gov/system/files/other-files/2025-07/fgr15_data_2025_05_28.zip'IRDFF_MEMBER = 'IRDFF-II.g725'IRDFF_SHA256 = '6ec2b33c0f67bed46d46be062a24ccedaa5ffea9bbba919958da4b1349f48c85'IRDFF_URL = 'https://www-nds.iaea.org/IRDFF/IRDFF-II_g725.zip'default_ref() -> strfetch(path: str, *, ref: str | None = None, dest: str | Path = '.') -> strfetch_compendium(*, ref: str | None = None, dest: str | Path = '.') -> strfetch_fgr15(*, dest: str | Path | None = None, url: str | None = None) -> strfetch_irdff(*, dest: str | Path | None = None, url: str | None = None) -> str
nucleide.openmc
Pure-Python OpenMC statepoint tally bridge (no backing crate): caller-side OpenMC reads the statepoint, Nucleide takes plain arrays.
Backing crate: pure Python · source file
openmc_version() -> str | Nonetally_arrays(statepoint: Any, tally_id: int, score: str = 'flux') -> dict[str, Any]read_statepoint(path: str | Path, tally_id: int, score: str = 'flux') -> dict[str, Any]cell_flux(arrays: dict[str, Any]) -> list[float]voxel_flux(arrays: dict[str, Any], voxel: int) -> list[float]tally_to_csv(arrays: dict[str, Any], path: str | Path) -> Nonetally_from_csv(path: str | Path) -> dict[str, Any]
Version
version()→ workspace version stringnucleide.__version__— same value
The signatures above are generated from python/nucleide/_internal.pyi (the function source of truth)
and the python/nucleide/*.py facades; see those files for the authoritative definitions.