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. Through neglect of entanglement, 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, the theory could also be used to model explicit spin-orbit coupling, or '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 effects. 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.

Try it out!

A good starting point is our FeI₂ tutorial. This compound includes effective spin-1 moments with strong easy-axis anisotropy, and exemplifies the power of simulating SU(3) coherent states.

Try it yourself by downloading Julia, and installing Sunny within Julia's built-in package manager. New Julia users can refer to our Getting Started guide.

Sunny is evolving rapidly. See Version History for 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 2023):

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

If you're using Sunny, we'd like to interact with you. Please join our Slack community and say hello. If you find an unexpected behavior in Sunny, you can also file an issue. If you write a paper using Sunny, please add it to our Literature Wiki.


LANL    UTK    GATech   ORNL    LSU