/fusion:swanlopfrom fusion
Drives SWANLOP, a Fortran code for computing nucleon elastic scattering off spin-zero nuclei using local or nonlocal optical potentials. Calculates differential cross section, analyzing power, spin rotation, and reaction cross section with built-in Perey-Buck or Tian-Pang-Ma potentials.
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.
SWANLOP computes the scattering wave functions and elastic observables for a nucleon off a spin-zero target with a nonlocal optical potential and Coulomb. It builds or reads the potential (Perey-Buck or Tian-Pang-Ma built-in, a local model, or an external coordinate-space VRR / momentum-space VKK table), solves the scattering problem, and outputs the differential cross section, analyzing power, spin rotation, ratio to Rutherford, and the integrated reaction cross section, with an optional chi-square against experimental data.
Upstream: Mendeley Data DOI 10.17632/89gw9jdfv4.1 (CPC Program Library), Fortran + gfortran, no external libraries. It is the sibling of SIDES from the same group (both are FUSION skills): SWANLOP works from the scattering-wave side, SIDES from the integro-differential Schrodinger side.
swanlop.x prints
STOP SWANLOP [OK] and writes zz.main, zz.xaq (angular observables +
reaction cross section) and zz.dsdt (dsigma/dt). Success means: a zero exit
and a zz.xaq with a finite positive reaction cross section and angular rows.
run_swanlop.sh asserts these from the file, not from the OK string.zz.{main,xaq,dsdt}.REF
for the quick-start, and this build reproduces zz.xaq and zz.dsdt
line-for-line (zz.main too, bar the timestamp). verify_swanlop.sh matches
against those references after stripping the per-run Date:/Time:/UTC
lines. The reaction cross section is 1.66084 b. See
references/verification.md.swanlop.x reads and writes the current directory. It needs fort.1,
NucChart and any data file in the cwd. The wrappers run it in a scratch copy
of runs/ so the shipped tree and its .REF files are never overwritten.fort.1 is positional. One labeled value per line in a
fixed order; a shifted line silently changes the run. Start from the shipped
fort.quick-start (or a temp0N template) and change one field at a time.
Field-by-field reference: references/input-format.md.fort.2 (3 = r-space VRR, 4 = q-space VKK); KPOT=0 needs a local potential in fort.22. The
quick-start is KPOT=2 and needs no potential file.scripts/install_swanlop.sh downloads the 8 MB swanlop.tar.gz from Mendeley
Data (NOT the 530 MB potential-table supplement, which the benchmark does not
need), builds it with gfortran, runs the quick-start as a probe, and prints two
lines:
SWANLOP=<path to swanlop.x>
SWANLOP_RUNS=<the runs/ directory>
About 8 s. Requires gfortran, curl, tar.
swanlop.x takes no arguments; it reads fort.1 (and fort.2/fort.22/
NucChart/data files) from the current directory:
cp fort.quick-start fort.1
../sources/swanlop.x
bash scripts/install_swanlop.sh # prints SWANLOP= and SWANLOP_RUNS=
bash scripts/run_swanlop.sh # the shipped quick-start (p+208Pb 30.3 MeV TPM)
bash scripts/run_swanlop.sh /path/to/my_fort.1 # a custom fort.1 deck
bash scripts/verify_swanlop.sh # tier-1 benchmark (reproduces zz.*.REF)
bash scripts/selftest_swanlop.sh # test the harness guards (10 cases)
p + 208Pb elastic at 30.3 MeV, Tian-Pang-Ma nonlocal potential (quick-start):
| check | result |
|---|---|
| L1 zz.xaq (dsigma/dOmega, Ay, Q) | IDENTICAL to shipped zz.xaq.REF (193 lines, modulo timestamp) |
| L1 zz.dsdt (dsigma/dt) | IDENTICAL to shipped zz.dsdt.REF (192 lines) |
| L1 zz.main (run summary) | IDENTICAL to shipped zz.main.REF (369 lines, modulo timestamp) |
| L2 reaction cross section | 1.66084 b, matches the shipped reference |
Tier 1: the distribution ships the reference output and this build reproduces it,
on macOS/ARM gfortran 15.2. The .REF carry no toolchain metadata, so this is a
reproduction of the shipped reference on this build, not a proven cross-compiler
result; if a future build stops matching, suspect the toolchain and fall back to
the reaction cross section as the physics anchor. Full account:
references/verification.md.
See references/failure-modes.md. The ones that bite: the Mendeley dataset has a
530 MB supplement that is NOT the code; swanlop.x overwrites the shipped runs/
outputs if run there (use a scratch copy); the fort.1 deck is positional; and a
raw diff against the .REF always shows the timestamp line, so strip it before
comparing.
AGENTS.md (opens in a new tab)examples/README.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_swanlop.sh (opens in a new tab)scripts/run_swanlop.sh (opens in a new tab)scripts/selftest_swanlop.sh (opens in a new tab)scripts/verify_swanlop.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
nuclear-physics, optical-potential, elastic-scattering, fortran, swanlop
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, 熔合截面./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.Other plugins' skills for the same job