diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index a84be5995..03118d21b 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-20T17:22:00","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-20T19:53:17","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/assets/notebooks/05_MC_Ising.ipynb b/dev/assets/notebooks/05_MC_Ising.ipynb index cee21b663..c0eca646a 100644 --- a/dev/assets/notebooks/05_MC_Ising.ipynb +++ b/dev/assets/notebooks/05_MC_Ising.ipynb @@ -42,7 +42,7 @@ "Create a `System` of spin dipoles. Following the Ising convention, we\n", "will restrict the dipoles to $±1$ along the global $\\hat{z}$-axis. Select\n", "$g=-1$ so that the Zeeman coupling between external field $𝐁$ and spin\n", - "dipole $𝐬$ is $-𝐁⋅𝐬$. The system size is 128×128." + "dipole $𝐒$ is $-𝐁⋅𝐒$. The system size is 128×128." ], "metadata": {} }, @@ -117,7 +117,7 @@ "consists of, on average, one trial update per spin in the system. Each\n", "proposed update is accepted or rejected according to the Metropolis acceptance\n", "probability. As its name suggests, the `propose_flip` function will\n", - "only propose pure spin flips, $𝐬 \\rightarrow -𝐬$." + "only propose pure spin flips, $𝐒 \\rightarrow -𝐒$." ], "metadata": {} }, diff --git a/dev/assets/notebooks/06_CP2_Skyrmions.ipynb b/dev/assets/notebooks/06_CP2_Skyrmions.ipynb index b5fe38f42..4dcc2ee62 100644 --- a/dev/assets/notebooks/06_CP2_Skyrmions.ipynb +++ b/dev/assets/notebooks/06_CP2_Skyrmions.ipynb @@ -52,7 +52,7 @@ "cell_type": "markdown", "source": [ "Create a spin `System` containing $L×L$ cells. Following previous\n", - "worse, select $g=-1$ so that the Zeeman coupling has the form $-𝐁⋅𝐬$." + "worse, select $g=-1$ so that the Zeeman coupling has the form $-𝐁⋅𝐒$." ], "metadata": {} }, diff --git a/dev/assets/notebooks/SW13_LiNiPO4.ipynb b/dev/assets/notebooks/SW13_LiNiPO4.ipynb index 499077578..d0e1e9cff 100644 --- a/dev/assets/notebooks/SW13_LiNiPO4.ipynb +++ b/dev/assets/notebooks/SW13_LiNiPO4.ipynb @@ -68,7 +68,6 @@ "outputs": [], "cell_type": "code", "source": [ - "S = 3/2\n", "sys = System(cryst, [1 => Moment(s=1, g=2)], :dipole_large_s)\n", "Jbc = 1.036\n", "Jb = 0.6701\n", diff --git a/dev/assets/scripts/SW13_LiNiPO4.jl b/dev/assets/scripts/SW13_LiNiPO4.jl index 83c6a14bd..7731d1455 100644 --- a/dev/assets/scripts/SW13_LiNiPO4.jl +++ b/dev/assets/scripts/SW13_LiNiPO4.jl @@ -10,7 +10,6 @@ types = ["Ni"] cryst = Crystal(latvecs, positions, 62, setting=""; types) view_crystal(cryst) -S = 3/2 sys = System(cryst, [1 => Moment(s=1, g=2)], :dipole_large_s) Jbc = 1.036 Jb = 0.6701 diff --git a/dev/examples/01_LSWT_CoRh2O4-3703d499.png b/dev/examples/01_LSWT_CoRh2O4-3703d499.png new file mode 100644 index 000000000..3b4980103 Binary files /dev/null and b/dev/examples/01_LSWT_CoRh2O4-3703d499.png differ diff --git a/dev/examples/01_LSWT_CoRh2O4-4e7ea387.png b/dev/examples/01_LSWT_CoRh2O4-4e7ea387.png new file mode 100644 index 000000000..5aa6ec5fb Binary files /dev/null and b/dev/examples/01_LSWT_CoRh2O4-4e7ea387.png differ diff --git a/dev/examples/01_LSWT_CoRh2O4-f235b95e.png b/dev/examples/01_LSWT_CoRh2O4-9fc04702.png similarity index 91% rename from dev/examples/01_LSWT_CoRh2O4-f235b95e.png rename to dev/examples/01_LSWT_CoRh2O4-9fc04702.png index e25846e1f..0a790f937 100644 Binary files a/dev/examples/01_LSWT_CoRh2O4-f235b95e.png and b/dev/examples/01_LSWT_CoRh2O4-9fc04702.png differ diff --git a/dev/examples/01_LSWT_CoRh2O4-a02a5316.png b/dev/examples/01_LSWT_CoRh2O4-a02a5316.png deleted file mode 100644 index 193ac9faf..000000000 Binary files a/dev/examples/01_LSWT_CoRh2O4-a02a5316.png and /dev/null differ diff --git a/dev/examples/01_LSWT_CoRh2O4-a5e6eb9b.png b/dev/examples/01_LSWT_CoRh2O4-a5e6eb9b.png new file mode 100644 index 000000000..d1579ad1a Binary files /dev/null and b/dev/examples/01_LSWT_CoRh2O4-a5e6eb9b.png differ diff --git a/dev/examples/01_LSWT_CoRh2O4-cd2b6fb9.png b/dev/examples/01_LSWT_CoRh2O4-cd2b6fb9.png new file mode 100644 index 000000000..f7ccfd85d Binary files /dev/null and b/dev/examples/01_LSWT_CoRh2O4-cd2b6fb9.png differ diff --git a/dev/examples/01_LSWT_CoRh2O4-e348980e.png b/dev/examples/01_LSWT_CoRh2O4-e348980e.png deleted file mode 100644 index 9c18a8760..000000000 Binary files a/dev/examples/01_LSWT_CoRh2O4-e348980e.png and /dev/null differ diff --git a/dev/examples/01_LSWT_CoRh2O4-f5fbbf16.png b/dev/examples/01_LSWT_CoRh2O4-f5fbbf16.png deleted file mode 100644 index 4874e28e3..000000000 Binary files a/dev/examples/01_LSWT_CoRh2O4-f5fbbf16.png and /dev/null differ diff --git a/dev/examples/01_LSWT_CoRh2O4-f725892f.png b/dev/examples/01_LSWT_CoRh2O4-f725892f.png deleted file mode 100644 index 320272e0c..000000000 Binary files a/dev/examples/01_LSWT_CoRh2O4-f725892f.png and /dev/null differ diff --git a/dev/examples/01_LSWT_CoRh2O4.html b/dev/examples/01_LSWT_CoRh2O4.html index e7d8263f0..aa171a566 100644 --- a/dev/examples/01_LSWT_CoRh2O4.html +++ b/dev/examples/01_LSWT_CoRh2O4.html @@ -22,13 +22,13 @@ Energy per site 0
Ge et al. demonstrated that inelastic neutron scattering data for CoRh₂O₄ is well modeled by antiferromagnetic nearest neighbor exchange, J = 0.63
meV. Call set_exchange!
with the bond that connects atom 1 to atom 3, and has zero displacement between chemical cells. Consistent with the symmetries of spacegroup 227, this interaction will be propagated to all other nearest-neighbor bonds. Calling view_crystal
with sys
now shows the antiferromagnetic Heisenberg interactions as blue polkadot spheres.
J = +0.63 # (meV)
set_exchange!(sys, J, Bond(1, 3, [0, 0, 0]))
-view_crystal(sys)
To search for the ground state, call randomize_spins!
and minimize_energy!
in sequence. For this problem, optimization converges rapidly to the expected Néel order. See this with plot_spins
, where spins are colored according to their global $z$-component.
randomize_spins!(sys)
+view_crystal(sys)
To search for the ground state, call randomize_spins!
and minimize_energy!
in sequence. For this problem, optimization converges rapidly to the expected Néel order. See this with plot_spins
, where spins are colored according to their global $z$-component.
randomize_spins!(sys)
minimize_energy!(sys)
-plot_spins(sys; color=[S[3] for S in sys.dipoles])
The diamond lattice is bipartite, allowing each spin to perfectly anti-align with its 4 nearest-neighbors. Each of these 4 bonds contribute $-J s^2$ to the total energy. Two sites participate in each bond, so the energy per site is $-2 J s^2$. Check this by calling energy_per_site
.
@assert energy_per_site(sys) ≈ -2J*(3/2)^2
The most compact magnetic cell for this Néel order is a primitive unit cell. Reduce the magnetic cell size using reshape_supercell
, where columns of the shape
matrix are primitive lattice vectors as multiples of the conventional cubic lattice vectors $(𝐚_1, 𝐚_2, 𝐚_3)$. One could alternatively use shape = cryst.latvecs \ cryst.prim_latvecs
. Verify that the energy per site is unchanged after the reshaping the supercell.
shape = [0 1 1;
+plot_spins(sys; color=[S[3] for S in sys.dipoles])
The diamond lattice is bipartite, allowing each spin to perfectly anti-align with its 4 nearest-neighbors. Each of these 4 bonds contribute $-J s^2$ to the total energy. Two sites participate in each bond, so the energy per site is $-2 J s^2$. Check this by calling energy_per_site
.
@assert energy_per_site(sys) ≈ -2J*(3/2)^2
The most compact magnetic cell for this Néel order is a primitive unit cell. Reduce the magnetic cell size using reshape_supercell
, where columns of the shape
matrix are primitive lattice vectors as multiples of the conventional cubic lattice vectors $(𝐚_1, 𝐚_2, 𝐚_3)$. One could alternatively use shape = cryst.latvecs \ cryst.prim_latvecs
. Verify that the energy per site is unchanged after the reshaping the supercell.
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
Plotting sys_prim
shows the two spins within the primitive cell, as well as the larger conventional cubic cell for context.
plot_spins(sys_prim; color=[S[3] for S in sys_prim.dipoles])
With this primitive cell, we will perform a SpinWaveTheory
calculation of the structure factor $\mathcal{S}(𝐪,ω)$. The measurement ssf_perp
indicates projection of the spin structure factor $\mathcal{S}(𝐪,ω)$ perpendicular to the direction of momentum transfer, as appropriate for unpolarized neutron scattering. The isotropic FormFactor
for Co²⁺ dampens intensities at large $𝐪$.
formfactors = [1 => FormFactor("Co2")]
+@assert energy_per_site(sys_prim) ≈ -2J*(3/2)^2
Plotting sys_prim
shows the two spins within the primitive cell, as well as the larger conventional cubic cell for context.
plot_spins(sys_prim; color=[S[3] for S in sys_prim.dipoles])
With this primitive cell, we will perform a SpinWaveTheory
calculation of the structure factor $\mathcal{S}(𝐪,ω)$. The measurement ssf_perp
indicates projection of the spin structure factor $\mathcal{S}(𝐪,ω)$ perpendicular to the direction of momentum transfer, as appropriate for unpolarized neutron scattering. The isotropic FormFactor
for Co²⁺ dampens intensities at large $𝐪$.
formfactors = [1 => FormFactor("Co2")]
measure = ssf_perp(sys_prim; formfactors)
swt = SpinWaveTheory(sys_prim; measure)
SpinWaveTheory [Dipole mode]
2 atoms
@@ -37,8 +37,8 @@
[0, 0, 0] → [1/2, 0, 0] → [1/2, 1/2, 0] → [0, 0, 0]
Calculate single-crystal scattering intensities
along this path, for energies between 0 and 6 meV. Use plot_intensities
to visualize the result.
energies = range(0, 6, 300)
res = intensities(swt, path; energies, kernel)
-plot_intensities(res; units, title="CoRh₂O₄ LSWT")
Sometimes experimental data is only available as a powder average, i.e., as an average over all possible crystal orientations. Use powder_average
to simulate these intensities. Each $𝐪$-magnitude defines a spherical shell in reciprocal space. Consider 200 radii from 0 to 3 inverse angstroms, and collect 2000
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.
radii = range(0, 3, 200) # (1/Å)
+plot_intensities(res; units, title="CoRh₂O₄ LSWT")
Sometimes experimental data is only available as a powder average, i.e., as an average over all possible crystal orientations. Use powder_average
to simulate these intensities. Each $𝐪$-magnitude defines a spherical shell in reciprocal space. Consider 200 radii from 0 to 3 inverse angstroms, and collect 2000
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.
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="CoRh₂O₄ Powder Average")
This result can be compared to experimental neutron scattering data from Fig. 5 of Ge et al.
Settings
This document was generated with Documenter.jl version 1.7.0 on Friday 20 September 2024. Using Julia version 1.10.5.