Skip to content

Commit

Permalink
build based on 7052ae5
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Oct 7, 2023
1 parent 1e6935d commit 0b1d72d
Show file tree
Hide file tree
Showing 42 changed files with 88 additions and 90 deletions.
2 changes: 1 addition & 1 deletion previews/PR176/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-10-04T23:58:18","documenter_version":"1.1.0"}}
{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-10-07T14:42:16","documenter_version":"1.1.0"}}
2 changes: 1 addition & 1 deletion previews/PR176/anisotropy.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
\hat{\mathcal{O}}_{6,\pm2} & =\phi_{\pm}(\hat{S}_{+}^{2}\pm \hat{S}_{-}^{2})(33\hat{S}_{z}^{4}-(18X+123)\hat{S}_{z}^{2}+X^{2}+10X+102)+\mathrm{h.c.}\\
\hat{\mathcal{O}}_{6,\pm1} & =\phi_{\pm}(\hat{S}_{+}\pm \hat{S}_{-})(33\hat{S}_{z}^{5}-(30X-15)\hat{S}_{z}^{3}+(5X^{2}-10X+12)\hat{S}_{z})+\mathrm{h.c.}\\
\hat{\mathcal{O}}_{6,0} & =231\hat{S}_{z}^{6}-(315X-735)\hat{S}_{z}^{4}+(105X^{2}-525X+294)\hat{S}_{z}^{2}-5X^{3}+40X^{2}-60X
\end{align*}\]</p><p>Stevens operators <span>$\hat{\mathcal{O}}_{k,q}$</span> for odd <span>$k$</span> are disallowed from the single-ion anisotropy under the assumption of time-reversal symmetry. Computer-generated tables of Stevens operators with larger k are available from C. Rudowicz and C. Y. Chung, J. Phys.: Condens. Matter 16, 5825 (2004).</p><p>For each <span>$k$</span> value, the collection of operators <span>$\{\hat{\mathcal{O}}_{k,q&#39;}\}$</span> for <span>$q&#39; = -k, \dots, k$</span> is an irreducible representation of the group of rotations O(3). In particular, a physical rotation will transform <span>$\hat{\mathcal{O}}_{k,q}$</span> into a linear combination of <span>$\hat{\mathcal{O}}_{k,q&#39;}$</span> where <span>$q&#39;$</span> varies but <span>$k$</span> remains fixed. </p><p>In taking the large-<span>$S$</span> limit, each dipole operator is replaced by its expectation value <span>$\mathbf{s} = \langle \hat{\mathbf{S}} \rangle$</span>, and only leading-order terms are retained. The operator <span>$\hat{\mathcal{O}}_{k,q}$</span> becomes a homogeneous polynomial <span>$O_{k,q}(\mathbf{s})$</span> of order <span>$k$</span> in the spin components. One can see these polynomials using <a href="library.html#Sunny.large_S_stevens_operators"><code>large_S_stevens_operators</code></a>. Due to the normalization constraint, each dipole can be expressed in polar angles, <span>$(\theta, \phi)$</span>. Then the Stevens functions <span>$O_{k,q}(\mathbf{s})$</span> correspond to the spherical harmonic functions <span>$Y_l^m(\theta, \phi)$</span> where <span>$l=k$</span> and <span>$m=q$</span>, and modulo <span>$k$</span> and <span>$q$</span>-dependent rescaling factors.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="structure-factor.html">« Structure Factor Calculations</a><a class="docs-footer-nextpage" href="library.html">Library API »</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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.1.0 on <span class="colophon-date" title="Wednesday 4 October 2023 23:58">Wednesday 4 October 2023</span>. Using Julia version 1.9.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
\end{align*}\]</p><p>Stevens operators <span>$\hat{\mathcal{O}}_{k,q}$</span> for odd <span>$k$</span> are disallowed from the single-ion anisotropy under the assumption of time-reversal symmetry. Computer-generated tables of Stevens operators with larger k are available from C. Rudowicz and C. Y. Chung, J. Phys.: Condens. Matter 16, 5825 (2004).</p><p>For each <span>$k$</span> value, the collection of operators <span>$\{\hat{\mathcal{O}}_{k,q&#39;}\}$</span> for <span>$q&#39; = -k, \dots, k$</span> is an irreducible representation of the group of rotations O(3). In particular, a physical rotation will transform <span>$\hat{\mathcal{O}}_{k,q}$</span> into a linear combination of <span>$\hat{\mathcal{O}}_{k,q&#39;}$</span> where <span>$q&#39;$</span> varies but <span>$k$</span> remains fixed. </p><p>In taking the large-<span>$S$</span> limit, each dipole operator is replaced by its expectation value <span>$\mathbf{s} = \langle \hat{\mathbf{S}} \rangle$</span>, and only leading-order terms are retained. The operator <span>$\hat{\mathcal{O}}_{k,q}$</span> becomes a homogeneous polynomial <span>$O_{k,q}(\mathbf{s})$</span> of order <span>$k$</span> in the spin components. One can see these polynomials using <a href="library.html#Sunny.large_S_stevens_operators"><code>large_S_stevens_operators</code></a>. Due to the normalization constraint, each dipole can be expressed in polar angles, <span>$(\theta, \phi)$</span>. Then the Stevens functions <span>$O_{k,q}(\mathbf{s})$</span> correspond to the spherical harmonic functions <span>$Y_l^m(\theta, \phi)$</span> where <span>$l=k$</span> and <span>$m=q$</span>, and modulo <span>$k$</span> and <span>$q$</span>-dependent rescaling factors.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="structure-factor.html">« Structure Factor Calculations</a><a class="docs-footer-nextpage" href="library.html">Library API »</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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.1.0 on <span class="colophon-date" title="Saturday 7 October 2023 14:42">Saturday 7 October 2023</span>. Using Julia version 1.9.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
24 changes: 12 additions & 12 deletions previews/PR176/assets/notebooks/08_Kagome_AFM.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"source": [
"# Kagome Antiferromagnet\n",
"\n",
"- Sunny port of the SpinW [tutorial](https://spinw.org/tutorials/08tutorial)\n",
" authored by Bjorn Fak and Sandor Toth.\n",
"- Goal: Calculate the linear spin wave theory spectrum for the $\\sqrt{3}\n",
" \\times \\sqrt{3}$ order of a Kagome antiferromagnet."
"This is a Sunny port of [SpinW Tutorial\n",
"8](https://spinw.org/tutorials/08tutorial), authored by Bjorn Fak and Sandor\n",
"Toth. The goal is to calculate the linear spin wave theory spectrum for the\n",
"$\\sqrt{3} \\times \\sqrt{3}$ order of a Kagome antiferromagnet."
],
"metadata": {}
},
Expand All @@ -31,7 +31,7 @@
{
"cell_type": "markdown",
"source": [
"Build a `Crystal` with P$\\overline{3}$ space group and Cr⁺ ions on\n",
"Build a `Crystal` with $P\\overline{3}$ space group and Cr⁺ ions on\n",
"each site."
],
"metadata": {}
Expand All @@ -40,10 +40,9 @@
"outputs": [],
"cell_type": "code",
"source": [
"a = b = 6.0 # (Å)\n",
"c = 40.0\n",
"latvecs = lattice_vectors(a, b, c, 90, 90, 120)\n",
"crystal = Crystal(latvecs, [[1/2,0,0]], 147; types=[\"Cr\"])"
"a = 1\n",
"latvecs = lattice_vectors(a, a, 10a, 90, 90, 120)\n",
"crystal = Crystal(latvecs, [[1/2,0,0]], 147)"
],
"metadata": {},
"execution_count": null
Expand Down Expand Up @@ -71,7 +70,8 @@
{
"cell_type": "markdown",
"source": [
"Initialize to the known magnetic structure, which is 120° order."
"Initialize to an energy minimizing magnetic structure, for which\n",
"nearest-neighbor spins are at 120° angles."
],
"metadata": {}
},
Expand All @@ -84,7 +84,7 @@
"set_spiral_order_on_sublattice!(sys, 1; q, axis, S0=[cos(0),sin(0),0])\n",
"set_spiral_order_on_sublattice!(sys, 2; q, axis, S0=[cos(0),sin(0),0])\n",
"set_spiral_order_on_sublattice!(sys, 3; q, axis, S0=[cos(2π/3),sin(2π/3),0])\n",
"plot_spins(sys; ghost_radius=30, orthographic=true)"
"plot_spins(sys; dims=2)"
],
"metadata": {},
"execution_count": null
Expand Down Expand Up @@ -146,7 +146,7 @@
"cell_type": "markdown",
"source": [
"Plot over a restricted color range from [0,1e-2]. Note that the intensities of\n",
"the flat band at zero-energy are divergent."
"the flat band at zero-energy are off-scale."
],
"metadata": {}
},
Expand Down
11 changes: 5 additions & 6 deletions previews/PR176/assets/notebooks/15_Ba3NbFe3Si2O14.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"source": [
"# Ba₃NbFe₃Si₂O₁₄\n",
"\n",
"- Sunny port of the SpinW [tutorial](https://spinw.org/tutorials/15tutorial)\n",
" authored by Toth et al.\n",
"- Goal: Calculate the linear spin wave theory spectrum for Ba₃NbFe₃Si₂O₁₄."
"This is a Sunny port of [SpinW Tutorial\n",
"15](https://spinw.org/tutorials/15tutorial), authored by Toth et al. The goal\n",
"is to calculate the linear spin wave theory spectrum for Ba₃NbFe₃Si₂O₁₄."
],
"metadata": {}
},
Expand Down Expand Up @@ -58,8 +58,7 @@
"Create a `System` with a lattice size of $(1,1,7)$. The magnetic\n",
"structure of Ba₃NbFe₃Si₂O₁₄ was\n",
"determined to have the ordering wavevector $𝐐=(0,0,1/7)$ and hence the\n",
"magnetic unit cell has 7 sites. By passing an explicit `seed`, the system's\n",
"random number generator will give repeatable results."
"magnetic unit cell has 7 sites."
],
"metadata": {}
},
Expand All @@ -70,7 +69,7 @@
"latsize = (1,1,7)\n",
"S = 5/2\n",
"seed = 5\n",
"sys = System(crystal, latsize, [SpinInfo(1; S, g=2)], :dipole; seed)"
"sys = System(crystal, latsize, [SpinInfo(1; S, g=2)], :dipole)"
],
"metadata": {},
"execution_count": null
Expand Down
9 changes: 4 additions & 5 deletions previews/PR176/assets/scripts/08_Kagome_AFM.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using Sunny, GLMakie

a = b = 6.0 # (Å)
c = 40.0
latvecs = lattice_vectors(a, b, c, 90, 90, 120)
crystal = Crystal(latvecs, [[1/2,0,0]], 147; types=["Cr"])
a = 1
latvecs = lattice_vectors(a, a, 10a, 90, 90, 120)
crystal = Crystal(latvecs, [[1/2,0,0]], 147)

S = 1
sys = System(crystal, (3,3,1), [SpinInfo(1; S, g=2)], :dipole)
Expand All @@ -15,7 +14,7 @@ axis = [0,0,1]
set_spiral_order_on_sublattice!(sys, 1; q, axis, S0=[cos(0),sin(0),0])
set_spiral_order_on_sublattice!(sys, 2; q, axis, S0=[cos(0),sin(0),0])
set_spiral_order_on_sublattice!(sys, 3; q, axis, S0=[cos(2π/3),sin(2π/3),0])
plot_spins(sys; ghost_radius=30, orthographic=true)
plot_spins(sys; dims=2)

@assert energy_per_site(sys) (4/2)*J*S^2*cos(2π/3)

Expand Down
2 changes: 1 addition & 1 deletion previews/PR176/assets/scripts/15_Ba3NbFe3Si2O14.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ view_crystal(crystal, 7)
latsize = (1,1,7)
S = 5/2
seed = 5
sys = System(crystal, latsize, [SpinInfo(1; S, g=2)], :dipole; seed)
sys = System(crystal, latsize, [SpinInfo(1; S, g=2)], :dipole)

J₁ = 0.85
J₂ = 0.24
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 previews/PR176/examples/fei2_classical-aa854b6a.png
Binary file not shown.
Binary file removed previews/PR176/examples/fei2_classical-e4714ec9.png
Binary file not shown.
6 changes: 3 additions & 3 deletions previews/PR176/examples/fei2_classical.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
langevin = Langevin(Δt; kT, λ);</code></pre><p>Langevin dynamics can be used to search for a magnetically ordered state. For this, the temperature <code>kT</code> must be below the ordering temperature, but large enough that the dynamical sampling procedure can overcome local energy barriers and eliminate defects.</p><pre><code class="language-julia hljs">randomize_spins!(sys)
for _ in 1:20_000
step!(sys, langevin)
end</code></pre><p>Although thermal fluctuations are present, the correct antiferromagnetic order (2 up, 2 down) is apparent.</p><pre><code class="language-julia hljs">plot_spins(sys; color=[s[3] for s in sys.dipoles])</code></pre><img src="fei2_classical-e4714ec9.png" alt="Example block output"/><p>For other systems, it can be much harder to find the magnetic ordering in an unbiased way, and more complicated sampling procedures may be necessary.</p><h2 id="Calculating-Thermal-Averaged-Correlations-\\langle-S{\\alpha\\beta}(𝐪,ω)\\rangle"><a class="docs-heading-anchor" href="#Calculating-Thermal-Averaged-Correlations-\\langle-S{\\alpha\\beta}(𝐪,ω)\\rangle">Calculating Thermal-Averaged Correlations <span>$\langle S^{\alpha\beta}(𝐪,ω)\rangle$</span></a><a id="Calculating-Thermal-Averaged-Correlations-\\langle-S{\\alpha\\beta}(𝐪,ω)\\rangle-1"></a><a class="docs-heading-anchor-permalink" href="#Calculating-Thermal-Averaged-Correlations-\\langle-S{\\alpha\\beta}(𝐪,ω)\\rangle" title="Permalink"></a></h2><p>Our aim is to study the classical spin dynamics for states sampled in thermal equilibrium. To minimize finite size effects, and achieve sufficient momentum space resolution, we should significantly enlarge the system volume. The function <a href="../library.html#Sunny.resize_supercell-Union{Tuple{N}, Tuple{System{N}, Tuple{Int64, Int64, Int64}}} where N"><code>resize_supercell</code></a> takes new dimensions as multiples of the unit cell lattice vectors.</p><pre><code class="language-julia hljs">sys_large = resize_supercell(sys, (16,16,4)) # 16x16x4 copies of the original unit cell
plot_spins(sys_large; color=[s[3] for s in sys_large.dipoles])</code></pre><img src="fei2_classical-aa854b6a.png" alt="Example block output"/><p>Now we will re-thermalize the system to a configuration just above the ordering temperature. Sunny expects energies in meV by default, so we use <code>meV_per_K</code> to convert from kelvin.</p><pre><code class="language-julia hljs">kT = 3.5 * meV_per_K # 3.5K ≈ 0.30 meV
end</code></pre><p>Although thermal fluctuations are present, the correct antiferromagnetic order (2 up, 2 down) is apparent.</p><pre><code class="language-julia hljs">plot_spins(sys; color=[s[3] for s in sys.dipoles])</code></pre><img src="fei2_classical-02ffd1ac.png" alt="Example block output"/><p>For other systems, it can be much harder to find the magnetic ordering in an unbiased way, and more complicated sampling procedures may be necessary.</p><h2 id="Calculating-Thermal-Averaged-Correlations-\\langle-S{\\alpha\\beta}(𝐪,ω)\\rangle"><a class="docs-heading-anchor" href="#Calculating-Thermal-Averaged-Correlations-\\langle-S{\\alpha\\beta}(𝐪,ω)\\rangle">Calculating Thermal-Averaged Correlations <span>$\langle S^{\alpha\beta}(𝐪,ω)\rangle$</span></a><a id="Calculating-Thermal-Averaged-Correlations-\\langle-S{\\alpha\\beta}(𝐪,ω)\\rangle-1"></a><a class="docs-heading-anchor-permalink" href="#Calculating-Thermal-Averaged-Correlations-\\langle-S{\\alpha\\beta}(𝐪,ω)\\rangle" title="Permalink"></a></h2><p>Our aim is to study the classical spin dynamics for states sampled in thermal equilibrium. To minimize finite size effects, and achieve sufficient momentum space resolution, we should significantly enlarge the system volume. The function <a href="../library.html#Sunny.resize_supercell-Union{Tuple{N}, Tuple{System{N}, Tuple{Int64, Int64, Int64}}} where N"><code>resize_supercell</code></a> takes new dimensions as multiples of the unit cell lattice vectors.</p><pre><code class="language-julia hljs">sys_large = resize_supercell(sys, (16,16,4)) # 16x16x4 copies of the original unit cell
plot_spins(sys_large; color=[s[3] for s in sys_large.dipoles])</code></pre><img src="fei2_classical-8a214f0c.png" alt="Example block output"/><p>Now we will re-thermalize the system to a configuration just above the ordering temperature. Sunny expects energies in meV by default, so we use <code>meV_per_K</code> to convert from kelvin.</p><pre><code class="language-julia hljs">kT = 3.5 * meV_per_K # 3.5K ≈ 0.30 meV
langevin.kT = kT
for _ in 1:10_000
step!(sys_large, langevin)
Expand Down Expand Up @@ -174,4 +174,4 @@
)
)
Colorbar(hm.figure[1,2], hm.plot)
hm</code></pre><img src="fei2_classical-a20d933e.png" alt="Example block output"/></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="powder_averaging.html">« Powder Averaged CoRh₂O₄</a><a class="docs-footer-nextpage" href="ising2d.html">Classical Ising model »</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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.1.0 on <span class="colophon-date" title="Wednesday 4 October 2023 23:58">Wednesday 4 October 2023</span>. Using Julia version 1.9.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
hm</code></pre><img src="fei2_classical-a20d933e.png" alt="Example block output"/></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="powder_averaging.html">« Powder Averaged CoRh₂O₄</a><a class="docs-footer-nextpage" href="ising2d.html">Classical Ising model »</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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.1.0 on <span class="colophon-date" title="Saturday 7 October 2023 14:42">Saturday 7 October 2023</span>. Using Julia version 1.9.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
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 previews/PR176/examples/fei2_tutorial-45007e38.png
Binary file not shown.
Binary file removed previews/PR176/examples/fei2_tutorial-a7865089.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 previews/PR176/examples/fei2_tutorial-d7e092b7.png
Binary file not shown.
Loading

0 comments on commit 0b1d72d

Please sign in to comment.