Skip to content

Commit

Permalink
build based on 397b41c
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Oct 16, 2024
1 parent 6f551d5 commit 6e4765c
Show file tree
Hide file tree
Showing 143 changed files with 134 additions and 134 deletions.
2 changes: 1 addition & 1 deletion dev/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-10-10T21:00:13","documenter_version":"1.7.0"}}
{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-10-16T23:14:14","documenter_version":"1.7.0"}}
Binary file removed dev/examples/01_LSWT_CoRh2O4-5810feec.png
Binary file not shown.
Binary file added dev/examples/01_LSWT_CoRh2O4-5b68f5b3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dev/examples/01_LSWT_CoRh2O4-753e45d2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dev/examples/01_LSWT_CoRh2O4-aadda135.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dev/examples/01_LSWT_CoRh2O4-c3e8a69e.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed dev/examples/01_LSWT_CoRh2O4-ddf50dbf.png
Binary file not shown.
Binary file removed dev/examples/01_LSWT_CoRh2O4-df83cd5c.png
Binary file not shown.
Binary file removed dev/examples/01_LSWT_CoRh2O4-e42a7d2b.png
Binary file not shown.
8 changes: 4 additions & 4 deletions dev/examples/01_LSWT_CoRh2O4.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
set_exchange!(sys, J, Bond(1, 3, [0, 0, 0]))
view_crystal(sys)</code></pre><img src="01_LSWT_CoRh2O4-9fc04702.png" alt="Example block output"/><h3 id="Optimizing-spins"><a class="docs-heading-anchor" href="#Optimizing-spins">Optimizing spins</a><a id="Optimizing-spins-1"></a><a class="docs-heading-anchor-permalink" href="#Optimizing-spins" title="Permalink"></a></h3><p>To search for the ground state, call <a href="../library.html#Sunny.randomize_spins!-Union{Tuple{System{N}}, Tuple{N}} where N"><code>randomize_spins!</code></a> and <a href="../library.html#Sunny.minimize_energy!-Union{Tuple{System{N}}, Tuple{N}} where N"><code>minimize_energy!</code></a> in sequence. For this problem, optimization converges rapidly to the expected Néel order. See this with <a href="../library.html#Sunny.plot_spins"><code>plot_spins</code></a>, where spins are colored according to their global <span>$z$</span>-component.</p><pre><code class="language-julia hljs">randomize_spins!(sys)
minimize_energy!(sys)
plot_spins(sys; color=[S[3] for S in sys.dipoles])</code></pre><img src="01_LSWT_CoRh2O4-5810feec.png" alt="Example block output"/><p>The diamond lattice is bipartite, allowing each spin to perfectly anti-align with its 4 nearest-neighbors. Each of these 4 bonds contribute <span>$-J s^2$</span> to the total energy. Two sites participate in each bond, so the energy per site is <span>$-2 J s^2$</span>. Check this by calling <a href="../library.html#Sunny.energy_per_site-Union{Tuple{System{N}}, Tuple{N}} where N"><code>energy_per_site</code></a>.</p><pre><code class="language-julia hljs">@assert energy_per_site(sys) ≈ -2J*(3/2)^2</code></pre><h3 id="Reshaping-the-magnetic-cell"><a class="docs-heading-anchor" href="#Reshaping-the-magnetic-cell">Reshaping the magnetic cell</a><a id="Reshaping-the-magnetic-cell-1"></a><a class="docs-heading-anchor-permalink" href="#Reshaping-the-magnetic-cell" title="Permalink"></a></h3><p>The most compact magnetic cell for this Néel order is a primitive unit cell. Reduce the magnetic cell size using <a href="../library.html#Sunny.reshape_supercell-Tuple{System, Any}"><code>reshape_supercell</code></a>, where columns of the <code>shape</code> matrix are primitive lattice vectors as multiples of the conventional cubic lattice vectors <span>$(𝐚_1, 𝐚_2, 𝐚_3)$</span>. One could alternatively use <code>shape = cryst.latvecs \ cryst.prim_latvecs</code>. Verify that the energy per site is unchanged after the reshaping the supercell.</p><pre><code class="language-julia hljs">shape = [0 1 1;
plot_spins(sys; color=[S[3] for S in sys.dipoles])</code></pre><img src="01_LSWT_CoRh2O4-c3e8a69e.png" alt="Example block output"/><p>The diamond lattice is bipartite, allowing each spin to perfectly anti-align with its 4 nearest-neighbors. Each of these 4 bonds contribute <span>$-J s^2$</span> to the total energy. Two sites participate in each bond, so the energy per site is <span>$-2 J s^2$</span>. Check this by calling <a href="../library.html#Sunny.energy_per_site-Union{Tuple{System{N}}, Tuple{N}} where N"><code>energy_per_site</code></a>.</p><pre><code class="language-julia hljs">@assert energy_per_site(sys) ≈ -2J*(3/2)^2</code></pre><h3 id="Reshaping-the-magnetic-cell"><a class="docs-heading-anchor" href="#Reshaping-the-magnetic-cell">Reshaping the magnetic cell</a><a id="Reshaping-the-magnetic-cell-1"></a><a class="docs-heading-anchor-permalink" href="#Reshaping-the-magnetic-cell" title="Permalink"></a></h3><p>The most compact magnetic cell for this Néel order is a primitive unit cell. Reduce the magnetic cell size using <a href="../library.html#Sunny.reshape_supercell-Tuple{System, Any}"><code>reshape_supercell</code></a>, where columns of the <code>shape</code> matrix are primitive lattice vectors as multiples of the conventional cubic lattice vectors <span>$(𝐚_1, 𝐚_2, 𝐚_3)$</span>. One could alternatively use <code>shape = cryst.latvecs \ cryst.prim_latvecs</code>. Verify that the energy per site is unchanged after the reshaping the supercell.</p><pre><code class="language-julia hljs">shape = [0 1 1;
1 0 1;
1 1 0] / 2
sys_prim = reshape_supercell(sys, shape)
@assert energy_per_site(sys_prim) ≈ -2J*(3/2)^2</code></pre><p>Plotting <code>sys_prim</code> shows the two spins within the primitive cell, as well as the larger conventional cubic cell for context.</p><pre><code class="language-julia hljs">plot_spins(sys_prim; color=[S[3] for S in sys_prim.dipoles])</code></pre><img src="01_LSWT_CoRh2O4-e42a7d2b.png" alt="Example block output"/><h3 id="Spin-wave-theory"><a class="docs-heading-anchor" href="#Spin-wave-theory">Spin wave theory</a><a id="Spin-wave-theory-1"></a><a class="docs-heading-anchor-permalink" href="#Spin-wave-theory" title="Permalink"></a></h3><p>With this primitive cell, we will perform a <a href="../library.html#Sunny.SpinWaveTheory"><code>SpinWaveTheory</code></a> calculation of the structure factor <span>$\mathcal{S}(𝐪,ω)$</span>. The measurement <a href="../library.html#Sunny.ssf_perp-Tuple{System}"><code>ssf_perp</code></a> indicates projection of the spin structure factor <span>$\mathcal{S}(𝐪,ω)$</span> perpendicular to the direction of momentum transfer, as appropriate for unpolarized neutron scattering. The isotropic <a href="../library.html#Sunny.FormFactor-Tuple{String}"><code>FormFactor</code></a> for Co²⁺ dampens intensities at large <span>$𝐪$</span>.</p><pre><code class="language-julia hljs">formfactors = [1 =&gt; FormFactor(&quot;Co2&quot;)]
@assert energy_per_site(sys_prim) ≈ -2J*(3/2)^2</code></pre><p>Plotting <code>sys_prim</code> shows the two spins within the primitive cell, as well as the larger conventional cubic cell for context.</p><pre><code class="language-julia hljs">plot_spins(sys_prim; color=[S[3] for S in sys_prim.dipoles])</code></pre><img src="01_LSWT_CoRh2O4-753e45d2.png" alt="Example block output"/><h3 id="Spin-wave-theory"><a class="docs-heading-anchor" href="#Spin-wave-theory">Spin wave theory</a><a id="Spin-wave-theory-1"></a><a class="docs-heading-anchor-permalink" href="#Spin-wave-theory" title="Permalink"></a></h3><p>With this primitive cell, we will perform a <a href="../library.html#Sunny.SpinWaveTheory"><code>SpinWaveTheory</code></a> calculation of the structure factor <span>$\mathcal{S}(𝐪,ω)$</span>. The measurement <a href="../library.html#Sunny.ssf_perp-Tuple{System}"><code>ssf_perp</code></a> indicates projection of the spin structure factor <span>$\mathcal{S}(𝐪,ω)$</span> perpendicular to the direction of momentum transfer, as appropriate for unpolarized neutron scattering. The isotropic <a href="../library.html#Sunny.FormFactor-Tuple{String}"><code>FormFactor</code></a> for Co²⁺ dampens intensities at large <span>$𝐪$</span>.</p><pre><code class="language-julia hljs">formfactors = [1 =&gt; FormFactor(&quot;Co2&quot;)]
measure = ssf_perp(sys_prim; formfactors)
swt = SpinWaveTheory(sys_prim; measure)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi"><span class="sgr4"><span class="sgr1">SpinWaveTheory [Dipole mode]</span></span>
2 atoms
Expand All @@ -37,8 +37,8 @@
[0, 0, 0] → [1/2, 0, 0] → [1/2, 1/2, 0] → [0, 0, 0]
</code></pre><p>Calculate single-crystal scattering <a href="../library.html#Sunny.intensities-Tuple{Sunny.AbstractSpinWaveTheory, Any}"><code>intensities</code></a> along this path, for energies between 0 and 6 meV. Use <a href="../library.html#Sunny.plot_intensities"><code>plot_intensities</code></a> to visualize the result.</p><pre><code class="language-julia hljs">energies = range(0, 6, 300)
res = intensities(swt, path; energies, kernel)
plot_intensities(res; units, title=&quot;CoRh₂O₄ LSWT&quot;)</code></pre><img src="01_LSWT_CoRh2O4-df83cd5c.png" alt="Example block output"/><p>Sometimes experimental data is only available as a powder average, i.e., as an average over all possible crystal orientations. Use <a href="../library.html#Sunny.powder_average-Tuple{Any, Any, Any, Int64}"><code>powder_average</code></a> to simulate these intensities. Each <span>$𝐪$</span>-magnitude defines a spherical shell in reciprocal space. Consider 200 radii from 0 to 3 inverse angstroms, and collect <code>2000</code> random samples per spherical shell. As configured, this calculation completes in about two seconds. Had we used the conventional cubic cell, the calculation would be an order of magnitude slower.</p><pre><code class="language-julia hljs">radii = range(0, 3, 200) # (1/Å)
plot_intensities(res; units, title=&quot;CoRh₂O₄ LSWT&quot;)</code></pre><img src="01_LSWT_CoRh2O4-aadda135.png" alt="Example block output"/><p>Sometimes experimental data is only available as a powder average, i.e., as an average over all possible crystal orientations. Use <a href="../library.html#Sunny.powder_average-Tuple{Any, Any, Any, Int64}"><code>powder_average</code></a> to simulate these intensities. Each <span>$𝐪$</span>-magnitude defines a spherical shell in reciprocal space. Consider 200 radii from 0 to 3 inverse angstroms, and collect <code>2000</code> random samples per spherical shell. As configured, this calculation completes in about two seconds. Had we used the conventional cubic cell, the calculation would be an order of magnitude slower.</p><pre><code class="language-julia hljs">radii = range(0, 3, 200) # (1/Å)
res = powder_average(cryst, radii, 2000) do qs
intensities(swt, qs; energies, kernel)
end
plot_intensities(res; units, saturation=1.0, title=&quot;CoRh₂O₄ Powder Average&quot;)</code></pre><img src="01_LSWT_CoRh2O4-ddf50dbf.png" alt="Example block output"/><p>This result can be compared to experimental neutron scattering data from Fig. 5 of <a href="https://doi.org/10.1103/PhysRevB.96.064413">Ge et al.</a></p><img width="95%" src="https://raw.githubusercontent.com/SunnySuite/Sunny.jl/main/docs/src/assets/CoRh2O4_intensity.jpg"><h3 id="What&#39;s-next?"><a class="docs-heading-anchor" href="#What&#39;s-next?">What&#39;s next?</a><a id="What&#39;s-next?-1"></a><a class="docs-heading-anchor-permalink" href="#What&#39;s-next?" title="Permalink"></a></h3><ul><li>For more spin wave calculations of this type, browse the <a href="spinw/SW01_FM_Heseinberg_chain.html#SW01-FM-Heisenberg-chain">SpinW tutorials ported to Sunny</a>.</li><li>Spin wave theory neglects thermal fluctuations of the magnetic order. The <a href="02_LLD_CoRh2O4.html#2.-Landau-Lifshitz-dynamics-of-CoRhO-at-finite-*T*">next CoRh₂O₄ tutorial</a> demonstrates how to sample spins in thermal equilibrium, and measure dynamical correlations from the classical spin dynamics.</li><li>Sunny also offers features that go beyond the dipole approximation of a quantum spin via the theory of SU(<em>N</em>) coherent states. This can be especially useful for systems with strong single-ion anisotropy, as demonstrated in the <a href="03_LSWT_SU3_FeI2.html#3.-Multi-flavor-spin-wave-simulations-of-FeI">FeI₂ tutorial</a>.</li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../index.html">« Overview</a><a class="docs-footer-nextpage" href="02_LLD_CoRh2O4.html">2. Landau-Lifshitz dynamics of CoRh₂O₄ at finite <em>T</em> »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.7.0 on <span class="colophon-date" title="Thursday 10 October 2024 21:00">Thursday 10 October 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
plot_intensities(res; units, saturation=1.0, title=&quot;CoRh₂O₄ Powder Average&quot;)</code></pre><img src="01_LSWT_CoRh2O4-5b68f5b3.png" alt="Example block output"/><p>This result can be compared to experimental neutron scattering data from Fig. 5 of <a href="https://doi.org/10.1103/PhysRevB.96.064413">Ge et al.</a></p><img width="95%" src="https://raw.githubusercontent.com/SunnySuite/Sunny.jl/main/docs/src/assets/CoRh2O4_intensity.jpg"><h3 id="What&#39;s-next?"><a class="docs-heading-anchor" href="#What&#39;s-next?">What&#39;s next?</a><a id="What&#39;s-next?-1"></a><a class="docs-heading-anchor-permalink" href="#What&#39;s-next?" title="Permalink"></a></h3><ul><li>For more spin wave calculations of this type, browse the <a href="spinw/SW01_FM_Heseinberg_chain.html#SW01-FM-Heisenberg-chain">SpinW tutorials ported to Sunny</a>.</li><li>Spin wave theory neglects thermal fluctuations of the magnetic order. The <a href="02_LLD_CoRh2O4.html#2.-Landau-Lifshitz-dynamics-of-CoRhO-at-finite-*T*">next CoRh₂O₄ tutorial</a> demonstrates how to sample spins in thermal equilibrium, and measure dynamical correlations from the classical spin dynamics.</li><li>Sunny also offers features that go beyond the dipole approximation of a quantum spin via the theory of SU(<em>N</em>) coherent states. This can be especially useful for systems with strong single-ion anisotropy, as demonstrated in the <a href="03_LSWT_SU3_FeI2.html#3.-Multi-flavor-spin-wave-simulations-of-FeI">FeI₂ tutorial</a>.</li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../index.html">« Overview</a><a class="docs-footer-nextpage" href="02_LLD_CoRh2O4.html">2. Landau-Lifshitz dynamics of CoRh₂O₄ at finite <em>T</em> »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.7.0 on <span class="colophon-date" title="Wednesday 16 October 2024 23:14">Wednesday 16 October 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Binary file removed dev/examples/02_LLD_CoRh2O4-2dcc1719.png
Binary file not shown.
Binary file added dev/examples/02_LLD_CoRh2O4-2e2c9dd0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed dev/examples/02_LLD_CoRh2O4-2ece289a.png
Binary file not shown.
Binary file removed dev/examples/02_LLD_CoRh2O4-47e59303.png
Binary file not shown.
Binary file added dev/examples/02_LLD_CoRh2O4-4c020151.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed dev/examples/02_LLD_CoRh2O4-56fdab20.png
Binary file not shown.
Binary file removed dev/examples/02_LLD_CoRh2O4-5899e266.png
Binary file not shown.
Binary file removed dev/examples/02_LLD_CoRh2O4-65d506a8.png
Binary file not shown.
Binary file added dev/examples/02_LLD_CoRh2O4-8ed611b6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dev/examples/02_LLD_CoRh2O4-9fd32f70.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dev/examples/02_LLD_CoRh2O4-a451db9d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dev/examples/02_LLD_CoRh2O4-cc180337.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed dev/examples/02_LLD_CoRh2O4-e2f57d95.png
Binary file not shown.
Binary file added dev/examples/02_LLD_CoRh2O4-e39c419f.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6e4765c

Please sign in to comment.