/Sunny.jl

A Julia library implementing SU(N) spin dynamics for modeling magnetism

Primary LanguageJuliaMIT LicenseMIT

Sunny.jl

Documentation:   Docs-dev Build status:   CI

Overview

Sunny is a Julia package for modeling atomic-scale magnetism using classical spin dynamics with quantum corrections. It provides powerful tools to estimate dynamical structure factor intensities, $\mathcal{S}(๐ช,ฯ‰)$, enabling quantitative comparison with experimental scattering data, e.g., neutrons or x-rays.

A unique feature of Sunny is its treatment of spins as SU(N) coherent states. Each quantum spin-S state is a superposition of $N=2S+1$ levels, and evolves under unitary, SU(N) transformations. When entanglement is neglected, the formalism allows to generalize the Landau-Lifshitz dynamics of spin dipoles to a dynamics of spin multipoles. The theory becomes especially useful for modeling materials with strong single-ion anisotropy effects (see our FeIโ‚‚ tutorial). In the future, Sunny will also support explicit spin-orbit coupling, and 'units' of locally entangled spins.

At low-temperatures, Sunny supports the usual linear spin wave theory for spin dipoles, and its 'multi-boson' generalization. At finite temperatures, the full classical dynamics (with quantum correction factors) may be preferable to capture strongly nonlinear fluctuations. The coupling of SU(N) spins to a thermal bath also makes possible the study of various non-equilibrium dynamics, e.g., thermal transport, pump-probe experiments, and spin-glass relaxation.

Sunny provides a number of tools to facilitate the specification and solution of spin Hamiltonians. This includes spacegroup symmetry analysis, powerful Monte Carlo sampling algorithms, and interactive 3D visualization. Efficient simulation is made possible by several algorithmic developments. See our Sunny publications for more information.

Try it out!

New Julia users should begin with our Getting Started guide. A showcase for Sunny is the FeIโ‚‚ tutorial. This compound has a strong easy-axis anisotropy which gives rise to a single-ion bound state, and serves to exemplify the power of simulating SU(N) coherent states. Regarding the traditional linear spin wave theory of dipoles, see our adaptations of the SpinW tutorials.

Sunny is evolving rapidly. Version History lists the new features and breaking changes. To install a specific version of Sunny, say v0.x, use the command add Sunny@0.x.

Other spin wave codes

Sunny is inspired by SpinW, especially regarding symmetry analysis, model specification, and linear spin wave calculations. Relative to other spin wave codes, this table highlights Sunny's special features (as of 2024):

McPhase SpinW Sunny
Symmetry-guided modeling โŒ โœ… โœ…
Interactive graphics โŒ โœ… โœ…
General spin-multipole interactions โœ… โŒ โœ…
Interaction renormalization for dipoles โŒ โŒ โœ…
Multi-flavor spin wave theory โœ… โŒ โœ…
Classical SU(N) spin dynamics โŒ โŒ โœ…
Ewald summation for dipole-dipole โŒ โŒ ๐ŸŸจโฝยนโพ
Programming language C++ Matlab Julia

Fine print: (1) Dipole-dipole interactions currently supported in classical dyamics but not LSWT.

The classical SU(N) spin dynamics in Sunny generalizes the Landau-Lifshitz equation for $S > 1/2$ quantum spins. Linearizing and quantizing SU(N) dynamics yields a generalization of spin wave theory involving multi-flavor bosons.

Codes like Spirit and Vampire focus less on capturing quantum effects, but may be good options for classical dynamics of pure dipoles.

Join our community

We want to interact with you! Please join our Slack community and say hello. If you encounter a problem with Sunny, please ask on the Slack #helpdesk channel or file a Github issue. If you use Sunny in a paper, please let us know and add it to our Literature Wiki.


LANL    UTK    GATech   ORNL    LSU