This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

vp.nuclear.shell_model

The lowest states of a nucleus in the nuclear shell model: Z valence protons and N valence neutrons outside a closed core, in one of the shipped spaces (the sd shell with USDB, the p shell with Cohen-Kurath), or in a .sps and .int pair read from disk. lib/nuclear/shell/shell.viv builds the M-scheme basis and applies H; lib/eigen/lowest finds the states with Lanczos (or, by eigensolver, from H as a matrix); this program sets the parameters and collects what each state is. BIGSTICK (github.com/cwjsdsu/BigstickPublick) gives the same energies, spins and basis dimensions: lib/nuclear/shell/bigstick_compare.py runs both.

Part of the distribution vipyr-nuclear; it runs from a checkout of the repository. Planned on PyPI as pip install "vipyr[nuclear]".

Signature

vp.nuclear.shell_model(*, interaction="usdb", sps_file="", int_file="", z=2, n=2, twice_m=-1, nstates=10, tol=1.0e-8, max_iter=2000, krylov=100, eigensolver="lanczos")

Parameters

interaction : str, default "usdb"
Which shipped space and interaction to use: USDB in the sd shell, or Cohen-Kurath in the p shell. Range: one of usdb, ckpot. Case does not matter.
sps_file : str, default ""
A .sps file to read instead of the shipped space ("" for none); it needs int_file too.
int_file : str, default ""
An isospin .int file to read with sps_file ("" for none).
z : int, default 2
Valence protons. Range: >= 0, <= 20.
n : int, default 2
Valence neutrons. Range: >= 0, <= 20.
twice_m : int, default -1
2 M, twice the angular-momentum projection of the basis; a negative value takes the lowest, 0 or 1. Range: >= -1, <= 200.
nstates : int, default 10
How many of the lowest states to find. Range: >= 1, <= 200.
tol : float, default 1.0e-8
The largest residual norm |H v - E v| a converged state may have; Lanczos only, ignored with the other methods. Range: > 0.
max_iter : int, default 2000
The most products H v Lanczos may take; Lanczos only, ignored with the other methods. Range: >= 1, <= 100000.
krylov : int, default 100
The most Lanczos vectors kept at once; the basis restarts from the lowest Ritz vectors when it is full. Lanczos only, ignored with the other methods. Range: >= 3, <= 2000.
eigensolver : str, default "lanczos"
How the lowest states are found: lanczos (the default); householder_ql or jacobi, from H formed as a matrix (up to LOWEST_DENSE_MAX basis states); "every dense" (both of those, checked against each other); or every (all three). Range: one of lanczos, householder_ql, jacobi, every, every iterative, every dense. Case does not matter.

Returns

A frozen ShellModelResult. Iterating it gives the fields below in order; it also has params, tests, log and check().

energies : ndarray[float64], MeV
The lowest energies, MeV, relative to the core.
j : ndarray[float64]
The angular momentum of each state, from <J^2> = J (J + 1).
excitation : ndarray[float64], MeV
Each energy above the lowest, MeV.
occ_p : ndarray[float64]
[state, orbit] proton occupation of each orbit, in the .sps order (rank 2).
occ_n : ndarray[float64]
[state, orbit] neutron occupation of each orbit (rank 2).
dim : int
The dimension of the M-scheme basis.
iterations : int
The products H v the eigensolver took.
converged : bool
Every state's residual norm is under tol.
program_run_id : str
The run's settings in one string: interaction, z, n, 2M, nstates,.

Raises

vipyr.ParameterError
A ValueError: an argument outside its range, choices, rank or shape, or one of a group given without the rest; its .param names the argument.
TypeError
An argument of the wrong type, or an unknown keyword.
vipyr.VivBuildError
An ImportError: no C compiler, or the program's C does not build.
RuntimeError
The program stops with its own message (a combination it rejects, or no convergence where the program treats that as an error).

Examples

import vipyr as vp
# neon-20: two protons and two neutrons above oxygen-16, USDB
r = vp.nuclear.shell_model(interaction="usdb", z=2, n=2, nstates=5)
print(r.energies, r.j, r.dim)
assert r.check()
[-40.4723308  -38.72564054 -36.29705906 -33.77415266 -32.92937155] [0. 2. 4. 0. 2.] 640

Each example ran as written when these pages were generated, and the output shown is what it printed.

Checked against

Ckpot
S. Cohen and D. Kurath, Nucl. Phys. 73, 1 (1965)
Oracle
BIGSTICK 8.0.0 (github.com/cwjsdsu/BigstickPublick @ 63e16b5), run by lib/nuclear/shell/bigstick_compare.py
Usdb
B. A. Brown and W. A. Richter, Phys. Rev. C 74, 034315 (2006)

Credits

  • The shell model follows BIGSTICK 8.0.0 (MIT), whose notice heads lib/nuclear/shell/shell.viv. The USDB interaction is from Brown and Richter, Physical Review C 74, 034315 (2006).

Source