/fusion:azure2from fusion
Writes, runs, and verifies .azr configuration files for AZURE2, a multichannel R-matrix code for low-energy nuclear astrophysics reactions. Handles radiative capture, elastic scattering, resonance analysis, ANC-normalized direct capture, S-factor extrapolation, and reaction rates.
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.
AZURE2 solves the multichannel, multilevel R-matrix equations for low-energy reactions. It handles resonant capture, external (direct) capture normalised by an asymptotic normalisation coefficient, subthreshold states, and the interference between them, and it extrapolates to the sub-keV energies where the cross section cannot be measured. That extrapolation is the point of the code.
Upstream: github.com/rdeboer1/AZURE2, GPL-3.0, anonymously clonable. The
project's other channel, azure.nd.edu, is registration-gated and this skill
never touches it.
examples/16O_pg_17F/verification.md states exactly what
is and is not established.scripts/run_azure2.sh, or pipe the answers yourself.param.par silently overrides your deck. If the file exists in
the output directory, AZURE2 reads the parameters back from it and ignores
the widths in the .azr. The deck you are reading is then not the
calculation you are getting. run_azure2.sh clears it unless
AZURE2_KEEP_PARAMS is set.nan and exits 0.--no-transform destroys the ANC normalisation. Do not reach for it to
enter reduced-width amplitudes directly. It agrees with transform mode at one
channel radius and diverges by a factor of 4 across a 2 fm range, because it
bypasses the ANC-to-amplitude conversion. Details below..azr. A # line inside <levels> is parsed
as a level line and fails. Section markers must match byte-exactly, with no
leading or trailing whitespace and Unix line endings.scripts/install_azure2.sh clones AZURE2, builds the standalone Minuit2 it
needs, builds AZURE2 headless, and prints AZURE2=<path>. About 19 s from a
cold cache. Requires git, cmake, gsl, and a GNU g++ (AZURE2 requires
OpenMP and this build mangles Apple clang's shim).
It encodes seven fixes, five of which report symptoms pointing away from
their cause; they are documented inline at the top of the script and in
references/failure-modes.md. The one most likely to bite again: Homebrew GCC
bakes in an SDK path that goes stale after an Xcode upgrade, and the resulting
error names a missing _bounds.h rather than a sysroot.
bash scripts/install_azure2.sh # prints AZURE2=<path>
bash scripts/run_azure2.sh mycase.azr 3 # 3 = calculate, no data
bash scripts/verify_azure2.sh # run the benchmark
bash scripts/selftest_azure2.sh # test the harness itself
selftest_azure2.sh feeds the wrapper deliberately broken inputs and asserts it
refuses each one: a malformed marker, a missing data file, a locked output
directory, six shapes of exit-0-with-bad-output, and an unsupported menu choice,
plus two cases it must NOT refuse (a stale file from an earlier run, an output
path containing a space). Run it after touching either script. Every case in it
was added after an adversarial pass found the harness accepting that failure, so
a guard that quietly stops firing is caught rather than assumed. It is verified
to be capable of failing: disabling any single guard flips exactly one case.
Menu choices: 1 calculate using data, 2 fit, 3 calculate without data
(uses <segmentsTest>). run_azure2.sh refuses 4 and 5, which ask further
questions it does not answer.
.azrThe format is undocumented in the repo. references/azr-format.md is the
authority here and was derived from the parser source, not from a manual or
from memory. Read it before editing a deck. The essentials:
<config>, <levels>, <segmentsData>, <segmentsTest>,
<targetInt>. An empty <targetInt></targetInt> is required, not optional.s and l are stored as twice their physical value. For a gamma channel
l is twice the multipolarity, so E1 is written 2.Entrance partial waves exist only if a level carries them. AZURE2 enumerates
external-capture pathways over the Jπ groups present among the supplied levels
(src/CNuc.cpp:740-800). A partial wave your paper says contributes is silently
absent unless some level has that Jπ. deBoer's FRIB/TALENT lecture states the
workaround outright: "AZURE2 eccentricity, need to add 'dummy' levels to tell
code which angular momenta to include in hard sphere phase shift
calculations." Such levels carry no fitted physics, which is exactly why
published parameter tables omit them. Verify any dummy is inert by moving it in
energy and confirming the result does not change.
Use transform mode, not --no-transform. Measured on the benchmark case:
ac | transform (ANC live) | --no-transform |
|---|---|---|
| 4.5 fm | 7.6328 keV b | 5.28 keV b |
| 5.0 fm | 7.6080 keV b | 7.60 keV b |
| 5.5 fm | 7.6173 keV b | 10.72 keV b |
ANC-normalised external capture must be nearly independent of the channel radius, because the ANC fixes the asymptotic tail. Transform mode is flat to 0.4%. The two modes agree at 5.0 fm, so a check at a single radius cannot tell them apart; vary the radius.
The --no-transform column is measured with the bound-state entries replaced by
the formal amplitudes AZURE2 itself reports (0.805998 and 1.174864
MeV^(1/2)), not with Table V's ANCs typed in literally. That distinction is
worth stating because the literal-ANC version is worse, not merely different:
it gives S(90 keV) = 19.66 keV b at ac = 5.0 fm, since fm^(-1/2) values are then
read as MeV^(1/2) amplitudes. So the honest summary is that --no-transform
fails in two separate ways, and the radius sweep above isolates the subtler one.
Papers quote reduced-width amplitudes (MeV^(1/2)); AZURE2 wants partial widths
in eV. Do not convert by hand: your own penetrability calculation between the
paper and the benchmark can hide a format error behind a compensating arithmetic
error. Invert AZURE2's own transform instead, as
examples/16O_pg_17F/calibrate_widths.py does: run, read g_int back from
parameters.out, drive each width to its published value by secant iteration.
Two things that script learned the hard way, both worth reusing:
g_int in parameters.out, not the formal amplitude in
param.par. For a capture channel with external capture on, the two differ.g_int carries a large negative offset set by the
resonant external-capture term, so a negative published amplitude can require
a positive input width. Search the width signed, over the whole real line.¹⁶O(p,γ)¹⁷F, constructed from Azuma et al., PRC 81, 045805 (2010), Sec. IV C
and Table V. scripts/verify_azure2.sh checks three levels:
| level | what is checked | result |
|---|---|---|
| L1 | all 9 published parameters of Table V | exact |
| L2a | this deck's own pinned S(90 keV) | 7.6080 keV b, 0.2% |
| L2b | the paper's published S(90 keV) = 8.07 | within 8%, actual −5.7% |
| L2c | measured Rolfs (1973) data, nothing fitted | χ²/N = 1.53 |
L2c is the only check independent of the paper's own number, and it is the strongest evidence the external-capture machinery is wired correctly.
14N(p,gamma)15O, the 6.79 MeV transition, from Tables II and III of the same paper: S_6.79(0) = 1.257 keV b against the published 1.30, i.e. -3.2%. That is inside the 0.1 keV b data-selection sensitivity the paper's own Table IV caption puts on this number. Deliberately partial: it is one transition of seven, because the rest are not reconstructable (below). It is the largest one, 72% of the total, and is tractable precisely because the paper says its resonance term is "added incoherently", so no relative sign is needed. Checks: dummy levels inert across 15/20/30 MeV, channel radius flat to 1.6% over 5.0-6.0 fm, ANC scaling within 2% of exact C^2, and the resonance worth 0.6% at E -> 0, which bounds the paper's unstated M1-vs-E2 multipolarity to an immaterial effect. Note ac = 5.5 fm here, not the 5.0 fm of the 16O case.
The −5.7% is real and its causes were bounded, not waved away: the channel
radius (0.4%), the resonance parameters (0.02 keV b), the li = 3 pathway
(0.07%), nuclear masses, lab-vs-CM energy, GSL Coulomb functions and the
evaluated excitation energy were each tested and none closes it. The dominant
sensitivity is the proton separation energy, which the paper never states and
which moves S by 13% per 3 keV. See examples/16O_pg_17F/verification.md.
¹⁴N(p,γ)¹⁵O from the same paper is NOT reconstructable, and the reason generalises. Table IV publishes S(0) per transition, which looks like an ideal numeric anchor, but the input side is incomplete: Table II covers γ widths for "the three strongest transitions" only, the 5.18 MeV final state has neither an ANC nor a γ width anywhere, and, decisively, the signs of the reduced-width amplitudes are not published while the ground-state S(0) is set by destructive interference among four 3/2+ components. Choosing those signs would be inventing the answer.
The lesson to carry: a table of results is only an anchor if the table of
inputs is complete, including signs and phases. Check the input side before
promising a benchmark. The tractable subset, the 6.79 MeV transition (72% of the total, dominated by
external capture, explicitly "added incoherently" so no sign ambiguity), is
built: see examples/14N_pg_15O_679/.
references/azr-format.md: the file format, field by field, with source
citations. Written from include/NucLine.h, src/Config.cpp, src/EData.cpp
and the GUI writer, never from memory.references/failure-modes.md: build failures, silent-wrong-answer modes, and
what each misleading error message actually means.examples/16O_pg_17F/: the benchmark deck, its data variant, the calibration
script, and verification.md.examples/talent/: measured data from FRIB/TALENT Course 6, with sources.AGENTS.md (opens in a new tab)examples/14N_pg_15O_679/14N_pg_15O_679.azr (opens in a new tab)examples/14N_pg_15O_679/verification.md (opens in a new tab)examples/16O_pg_17F/16O_pg_17F.azr (opens in a new tab)examples/16O_pg_17F/16O_pg_17F_data.azr (opens in a new tab)examples/16O_pg_17F/calibrate_widths.py (opens in a new tab)examples/16O_pg_17F/verification.md (opens in a new tab)examples/talent/Auchampaugh_12C_ntotal.dat (opens in a new tab)examples/talent/Chow_pp.dat (opens in a new tab)examples/talent/README.md (opens in a new tab)examples/talent/Rolfs_FES.dat (opens in a new tab)examples/talent/Rolfs_GS.dat (opens in a new tab)examples/talent/vogl.dat (opens in a new tab)references/azr-format.md (opens in a new tab)references/failure-modes.md (opens in a new tab)scripts/check_14N_inputs.py (opens in a new tab)scripts/check_output.py (opens in a new tab)scripts/install_azure2.sh (opens in a new tab)scripts/run_azure2.sh (opens in a new tab)scripts/selftest_azure2.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
nuclear-astrophysics, r-matrix, azure2, s-factor, direct-capture
npx claudepluginhub jinleiphys/fusion --plugin fusion29 skills in this plugin
/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, 熔合截面./cgmfDrive CGMF, the LANL fission-fragment de-excitation Monte Carlo code of Talou, Stetcu, Jaffke, Rising, Lovell and Kawano (Comput. Phys. Commun. 269, 108087 (2021); BSD-3-Clause). Run and analyse event-by-event simulations of prompt fission neutrons and gammas emitted by excited fission fragments, for spontaneous fission (Cf-252/254, Pu-238/240/242/244) and neutron-induced fission (U-233/234/235/238, Np-237, Pu-239/241) from thermal to 20 MeV: average and distributional neutron and gamma multiplicities, spectra, fragment mass/charge/TKE yields, and n-gamma correlations. Use for 跑CGMF, CGMF input, 裂变, fission, prompt fission neutrons, PFNS, prompt fission gammas, nu-bar, 中子多重性, neutron multiplicity, fission fragment yields, Hauser-Feshbach fission, 252Cf spontaneous fission, event-by-event fission./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