diff --git a/previews/PR208/.documenter-siteinfo.json b/previews/PR208/.documenter-siteinfo.json index 3c7396e49..683749d79 100644 --- a/previews/PR208/.documenter-siteinfo.json +++ b/previews/PR208/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-01-10T15:16:15","documenter_version":"1.2.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-01-11T21:03:23","documenter_version":"1.2.1"}} \ No newline at end of file diff --git a/previews/PR208/assets/notebooks/03_LLD_CoRh2O4.ipynb b/previews/PR208/assets/notebooks/03_LLD_CoRh2O4.ipynb index 138f18007..0d46f0578 100644 --- a/previews/PR208/assets/notebooks/03_LLD_CoRh2O4.ipynb +++ b/previews/PR208/assets/notebooks/03_LLD_CoRh2O4.ipynb @@ -81,7 +81,8 @@ "cell_type": "code", "source": [ "λ = 0.2 # Magnitude of damping (dimensionless)\n", - "kT = 16 * meV_per_K # 16K, a temperature slightly below ordering" + "kT = 16 * meV_per_K # 16K, a temperature slightly below ordering\n", + "langevin = Langevin(; λ, kT)" ], "metadata": {}, "execution_count": null @@ -89,10 +90,10 @@ { "cell_type": "markdown", "source": [ - "Use `suggest_timestep` to obtain a reasonable integration timestep.\n", - "The spin configuration in `sys` should ideally be equilibrated for the target\n", - "temperature `kT`, but the current, energy-minimized configuration will also\n", - "work reasonably well. Usually `tol=1e-2` is good tolerance to numerical error." + "Use `suggest_timestep` to select an integration timestep for the given\n", + "error tolerance, e.g. `tol=1e-2`. The spin configuration in `sys` should\n", + "ideally be relaxed into thermal equilibrium, but the current, energy-minimized\n", + "configuration will also work reasonably well." ], "metadata": {} }, @@ -100,24 +101,8 @@ "outputs": [], "cell_type": "code", "source": [ - "suggest_timestep(sys; tol=1e-2, λ, kT)" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "We now have all data needed to construct a Langevin integrator." - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "Δt = 0.025\n", - "langevin = Langevin(Δt; λ, kT);" + "suggest_timestep(sys, langevin; tol=1e-2)\n", + "langevin.Δt = 0.025" ], "metadata": {}, "execution_count": null @@ -146,8 +131,9 @@ { "cell_type": "markdown", "source": [ - "Calling `check_timestep` indicates that our choice of `Δt` was a\n", - "little smaller than necessary; increasing it will improve efficiency." + "Now that the spin configuration has relaxed, we can learn that `Δt` was a\n", + "little smaller than necessary; increasing it will make the remaining\n", + "simulations faster." ], "metadata": {} }, @@ -155,7 +141,7 @@ "outputs": [], "cell_type": "code", "source": [ - "check_timestep(sys, langevin; tol=1e-2)\n", + "suggest_timestep(sys, langevin; tol=1e-2)\n", "langevin.Δt = 0.042" ], "metadata": {}, diff --git a/previews/PR208/assets/notebooks/04_GSD_FeI2.ipynb b/previews/PR208/assets/notebooks/04_GSD_FeI2.ipynb index 2f117f06f..2627e8366 100644 --- a/previews/PR208/assets/notebooks/04_GSD_FeI2.ipynb +++ b/previews/PR208/assets/notebooks/04_GSD_FeI2.ipynb @@ -106,8 +106,8 @@ { "cell_type": "markdown", "source": [ - "As previously observed, direct energy minimization is susceptible to trapping\n", - "in a local energy minimum." + "As previously observed\"), direct energy minimization is susceptible to trapping in a local\n", + "energy minimum." ], "metadata": {} }, @@ -138,7 +138,8 @@ "cell_type": "code", "source": [ "λ = 0.2 # Dimensionless damping time-scale\n", - "kT = 0.2 # Temperature in meV" + "kT = 0.2 # Temperature in meV\n", + "langevin = Langevin(; λ, kT)" ], "metadata": {}, "execution_count": null @@ -146,9 +147,10 @@ { "cell_type": "markdown", "source": [ - "Use `suggest_timestep` to obtain a reasonable integration timestep. It\n", - "is important that the system has already been initialized to a low-energy\n", - "configuration. Usually `tol=1e-2` is good tolerance to numerical error." + "Use `suggest_timestep` to select an integration timestep for the given\n", + "error tolerance, e.g. `tol=1e-2`. The spin configuration in `sys` should\n", + "ideally be relaxed into thermal equilibrium, but the current, energy-minimized\n", + "configuration will also work reasonably well." ], "metadata": {} }, @@ -156,7 +158,8 @@ "outputs": [], "cell_type": "code", "source": [ - "suggest_timestep(sys; tol=1e-2, λ, kT)" + "suggest_timestep(sys, langevin; tol=1e-2)\n", + "langevin.Δt = 0.027" ], "metadata": {}, "execution_count": null @@ -164,27 +167,10 @@ { "cell_type": "markdown", "source": [ - "This information is sufficient to define the Langevin integrator." - ], - "metadata": {} - }, - { - "outputs": [], - "cell_type": "code", - "source": [ - "Δt = 0.027\n", - "langevin = Langevin(Δt; kT, λ);" - ], - "metadata": {}, - "execution_count": null - }, - { - "cell_type": "markdown", - "source": [ - "Langevin dynamics can be used to search for a magnetically ordered state. This\n", - "works well because the temperature `kT = 0.2` has been carefully selected. It\n", - "is below the ordering temperature, but large enough that the dynamical\n", - "trajectory can overcome local energy barriers and annihilate defects." + "Sample spin configurations using Langevin dynamics. We have carefully selected\n", + "a temperature of 0.2 eV that is below the ordering temperature, but large\n", + "enough to that the dynamics can overcome local energy barriers and annihilate\n", + "defects." ], "metadata": {} }, @@ -202,7 +188,7 @@ { "cell_type": "markdown", "source": [ - "Calling `check_timestep` shows that thermalization has not\n", + "Calling `suggest_timestep` shows that thermalization has not\n", "substantially altered the suggested `Δt`." ], "metadata": {} @@ -211,7 +197,7 @@ "outputs": [], "cell_type": "code", "source": [ - "check_timestep(sys, langevin; tol=1e-2)" + "suggest_timestep(sys, langevin; tol=1e-2)" ], "metadata": {}, "execution_count": null @@ -297,7 +283,7 @@ "outputs": [], "cell_type": "code", "source": [ - "check_timestep(sys_large, langevin; tol=1e-2)\n", + "suggest_timestep(sys_large, langevin; tol=1e-2)\n", "langevin.Δt = 0.040" ], "metadata": {}, diff --git a/previews/PR208/assets/scripts/03_LLD_CoRh2O4.jl b/previews/PR208/assets/scripts/03_LLD_CoRh2O4.jl index 77ce7829f..1dd93fc99 100644 --- a/previews/PR208/assets/scripts/03_LLD_CoRh2O4.jl +++ b/previews/PR208/assets/scripts/03_LLD_CoRh2O4.jl @@ -16,11 +16,10 @@ sys = resize_supercell(sys, (10, 10, 10)) λ = 0.2 # Magnitude of damping (dimensionless) kT = 16 * meV_per_K # 16K, a temperature slightly below ordering +langevin = Langevin(; λ, kT) -suggest_timestep(sys; tol=1e-2, λ, kT) - -Δt = 0.025 -langevin = Langevin(Δt; λ, kT); +suggest_timestep(sys, langevin; tol=1e-2) +langevin.Δt = 0.025 energies = [energy_per_site(sys)] for _ in 1:1000 @@ -28,7 +27,7 @@ for _ in 1:1000 push!(energies, energy_per_site(sys)) end -check_timestep(sys, langevin; tol=1e-2) +suggest_timestep(sys, langevin; tol=1e-2) langevin.Δt = 0.042 plot(energies, color=:blue, figure=(size=(600,300),), axis=(xlabel="Timesteps", ylabel="Energy (meV)")) diff --git a/previews/PR208/assets/scripts/04_GSD_FeI2.jl b/previews/PR208/assets/scripts/04_GSD_FeI2.jl index c582cc6c7..af24c6dbb 100644 --- a/previews/PR208/assets/scripts/04_GSD_FeI2.jl +++ b/previews/PR208/assets/scripts/04_GSD_FeI2.jl @@ -41,17 +41,16 @@ plot_spins(sys; color=[s[3] for s in sys.dipoles]) λ = 0.2 # Dimensionless damping time-scale kT = 0.2 # Temperature in meV +langevin = Langevin(; λ, kT) -suggest_timestep(sys; tol=1e-2, λ, kT) - -Δt = 0.027 -langevin = Langevin(Δt; kT, λ); +suggest_timestep(sys, langevin; tol=1e-2) +langevin.Δt = 0.027 for _ in 1:10_000 step!(sys, langevin) end -check_timestep(sys, langevin; tol=1e-2) +suggest_timestep(sys, langevin; tol=1e-2) plot_spins(sys; color=[s[3] for s in sys.dipoles]) @@ -64,7 +63,7 @@ for _ in 1:10_000 step!(sys_large, langevin) end -check_timestep(sys_large, langevin; tol=1e-2) +suggest_timestep(sys_large, langevin; tol=1e-2) langevin.Δt = 0.040 Δt = 2*langevin.Δt diff --git a/previews/PR208/examples/01_LSWT_SU3_FeI2.html b/previews/PR208/examples/01_LSWT_SU3_FeI2.html index c3df5ed0a..b40a2cb01 100644 --- a/previews/PR208/examples/01_LSWT_SU3_FeI2.html +++ b/previews/PR208/examples/01_LSWT_SU3_FeI2.html @@ -156,4 +156,4 @@ fig = Figure() ax = Axis(fig[1,1]; xlabel="Momentum (r.l.u.)", ylabel="Energy (meV)", xticks, xticklabelrotation=π/6) heatmap!(ax, 1:size(is_averaged, 1), energies, is_averaged) -fig
This result can be directly compared to experimental neutron scattering data from Bai et al.
(The publication figure accidentally used a non-standard coordinate system to label the wave vectors.)
To get this agreement, the use of SU(3) coherent states is essential. In other words, we needed a theory of multi-flavored bosons. The lower band has large quadrupolar character, and arises from the strong easy-axis anisotropy of FeI₂. By setting mode = :SUN
, the calculation captures this coupled dipole-quadrupole dynamics.
An interesting exercise is to repeat the same study, but using mode = :dipole
instead of :SUN
. That alternative choice would constrain the coherent state dynamics to the space of dipoles only.
The full dynamical spin structure factor (DSSF) can be retrieved as a $3×3$ matrix with the dssf
function, for a given path of $𝐪$-vectors.
disp, is = dssf(swt, path);
The first output disp
is identical to that obtained from dispersion
. The second output is
contains a list of $3×3$ matrix of intensities. For example, is[q,n][2,3]
yields the $(ŷ,ẑ)$ component of the structure factor intensity for nth
mode at the q
th wavevector in the path
.
The multi-boson linear spin wave theory, applied above, can be understood as the quantization of a certain generalization of the Landau-Lifshitz spin dynamics. Rather than dipoles, this dynamics takes places on the space of SU(N) coherent states.
The full SU(N) coherent state dynamics, with appropriate quantum correction factors, can be useful to model finite temperature scattering data. In particular, it captures certain anharmonic effects due to thermal fluctuations. See our generalized spin dynamics tutorial.
The classical dynamics is also a good starting point to study non-equilibrium phenomena. Empirical noise and damping terms can be used to model coupling to a thermal bath. This yields a Langevin dynamics of SU(N) coherent states. Our dynamical SU(N) quench tutorial illustrates how a temperature quench can give rise to novel liquid phase of CP² skyrmions.
Settings
This document was generated with Documenter.jl version 1.2.1 on Wednesday 10 January 2024. Using Julia version 1.9.4.