/fusion:cgmffrom fusion
Drives the LANL CGMF fission-fragment de-excitation Monte Carlo code. Runs event-by-event simulations of prompt fission neutrons and gammas for spontaneous and neutron-induced fission, and analyses multiplicities, spectra, fragment yields, and n-gamma correlations.
Ships in fusion. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
CGMF simulates the de-excitation of fission fragments event by event. It samples the initial fragment distribution in mass, charge, kinetic energy, excitation energy and spin at scission, then follows each fragment down through a Monte Carlo Hauser-Feshbach cascade, emitting prompt neutrons and gammas. The output is a history file, one record per fission event, from which all fission observables are computed in post-processing.
Upstream: github.com/lanl/CGMF, BSD-3-Clause, C++ and CMake. It builds clean on
macOS and Linux with no patches, which is why it is the fission/statistical code
in FUSION and GEF (FreeBASIC, no Apple-Silicon toolchain) is not.
i is seeded
from i (plus the -s offset), so the same build and args give
bit-identical output. The repo ships byte-exact .reference history files,
and this skill's verify_cgmf.sh reproduces them exactly. That is a genuine
tier 1 benchmark, unusual for a Monte Carlo code.exit(-1), but it can also exit
0 having written a truncated or diverged history, so a clean exit alone
proves nothing. run_cgmf.sh requires all of: a zero exit, empty stderr, a
header matching the request, exactly 2*nevents fragment blocks, and a finite
positive <nu>_tot.-d, then $CGMFDATA, then two compiled-in paths. The
wrappers export CGMFDATA from the installer so a run works from any cwd.-i 92235, not 92236. For spontaneous fission the ZAID is the fissioning
nucleus and the incident energy is -e 0.0.tools/CGMFtk), not from cgmf.x, which prints only run averages to
stdout. See references/output-format.md.scripts/install_cgmf.sh clones CGMF, builds it with CMake, verifies the binary
runs a 2-event probe cleanly, and prints two lines:
CGMF=<path to cgmf.x>
CGMFDATA=<path to the data directory>
About 10 s from a cold cache. Requires git and cmake and a C++ compiler.
Disk is ~100 MB of data tables plus the build, far lighter than TALYS.
cgmf.x -i <ZAID> -e <Einc_MeV> -n <nevents> [-s <start>] [-f <base>] [-t <window>] [-d <datadir>]
-i ZAID = 1000*Z+A of the target (or fissioning nucleus for SF). Required.-e incident neutron energy in MeV; 0.0 = spontaneous fission. Required.-n number of events; negative n switches to initial-yields mode
(writes yields.cgmf instead of histories).-s starting-event offset (seed skip-ahead), default 1.-f output base name; the MPI rank is always appended, so -f h writes
h.0.-t isomer time-coincidence window in seconds (default 1e-8); -1 means
an infinite window and adds a gamma emission-age column, other negatives are
rejected.-d data directory, overriding $CGMFDATA.There is no -h: an unknown flag makes getopt print illegal option to stderr
and the run then continues, so with valid -i -e -n it still completes, but
cgmf.x -h alone (no required args) segfaults. There is no seed flag;
reproducibility is structural (rule 1).
Full field-level reference: references/input-format.md and
references/output-format.md, both derived from the source and the shipped
manual, not from memory.
bash scripts/install_cgmf.sh # prints CGMF= and CGMFDATA=
bash scripts/run_cgmf.sh 98252 0.0 1000 h # 252Cf(sf), 1000 events -> h.0
bash scripts/verify_cgmf.sh # the benchmark
bash scripts/selftest_cgmf.sh # test the harness guards
To compute observables from a history file, use CGMFtk:
from CGMFtk import histories as fh
h = fh.Histories('h.0')
h.nubartot() # average neutrons per fission event (incl. pre-fission)
h.nubarg() # average gammas per fragment
h.nubarA() # nu-bar as a function of fragment mass
252Cf spontaneous fission and thermal n+235U, against the reference history
files shipped in utils/cgmf/tests/:
| check | result |
|---|---|
| L1a 252Cf(sf), 40-event history | bit-exact vs the shipped reference |
| L1b n(thermal)+235U, 40-event history | bit-exact vs the shipped reference |
| L2 nu-bar_tot(252Cf sf), n=500 | 3.78, within MC error of the manual's 3.82 |
L1 is tier 1: the distribution ships reference output and this build reproduces
it byte for byte, on macOS/ARM, because the code is integer-deterministic. The
match is stable across Release and Debug builds here; the reference's origin
platform is not documented, so this is a reproduction of the LANL-shipped file,
not a proven cross-platform result. The manual quotes nu-bar_tot = 3.82 for 252Cf(sf) at 1e6
events; a fixed-seed run converges to that (see references/verification.md),
while low event counts scatter around it (3.80 at 40, 3.78 at 500, 3.72 at 3000)
as Monte Carlo noise.
See references/failure-modes.md. The ones that bite: the data path is not the
cwd (rule 3); the output filename gains a .0 rank suffix; the ZAID is the
target not the compound; and a run with an unsupported ZAID or energy fails
through stderr, so the exit status alone will mislead you.
AGENTS.md (opens in a new tab)references/failure-modes.md (opens in a new tab)references/input-format.md (opens in a new tab)references/output-format.md (opens in a new tab)references/verification.md (opens in a new tab)scripts/install_cgmf.sh (opens in a new tab)scripts/run_cgmf.sh (opens in a new tab)scripts/selftest_cgmf.sh (opens in a new tab)scripts/verify_cgmf.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
fission, monte-carlo, nuclear-physics, cgmf, hauser-feshbach
npx claudepluginhub jinleiphys/fusion --plugin fusion29 skills in this plugin
/azure2Drive AZURE2, the Notre Dame multichannel R-matrix code of Azuma et al. (Phys. Rev. C 81, 045805 (2010); GPL-3.0). Write, run and verify .azr configuration files for low-energy charged-particle reactions in nuclear astrophysics: radiative capture, elastic scattering, resonance and subthreshold contributions, external (direct) capture normalised by ANCs, S-factor extrapolation to stellar energies, and reaction rates. Use for 跑AZURE2, AZURE2 input, .azr, R-matrix, R矩阵, 天体物理S因子, astrophysical S factor, direct capture, external capture, ANC, 渐近归一化系数, subthreshold state, CNO cycle capture, resonance analysis./bandBayesian uncertainty quantification for nuclear physics with the BAND framework (Bayesian Analysis of Nuclear Dynamics, bandframework v1.0.0): calibrate a model's parameters against data with surmise, build a fast reduced-basis emulator of nucleon-nucleus elastic scattering with rose, and combine several models' predictions with Bayesian model mixing in Taweret; also routes to the other BAND tools (jitr, Bfrescox, OpenBT, parMOO, PUQ, pybmc, LCGP, mooGP, Smooth Emulator). Use for Bayesian calibration, 贝叶斯校准, 参数后验, posterior, MCMC, emulator, 仿真器, surrogate model, Gaussian process emulator, reduced basis, reduced-order model, ROSE, optical potential calibration, 光学势不确定度, uncertainty quantification, UQ, 不确定度量化, model mixing, 模型混合, Bayesian model averaging, BMM, Taweret, surmise, BAND framework, experimental design. For running FRESCO itself use the `fresco` skill; for fitting a FRESCO deck by chi-squared use `sfresco`./ccfullDrive CCFULL, the all-order coupled-channels code for near-barrier heavy-ion fusion (K. Hagino, N. Rowley, A.T. Kruppa, CPC 123 (1999) 143). Write, run, and verify CCFULL input for fusion excitation functions, barrier distributions, and mean angular momenta with vibrational or rotational couplings and pair transfer. Use for 跑ccfull, CCFULL input, heavy-ion fusion, near-barrier fusion, coupled-channels fusion, fusion excitation function, barrier distribution, 熔合截面./cnokDrive CNOK, the C++ Glauber-model single-nucleon knockout code of Y.Z. Sun and S.T. Wang (Comput. Phys. Commun. 288, 108726 (2023); GPL-3.0, gitee.com/asiarabbit/cnok). Compute single-particle removal cross sections (stripping + diffractive dissociation) and parallel (longitudinal) momentum distributions of the heavy residue (core) in one-nucleon knockout from intermediate-energy (30 MeV/u to 2 GeV/u) stable and radioactive beams on a light composite target, via the eikonal/sudden Glauber model with a t-rho-rho optical potential; supports batch mode over valence configurations (C2S-weighted inclusive cross sections and momentum distributions, spectroscopic-factor / quenching studies). Use for 跑CNOK, CNOK input, Glauber, 敲出, knockout, single-nucleon removal, stripping, diffractive dissociation, 动量分布, momentum distribution, sigma_sp, single-particle cross section, spectroscopic factor, 谱因子, C2S, quenching, eikonal, sudden approximation, t-rho-rho, 16C knockout, exotic nuclei knockout, MOMDIS./colossDrive COLOSS, the complex-scaled optical and Coulomb scattering solver (Liu Junzhe, Lei, Ren; CPC 311, 109568, 2025). Write, run, and verify COLOSS input for two-body elastic scattering with local or Perey-Buck nonlocal optical potentials, computing S-matrices and cross sections by complex scaling. Use for 跑coloss, COLOSS input, complex scaling scattering, 复标度散射, bound-state technique scattering, S-matrix from Lagrange-Laguerre basis./exfor-dataRetrieve real measured nuclear reaction data (cross sections, angular distributions, spectra, resonance data) from the IAEA EXFOR database and parse it into clean columns for comparison with a calculation. Use whenever experiment enters the picture: 实验数据, 有没有实验数据, 找实验点, EXFOR, 对比实验, compare with experiment, measured cross section, angular distribution data, add the data to this plot, is there data at this energy. Also use before claiming that a measurement does or does not exist.Other plugins' skills for the same job