Welcome to RS-utils’s documentation!

RS-utils is a comprehensive toolkit for RS-LMTO-ASA calculations. It processes lattice and atomic inputs to compute optimal Wigner–Seitz radii and reasonable starting parameters, builds exchange interaction maps for spin dynamics, provides interactive 3D visualization of structures and magnetic moments, and exports results to UppASD for further simulation.

It now includes an advanced pure-Python band structure and DOS workflow with orbital/site/spin projections, gauge fixing for smooth eigenvectors, degenerate band stabilization, Brillouin zone visualization, and high-order quantities like Berry curvature and effective mass.

Getting Started

RS-LMTO setup workflow:

# 1) Setup lattice and initial atomic parameters
rsutil setup bulk --empty_spheres

# 2) Build exchange interactions (J_ij)
rsutil --exchange --cutoff 2.5 --unique --shell-width 0.1

# 3) Export to UppASD
rsutil --export --data . --jij jijso.out --out uppasd_out

# Optional: all-site SQS on supercell before setup
rsutil setup bulk --supercell 2 2 2 --sqs "Fe=0.5,Ni=0.5" \
    --sqs-shells 3 --sqs-steps 5000 --sqs-seed 1234

# Optional: 2D slab mode
rsutil setup bulk --2d --z-iso-factor 0.5

# Optional: recursion control overrides
rsutil setup bulk --rec-method chebyshev

Band structure & DOS workflow:

# Band structure with automatic k-path (fast)
rsutil bands --lattice lattice.nml --hamiltonian rs2txt.dat --nk 100 --output bands.png

# Spin-projected bands with Sz expectation values
rsutil bands --lattice lattice.nml --hamiltonian rs2txt.dat --nk 100 \
    --projections --projection spin --projections-mode expectation --output bands_spin.png

# Orbital-projected bands (s, p, d character)
rsutil bands --lattice lattice.nml --hamiltonian rs2txt.dat --nk 100 \
    --projections --projection orbital --output bands_orbital.png

# Full Brillouin zone DOS with Fermi level determination
rsutil dos --lattice lattice.nml --hamiltonian rs2txt.dat \
    --mesh 6 6 6 --electrons 16 --moments --output dos.png

Visualization:

# Lattice view
rsutil --lattice --data .

# Cluster view
rsutil --clust --data .

Command-Line Interface:

Indices and tables