diff --git a/README.md b/README.md index 65b237b7e..e49010ff9 100644 --- a/README.md +++ b/README.md @@ -43,11 +43,12 @@ Sunny is inspired by SpinW, especially regarding symmetry analysis and tradition | -- | -- | -- | -- | | Symmetry-guided modeling | ❌ | ✅ | ✅ | | Interactive graphics | ❌ | ✅ | ✅ | -| [Incommensurate spiral order](https://arxiv.org/abs/1402.6069) | ❌ | ✅ | ✅ | -| Arbitrary couplings of quantum operators | ✅ | ❌ | ✅ | -| [Interaction renormalization corrections](https://arxiv.org/abs/2304.03874) | ❌ | ❌ | ✅ | -| [Multi-flavor spin wave theory](https://arxiv.org/abs/1307.7731) | ✅ | ❌ | ✅ | -| [Classical SU(_N_) spin dynamics](https://arxiv.org/abs/2209.01265) | ❌ | ❌ | ✅ | +| [Incommensurate spiral order](https://sunnysuite.github.io/Sunny.jl/stable/examples/spinw/SW15_Ba3NbFe3Si2O14.html) | ❌ | ✅ | ✅ | +| [Interaction renormalization](https://sunnysuite.github.io/Sunny.jl/stable/renormalization.html) | ❌ | ❌ | ✅ | +| [Multi-flavor spin wave theory](https://sunnysuite.github.io/Sunny.jl/stable/examples/03_LSWT_SU3_FeI2.html) | ✅ | ❌ | ✅ | +| [Arbitrary spin-multipole couplings](https://sunnysuite.github.io/Sunny.jl/stable/library.html#Sunny.set_pair_coupling!-Union{Tuple{N},%20Tuple{System{N},%20AbstractMatrix,%20Any}}%20where%20N) | ✅ | ❌ | ✅ | +| [Classical SU(_N_) spin dynamics](https://sunnysuite.github.io/Sunny.jl/stable/examples/04_GSD_FeI2.html) | ❌ | ❌ | ✅ | +| [Linear-scaling spin wave theory](https://sunnysuite.github.io/Sunny.jl/stable/examples/09_Disorder_KPM.html) | ❌ | ❌ | ✅ | | [Fast long-range dipole interactions](https://sunnysuite.github.io/Sunny.jl/stable/examples/07_Dipole_Dipole.html) | ❌ | ❌ | ✅ | | Programming language | C++ | Matlab | [Julia](https://julialang.org/) | diff --git a/docs/src/renormalization.md b/docs/src/renormalization.md index caa91f8ea..ea5a0bc29 100644 --- a/docs/src/renormalization.md +++ b/docs/src/renormalization.md @@ -6,7 +6,7 @@ dipole. This generalization can be important when modeling quantum spin Hamiltonians that include, e.g., a single-ion anisotropy, or a biquadratic coupling between sites. Sunny also supports constraining quantum spin to the space of pure dipoles; in this case, Sunny will automatically perform an -interaction strength renormalization that maximizes accuracy. +interaction strength renormalization that enhances accuracy. ## Local operators diff --git a/examples/07_Dipole_Dipole.jl b/examples/07_Dipole_Dipole.jl index 41b09e44e..845dcb614 100644 --- a/examples/07_Dipole_Dipole.jl +++ b/examples/07_Dipole_Dipole.jl @@ -1,9 +1,11 @@ # # 7. Long-range dipole interactions # -# This example shows how long-range dipole-dipole interactions can affect a spin -# wave calculation. These interactions can be included two ways: Ewald summation -# or in real-space with a distance cutoff. The study follows [Del Maestro and -# Gingras, J. Phys.: Cond. Matter, **16**, 3339 +# This example demonstrates long-range dipole-dipole interactions in the context +# of a spin wave calculation. These interactions can be included two ways: with +# infinite-range [Ewald summation](@ref enable_dipole_dipole!) or with a +# [real-space distance cutoff](@ref +# modify_exchange_with_truncated_dipole_dipole!). The study follows [Del Maestro +# and Gingras, J. Phys.: Cond. Matter, **16**, 3339 # (2004)](https://arxiv.org/abs/cond-mat/0403494). using Sunny, GLMakie diff --git a/examples/09_Disorder_KPM.jl b/examples/09_Disorder_KPM.jl index 6b4b36b6d..bfc9e7759 100644 --- a/examples/09_Disorder_KPM.jl +++ b/examples/09_Disorder_KPM.jl @@ -1,14 +1,14 @@ # # 9. Disordered system with KPM # -# This example uses the kernel polynomial method (KPM) to efficiently calculate -# the neutron scattering spectrum of a disordered triangular antiferromagnet. -# The model is inspired by YbMgGaO4, as studied in [Paddison et al, Nature -# Phys., **13**, 117–122 (2017)](https://doi.org/10.1038/nphys3971) and [Zhu et -# al, Phys. Rev. Lett. **119**, 157201 -# (2017)](https://doi.org/10.1103/PhysRevLett.119.157201). Disordered occupancy -# of non-magnetic Mg/Ga sites can be modeled as a stochastic distribution of -# exchange constants and ``g``-factors. Including this disorder introduces -# broadening of the spin wave spectrum. +# This example uses the [kernel polynomial method](@ref SpinWaveTheoryKPM) to +# efficiently calculate the neutron scattering spectrum of a disordered +# triangular antiferromagnet. The model is inspired by YbMgGaO4, as studied in +# [Paddison et al, Nature Phys., **13**, 117–122 +# (2017)](https://doi.org/10.1038/nphys3971) and [Zhu et al, Phys. Rev. Lett. +# **119**, 157201 (2017)](https://doi.org/10.1103/PhysRevLett.119.157201). +# Disordered occupancy of non-magnetic Mg/Ga sites can be modeled as a +# stochastic distribution of exchange constants and ``g``-factors. Including +# this disorder introduces broadening of the spin wave spectrum. using Sunny, GLMakie diff --git a/examples/spinw_tutorials/SW15_Ba3NbFe3Si2O14.jl b/examples/spinw_tutorials/SW15_Ba3NbFe3Si2O14.jl index 11c398b47..7242fbd03 100644 --- a/examples/spinw_tutorials/SW15_Ba3NbFe3Si2O14.jl +++ b/examples/spinw_tutorials/SW15_Ba3NbFe3Si2O14.jl @@ -3,6 +3,9 @@ # This is a Sunny port of [SpinW Tutorial # 15](https://spinw.org/tutorials/15tutorial), originally authored by Sandor # Toth. It calculates the linear spin wave theory spectrum of Ba₃NbFe₃Si₂O₁₄. +# The ground state is an incommensurate spiral, which can be directly studied +# using the functions [`minimize_spiral_energy!`](@ref) and +# [`SpinWaveTheorySpiral`](@ref). # Load packages diff --git a/src/System/Interactions.jl b/src/System/Interactions.jl index b37439a66..409212fb5 100644 --- a/src/System/Interactions.jl +++ b/src/System/Interactions.jl @@ -69,7 +69,7 @@ end Enables long-range interactions between magnetic dipole moments, ```math - -(μ_0/4π) ∑_{⟨ij⟩} [3 (μ_i⋅𝐫̂_{ij})(μ_j⋅𝐫̂_{ij}) - μ_i⋅μ_j] / r_{ij}^3 + -(μ_0/4π) ∑_{⟨ij⟩} [3 (μ_i⋅𝐫̂_{ij})(μ_j⋅𝐫̂_{ij}) - μ_i⋅μ_j] / r_{ij}^3, ``` where the sum is over all pairs of sites (singly counted), including periodic @@ -86,6 +86,17 @@ units = Units(:meV, :angstrom) enable_dipole_dipole!(sys, units.vacuum_permeability) ``` +!!! tip "Efficiency considerations" + Dipole-dipole interactions are very efficient in the context of spin + dynamics simulation, e.g. [`Langevin`](@ref). Sunny applies the fast Fourier + transform (FFT) to spins on each Bravais sublattice, such that the + computational cost to integrate one time-step scales like ``M^2 N \\ln N``, + where ``N`` is the number of cells in the system and ``M`` is the number of + Bravais sublattices per cell. Conversely, dipole-dipole interactions are + highly _inefficient_ in the context of a [`LocalSampler`](@ref). Each Monte + Carlo update of a single spin currently requires scanning over all other + spins in the system. + See also [`modify_exchange_with_truncated_dipole_dipole!`](@ref). """ function enable_dipole_dipole!(sys::System{N}, μ0_μB²=nothing) where N