Giter Site home page Giter Site logo

kbarros / sunny.jl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chaebinkim/sunny.jl

0.0 0.0 0.0 1.8 MB

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

License: MIT License

JavaScript 7.05% Julia 92.47% HTML 0.47%

sunny.jl's Introduction

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.

sunny.jl's People

Contributors

kbarros avatar colemiles avatar ddahlbom avatar chaebinkim avatar mswwilson avatar sakibmatin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.