Skip to content

A Julia library implementing SU(N) classical spin dynamics simulations for arbitrary crystal geometries and a broad class of Hamiltonians.

License

Notifications You must be signed in to change notification settings

kbarros/Sunny.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A package for simulating classical spin systems, including the Landau-Lifshitz dynamics of spin dipoles and its generalization to multipolar spin components. In the latter case, Sunny resolves the local quantum structure of individual spins, making it particularly suited for modeling magnetic compounds with strong local anisotropy.

Sunny additionally provides Monte Carlo algorithms for sampling from thermal equilibrium, as well as tools for measuring dynamical structure factors that can be compared with experimental neutron scattering data. Sunny provides symmetry analyses to facilitate the design and specification of model Hamiltonians, and interactive tools to visualize 3D crystal structures and (coming soon) structure factor data.

Sunny is currently under heavy development. Expect frequent breaking changes.

Example notebooks

To get a feeling for what Sunny can do, we recommend browsing Jupyter notebook tutorials. In particular, the FeI2 tutorial illustrates how to measure to use SU(3) spin dynamics to measure a dynamical structure factor.

Technical description of SU(N) spin dynamics.

A quantum spin of magnitude S has $N = 2 S + 1$ distinct levels, and evolves under the group of special unitary transformations, SU(N). Local physical observables correspond to expectation values of the $N^2-1$ generators of SU(N), which may be interpreted as multipolar spin components. The standard treatment keeps only the expected dipole components, $\langle \hat S^x\rangle,\langle \hat S^y\rangle,\langle \hat S^z\rangle$, yielding the Landau-Lifshitz dynamics. The "SU(N) spin dynamics" naturally generalizes the LL equation by modeling the coupled dynamics of all $N^2-1$ generalized spin components. This formalism was introduced in [Zhang and Batista, Phys. Rev. B 104, 104409 (2021)].

Sunny uses highly efficient algorithms to simulate this SU(N) spin dynamics:

  • D. Dahlbom et al., Geometric integration of classical spin dynamics via a mean-field Schrödinger equation, Phys. Rev. B 106, 054423 (2022) [arXiv:2204.07563].
  • D. Dahlbom et al., Langevin dynamics of generalized spins as SU(N) coherent states [arXiv:2209.01265].

Comparison with other tools

A defining feature of Sunny is its support for generalized SU(N) spin dynamics. Sunny can also be restricted to the dipole-only approximation of spin. When running in this mode, the capabilities of Sunny are similar to SpinW. Advantages of Sunny are: (1) Support for finite temperature measurements, and (2) Support for single-ion anisotropies beyond quadratic order. A current disadvantage is that Sunny does not yet employ linear spin wave theory; this means that the $q$-space resolution of structure factor measurements $\mathcal{S}(q,\omega)$ is limited by the size of magnetic super cell. Sunny is also a newer project, and lacks some of the polish of SpinW.

Installation

Sunny is implemented in the Julia programming language. New Julia users may wish to start with our Getting Started guide.

From the Julia prompt, one can install Sunny using the built-in package manager:

julia> ]
pkg> add Sunny

Check that Sunny is working properly by running the unit tests: pkg> test Sunny. Please keep up-to-date by periodically running the Julia update command: pkg> update.

A good way to interact with Sunny is through the Jupyter notebook interface. This support can be installed through the IJulia package.

API Reference

Documentation available here.

Contact us

Please join our Slack User Community!

Alterantively, contact the developers directly.

About

A Julia library implementing SU(N) classical spin dynamics simulations for arbitrary crystal geometries and a broad class of Hamiltonians.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Julia 92.4%
  • JavaScript 7.1%
  • HTML 0.5%