mag4.cli.magnon

CLI: multi-sublattice LSWT magnon dispersion + Tyablikov RPA T_c.

Functions

apply_ring_renormalisation(j_values, shells, ...)

Fold a four-spin ring coupling into effective bilinear JS² (LSWT).

build_parser()

main([argv])

parse_j_values(s)

Parse "J1:0.26,J2:0.26"{"J1": 0.26, "J2": 0.26}.

parse_j_values_file(path)

Read a j_values.dat written by mag4-extract.

Classes

ExtractedJs(j_values, spin, dists, skipped, ...)

Contents of a j_values.dat file, parsed for mag4-magnon.

mag4.cli.magnon.parse_j_values(s)[source]

Parse "J1:0.26,J2:0.26"{"J1": 0.26, "J2": 0.26}.

Return type:

Dict[str, float]

Parameters:

s (str)

class mag4.cli.magnon.ExtractedJs(j_values, spin, dists, skipped, ring, sigmas, rms_meV)[source]

Bases: NamedTuple

Contents of a j_values.dat file, parsed for mag4-magnon.

Parameters:
j_values: Dict[str, float]

Alias for field number 0

spin: float | None

Alias for field number 1

dists: Dict[str, float]

Alias for field number 2

skipped: list

Alias for field number 3

ring: dict | None

Alias for field number 4

sigmas: Dict[str, float]

Alias for field number 5

rms_meV: float | None

Alias for field number 6

mag4.cli.magnon.parse_j_values_file(path)[source]

Read a j_values.dat written by mag4-extract.

Handles both the four-state format (name d JS2(eV) JS2(meV) J(meV) J(K) status) and the energy-mapping format (name d JS2(meV) [sig(meV)] ). j_values are the JS² values in meV (mag4-magnon’s native input); a Jring row’s JS2 column holds the fitted Jring·S⁴ and is returned separately in ring. The per-coupling standard errors (sig(meV) column, newer files) and the fit RMS from the header feed the statistical-significance test used by the dimensionality guard.

Return type:

ExtractedJs

Parameters:

path (str)

mag4.cli.magnon.apply_ring_renormalisation(j_values, shells, edge_label, js4_meV, *, tol=0.02)[source]

Fold a four-spin ring coupling into effective bilinear JS² (LSWT).

Harmonic (LSWT) reduction of the cyclic four-spin operator about the Néel state (cf. Coldea et al., PRL 86, 5377 (2001)): each pair operator inside the quartic term is multiplied by the classical value of its partner bond, so the magnon Hamiltonian is EXACTLY that of a bilinear model with, per bond and in native JS² units (Jring·S⁴ enters directly — no explicit S factors),

edge shell (2 plaquettes/bond): JS² → JS² − 2·JringS⁴ diagonal shell (1 plaquette/bond): JS² → JS² − 1·JringS⁴

edge_label names the shell the square plaquette is built on; the diagonal shell is located geometrically (distance = √2 × edge, within tol relative). If the diagonal shell carries no fitted J it is induced with JS² = −JringS⁴. Returns (new_j_values, lines) where lines document the transformation for the report.

Parameters:
mag4.cli.magnon.build_parser()[source]
Return type:

ArgumentParser

mag4.cli.magnon.main(argv=None)[source]
Return type:

int