Skip to content

Commit

Permalink
Tweak docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kbarros committed Dec 6, 2024
1 parent 46b8b7d commit 5d18a85
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Documenter.makedocs(;
"Contributed" => contributed_mds,
],
"library.md",
"Details" => [
"Notes and Details" => [
"structure-factor.md",
"renormalization.md",
"parallelism.md",
Expand Down
8 changes: 4 additions & 4 deletions docs/src/library.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ Load a Makie graphics package (`GLMakie`, `WGLMakie`, or `CairoMakie`) to enable
the following extensions:

```@docs
plot_spins
plot_spins!
view_bz
view_crystal
plot_intensities
plot_intensities!
view_crystal
view_qspace
plot_spins
plot_spins!
```

## Optional WriteVTK extensions
Expand Down
4 changes: 2 additions & 2 deletions docs/src/structure-factor.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ where $\tilde{𝐪}$ expresses momentum in dimensionless reciprocal lattice unit

```math
\begin{equation}
𝐪 = \tilde{k}_1 𝐛_1 + \tilde{k}_2 𝐛_2 + \tilde{k}_3 𝐛_3,
𝐪 = \tilde{q}_1 𝐛_1 + \tilde{q}_2 𝐛_2 + \tilde{q}_3 𝐛_3,
\end{equation}
```

and $𝐛_{\{1,2,3\}}$ are the reciprocal lattice vectors. Equivalently,
$\tilde{k}_μ ≡ 𝐪 ⋅ 𝐚_μ / 2π$.
$\tilde{q}_μ ≡ 𝐪 ⋅ 𝐚_μ / 2π$.

It will be convenient to introduce a dynamical correlation for the operators on
sublattices $i$ and $j$ only,
Expand Down
2 changes: 1 addition & 1 deletion docs/src/versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Add [`print_irreducible_bz_paths`](@ref), which builds on
[Brillouin.jl](https://github.com/thchr/Brillouin.jl) and
[SeeK-path](http://www.materialscloud.org/tools/seekpath/).
* Add prototype function [`view_qspace`](@ref) for visualizing reciprocal-space
* Add prototype function [`view_bz`](@ref) for visualizing reciprocal-space
objects in the context of the first Brillouin zone.

## v0.7.3
Expand Down
4 changes: 2 additions & 2 deletions ext/PlottingExt/ViewQSpace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ end


"""
view_qspace(crystal::Crystal, objs...; orthographic=false, compass=true)
view_bz(crystal::Crystal, objs...; orthographic=false, compass=true)
**Experimental**
Expand All @@ -59,7 +59,7 @@ visualize custom paths or grids in reciprocal space.
- `orthographic`: Use orthographic camera perspective.
- `compass`: If true, draw Cartesian axes in bottom left.
"""
function Sunny.view_qspace(cryst::Crystal, objs...; orthographic=false, compass=true, size=(768, 512))
function Sunny.view_bz(cryst::Crystal, objs...; orthographic=false, compass=true, size=(768, 512))
fig = Makie.Figure(; size)

# Main scene
Expand Down
5 changes: 3 additions & 2 deletions src/Sunny.jl
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ end
extension_fns = [
# ext/PlottingExt
:Makie => [:plot_spins!, :plot_spins, :plot_intensities!, :plot_intensities,
:view_crystal, :view_qspace],
:view_crystal, :view_bz],
# ext/ExportVTKExt
:WriteVTK => [:export_vtk],
]
Expand All @@ -169,7 +169,8 @@ function __init__()
fn = Symbol(exc.f)
for (pkg, fns) in extension_fns
if in(fn, fns) && !is_pkg_loaded(pkg)
printstyled(io, "\nImport package $pkg to enable `$fn`.\n"; bold=true)
pkgstr = (pkg == :Makie) ? "a variant of Makie" : "package $pkg"
printstyled(io, "\nImport $pkgstr to enable `$fn`.\n"; bold=true)
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions src/Symmetry/BZPaths.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ originally formulated in Ref. [1] and implemented in
functionality from the [Brillouin.jl](https://github.com/thchr/Brillouin.jl)
package.
See also [`view_qspace`](@ref) for an interactive visualization of these
See also [`view_bz`](@ref) for an interactive visualization of these
high-symmetry paths.
## References
Expand All @@ -44,8 +44,8 @@ high-symmetry paths.
(2017)](https://doi.org/10.1016/j.commatsci.2016.10.015).
"""
function print_irreducible_bz_paths(cryst::Crystal)
try
(; points, paths) = irreducible_bz_paths(cryst)
(; points, paths) = try
irreducible_bz_paths(cryst)
catch e
if startswith(e.msg, "Triclinic")
rethrow(ErrorException("""Triclinic lattice angles must currently be all-acute or all-obtuse.
Expand Down

0 comments on commit 5d18a85

Please sign in to comment.