Sunny is a Julia package for modeling atomic-scale magnetism with quantum effects. Spin dynamics simulation enables direct comparison with experimental scattering data, e.g., neutrons or x-rays. Ease of use is a priority, with tools for symmetry-guided modeling and interactive visualization.
At low-temperatures, Sunny supports the usual linear spin wave theory of spin dipoles with generalization to multi-flavor bosons. At finite temperatures, Sunny supports the classical Landau-Lifshitz spin dynamics with generalization to SU(N) coherent states. Such generalizations are useful for modeling the coupled dynamics of higher order spin multipoles (see, e.g., the FeI₂ tutorial), and for capturing localized "units" of strongly entangled spins. Dynamical coupling to a thermal bath makes possible the study of non-equilibrium dynamics, e.g., thermal transport, pump-probe experiments, and spin-glass relaxation. Many of these features build on our team's theoretical research.
Start by browsing the Tutorials. For traditional linear spin wave theory, see also the SpinW ports.
See Getting Started for installation instructions. Version History lists new features and breaking changes.
Sunny is inspired by SpinW, especially regarding symmetry analysis and traditional spin wave theory. Relative to other spin wave codes, this table highlights Sunny's special features (as of 2025):
McPhase | SpinW | Sunny | |
---|---|---|---|
Symmetry-guided modeling | ❌ | ✅ | ✅ |
Interactive graphics | ❌ | ✅ | ✅ |
Incommensurate spiral order | ❌ | ✅ | ✅ |
Interaction renormalization | ❌ | ❌ | ✅ |
Multi-flavor spin wave theory | ✅ | ❌ | ✅ |
Arbitrary spin-multipole couplings | ✅ | ❌ | ✅ |
Classical SU(N) spin dynamics | ❌ | ❌ | ✅ |
Linear-scaling spin wave theory | ❌ | ❌ | ✅ |
Fast long-range dipole interactions | ❌ | ❌ | ✅ |
Programming language | C++ | Matlab | Julia |
Codes like Spirit and Vampire focus less on capturing quantum effects, but might be preferred for large-scale classical spin dynamics, e.g., for micromagnetics.
We want to interact with you! Please join our Slack community and say hello. If you encounter a problem, please ask on the Slack #helpdesk
channel. If you use Sunny in a paper, please add it to our Literature Wiki.