torchspin.lft.tanabe_sugano#
Tanabe-Sugano: cubic d^n levels and diagrams, differentiable (Telser’s DTANSUG via telser-tools).
Two independent routes to the levels of d^n (n = 1 … 9) in an octahedral (Oh) or tetrahedral (Td) field, both linear in (B, C, Dq) over fixed matrices:
Strong-field blocks (DTANSUG.F; McClure 1959, Griffith 1964 Table A.27): every (2S+1)Gamma block in the t2^a e^b basis, with DTANSUG’s hole-problem signs (SIGNXF, SIGNEL) and the DIAG offset of d6-d8. The NumPy tables (
torchspin.lft._engines.tanabe_sugano) are probed once at the unit vectors and checked for linearity, soH = B M_B + C M_C + Dq M_Dqwith constant matrices. The Racah A term is left out (add n(n-1)/2 A), and for d9 also the constant -56B + 28C, as in DTANSUG.Full determinant basis:
spectrum(), all C(10, n) states fromtorchspin.lft.ddn(Racah A, B, C plus the Ballhausen cubic field; Td reverses the field).
Dq > 0 is the physical sign for both geometries (Oh: e above t2; Td: e below t2). Blocks are
named by their (2S+1)Gamma label, e.g. '4T1'; blocks_for(n) lists them and
get_block(n, label) returns one (Block, from the NumPy tables).
Units#
B, C, Dq, A and every returned energy are in units (default 'MHz';
'cm^-1', 'GHz', 'K', 'eV'). The block matrices are homogeneous of degree one in
(B, C, Dq), so the strong-field route needs no conversion; units is still checked and
recorded. The diagram uses the conventional reduced axes, E/B (relative to the ground state)
against Dq/B at fixed C/B, which carry no unit; pass B to tanabe_sugano() (or use
TanabeSuganoDiagram.at()) for absolute energies and Dq in units.
Derivatives: energies through torchspin.lft._linalg.eigvalsh_gauge (a degenerate eigenvalue
gets its level’s mean derivative, exact for the symmetry-protected degeneracies of the full
determinant spectrum). weights (abs(c_ij)**2) depend on the basis inside a degenerate
level and are differentiable only where the state is non-degenerate within its block. The
order of all_levels() and the diagram’s ground curve are decided on detached values.
Not ported: the DTANSUG text report, the Fortran grid rules (fortran_grid: overshooting and
always-ascending ranges, telser-tools findings 4-5) and the Fortran B-loop sign bug (finding 1;
scan_b() uses the correct sign, as the telser-tools NumPy port does). Plots are in
torchspin.lft.plot.
Examples
Cr(III), d3, in cm^-1: the 4T2 block lies 10 Dq above 4A2 (the Racah A term and constants are left out of the blocks).
>>> from torchspin.lft import tanabe_sugano as ts
>>> kw = dict(B=766.0, C=2855.0, Dq=1200.0, units="cm^-1")
>>> d10 = ts.block_energies(3, "4T2", **kw) - ts.block_energies(3, "4A2", **kw)
>>> round(float(d10[0]), 6)
12000.0
>>> [round(e, 1) for e in ts.block_energies(3, "4T1", **kw).tolist()]
[-7402.5, 3112.5]
The d5 diagram at C/B = 4.5: high spin (6A1) changes to low spin (2T2) at Dq/B = 2.84.
>>> d = ts.tanabe_sugano(5, c_over_b=4.5) # E/B vs Dq/B
>>> d.e_over_b.shape, d.ground[0], d.ground[-1], [round(x, 2) for x in d.crossover()]
(torch.Size([43, 201]), '6A1', '2T2', [2.84])
>>> d.at(B=800.0, units="cm^-1").energy.shape # absolute, cm^-1
torch.Size([43, 201])
- class torchspin.lft.tanabe_sugano.Block(nh, first, label, terms, configs, fortran_line)[source]#
One (2S+1)Gamma block of the d^n (n <= 5 electrons or holes) problem.
- Variables:
nh (number of d electrons (n <= 5) or holes (10 - n) the block refers to.)
first (Fortran index (
NGRP) of the first strong-field configuration;) – the menu numberNFIGof DTANSUG.F selects the block containing it.label (e.g.
"3T1"(multiplicity, irrep).)terms (free-ion terms the block correlates with (DTANSUG.F
CONTITL).)configs (strong-field configurations with their B/C = 0.2 free-ion) – parentage (DTANSUG.F
CONFIG; obvious typos corrected, see docs/tanabe_sugano.md).fortran_line (line of the block's definition in DTANSUG.F.)
- class torchspin.lft.tanabe_sugano.BlockSolution(n, geometry, block, B, C, Dq, matrix, energies, zeroth_order, vectors, weights, units)[source]#
One block of d^n diagonalized at (B, C, Dq) (
solve_block()).- Variables:
n (int) – Number of d electrons.
geometry (str) –
'Oh'or'Td'.block (Block) – The block.
matrix (Tensor, shape (..., nb, nb)) – The block Hamiltonian.
energies (Tensor, shape (..., nb)) – Ascending eigenvalues.
zeroth_order (Tensor, shape (..., nb)) – Diagonal of
matrix(strong-field configuration energies).vectors (Tensor, shape (..., nb, nb)) – Eigenvectors as columns.
weights (Tensor, shape (..., nb, nb)) –
weights[..., i, j] = abs(<config j|state i>)**2.units (str) – Energy unit.
- class torchspin.lft.tanabe_sugano.CubicLevel(label, energy, degeneracy, root)[source]#
One level of d^n (
all_levels()).- Variables:
- class torchspin.lft.tanabe_sugano.Scan(n, geometry, block, variable, B, C, Dq, energies, zeroth_order, weights, units)[source]#
One block along a line of Dq (fixed B, C) or of B (fixed Dq, C/B) (
scan_dq(),scan_b()).- Variables:
variable ({'Dq', 'B'}) – The scanned parameter.
energies (Tensor, shape (npts, nb)) – Ascending block energies.
weights (zeroth_order,) – As
BlockSolution.units (n, geometry, block,) – As
BlockSolution.
- class torchspin.lft.tanabe_sugano.TanabeSuganoDiagram(n, geometry, c_over_b, dq_over_b, labels, degeneracies, e_over_b, ground, B=None, units='MHz')[source]#
Tanabe-Sugano diagram data of d^n at fixed C/B (
tanabe_sugano()).- Variables:
n (int) – Number of d electrons.
geometry (str) –
'Oh'or'Td'.c_over_b (Tensor) – C/B.
dq_over_b (Tensor, shape (npts,)) – The abscissa Dq/B.
labels (tuple of (str, int)) –
labels[i]= (block label, root) of curve i, e.g.('4T1', 1).degeneracies (tuple of int) – (2S+1) dim(Gamma) of each curve.
e_over_b (Tensor, shape (ncurves, npts)) – E/B relative to the ground state at each point.
B (Tensor or None) – Racah B in
units; turns on the absolute axesenergyanddq.units (str) – Unit of
B.
- property energy: Tensor | None[source]#
Energies above the ground state in
units(E/B times B), shape (ncurves, npts); None without B.
- at(B, units=None)[source]#
The same diagram with Racah
Bgiven inunits(default: the diagram’s units).
- torchspin.lft.tanabe_sugano.all_levels(n, B, C, Dq, geometry='Oh', units='MHz')[source]#
Every level of d^n (all blocks), ascending.
B,C,Dqare scalars inunits; the order is decided on detached energies. Returns a list ofCubicLevel(energies without the Racah A term).
- torchspin.lft.tanabe_sugano.block_energies(n, label, B, C, Dq, geometry='Oh', units='MHz')[source]#
Ascending eigenvalues of one strong-field block.
Arguments as
block_hamiltonian(). Returns a tensor of shape (…, nb) inunits(without the Racah A term).
- torchspin.lft.tanabe_sugano.block_hamiltonian(n, label, B, C, Dq, geometry='Oh', units='MHz')[source]#
Real symmetric strong-field block of d^n.
- Parameters:
n (int) – Number of d electrons, 1 … 9.
B (float or Tensor) – Racah parameters and cubic field in
units; broadcast against each other.C (float or Tensor) – Racah parameters and cubic field in
units; broadcast against each other.Dq (float or Tensor) – Racah parameters and cubic field in
units; broadcast against each other.geometry ({'Oh', 'Td'}, default 'Oh') – Coordination geometry.
units (str, default 'MHz') – Energy unit of the inputs and the result (checked; the blocks are homogeneous).
- Returns:
torch.Tensor, shape (…, nb, nb), float64 – In
units, without the Racah A term.- Return type:
- torchspin.lft.tanabe_sugano.block_operators(n, label, geometry='Oh', device='cpu')[source]#
Constant matrices of one strong-field block:
H = B M[0] + C M[1] + Dq M[2].- Parameters:
- Returns:
torch.Tensor, shape (3, nb, nb), float64 – Unit-free; configurations in
Block.configsorder.- Raises:
ValueError – If the block does not belong to d^n, or for an unknown geometry or label.
- Return type:
- torchspin.lft.tanabe_sugano.blocks_for(n)[source]#
All blocks of d^n, in DTANSUG.F menu order (equal for d^n and d^(10-n)).
- torchspin.lft.tanabe_sugano.get_block(n, label)[source]#
Block of d^n by its label, e.g.
get_block(3, "4T2").
- torchspin.lft.tanabe_sugano.scan_b(n, label, Dq, b_values, c_over_b, geometry='Oh', units='MHz')[source]#
One block of d^n over a range of Racah B with
C = (C/B) Bat fixed Dq.Dqandb_values(1-D) are inunits;c_over_bis dimensionless. The cubic-field sign is that of the Dq loop (DTANSUG.F’s B loop omits SIGNXF: telser-tools finding 1). Returns aScan.- Raises:
ValueError – If
c_over_b <= 0(DTANSUG.F silently substitutes 5).
- torchspin.lft.tanabe_sugano.scan_dq(n, label, B, C, dq_values, geometry='Oh', units='MHz')[source]#
One block of d^n over a range of Dq at fixed B and C.
B,Canddq_values(1-D) are inunitsand may carry gradients; other arguments asblock_hamiltonian(). Returns aScan.
- torchspin.lft.tanabe_sugano.solve_block(n, label, B, C, Dq, geometry='Oh', units='MHz')[source]#
Diagonalize one block of d^n.
Arguments as
block_hamiltonian()(batched over B, C, Dq, all inunits). Returns aBlockSolution.
- torchspin.lft.tanabe_sugano.spectrum(n, B, C, Dq, geometry='Oh', A=0.0, units='MHz')[source]#
All C(10, n) eigenvalues of d^n in a cubic field (determinant basis,
torchspin.lft.ddn).- Parameters:
n (int) – Number of d electrons, 1 … 9.
B (float or Tensor) – Racah parameters and cubic field in
units;Dq > 0is physical for both geometries.C (float or Tensor) – Racah parameters and cubic field in
units;Dq > 0is physical for both geometries.Dq (float or Tensor) – Racah parameters and cubic field in
units;Dq > 0is physical for both geometries.geometry ({'Oh', 'Td'}, default 'Oh') – Coordination geometry.
units (str, default 'MHz') – Energy unit of the inputs and the result.
- Returns:
torch.Tensor, shape (…, C(10, n)), float64 – Ascending, including
n(n-1)/2 Aand, unlike the blocks, the full repulsion energy for every n.- Return type:
- torchspin.lft.tanabe_sugano.tanabe_sugano(n, c_over_b=4.5, dq_over_b=None, geometry='Oh', *, B=None, units='MHz')[source]#
Tanabe-Sugano diagram: E/B relative to the ground state vs Dq/B at fixed C/B.
- Parameters:
n (int) – Number of d electrons, 2 … 8.
dq_over_b (array_like or Tensor, optional) – Abscissa Dq/B; default 0 … 4 in 201 points.
geometry ({'Oh', 'Td'}, default 'Oh') – Coordination geometry.
B (float or Tensor, optional) – Racah B in
units; adds the absolute axes.energyand.dq(differentiable in B).units (str, default 'MHz') – Unit of
B.
- Returns:
TanabeSuganoDiagram – E/B depends only on Dq/B and C/B (the blocks are linear in B, C, Dq), so B = 1 internally; the result is differentiable in
c_over_banddq_over_b. The ground curve at each point is chosen on detached values; E/B then follows that curve.- Raises:
ValueError – For n = 1 or 9 (no electron repulsion, so no diagram), an invalid n or geometry, or a non-positive or non-finite
c_over_b.- Return type: