Skip to content

Commit

Permalink
Refine documentation and prepare Sunny 0.7.4 release (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
kbarros authored Dec 6, 2024
1 parent b3aaa27 commit 854f1f7
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 20 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
14 changes: 8 additions & 6 deletions docs/src/versions.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# Version History

## v0.7.4
(In development)
(Dec 6, 2024)

* Higher-precision convergence in [`minimize_energy!`](@ref).
* Make [`minimize_energy!`](@ref) compatible with [`set_vacancy_at!`](@ref).
* The `System` constructor now seeds its internal random number generator using
Julia's task-local random number generator.
* The [`System`](@ref) constructor now seeds its internal random number
generator using Julia's task-local random number generator.
* 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
objects in the context of the first Brillouin zone.
* Fix `load_nxs` for compatibility with recent JLD2.
* Add function [`view_bz`](@ref) for visualizing reciprocal-space objects in the
context of the first Brillouin zone.
* Fix [`load_nxs`](@ref) for compatibility with recent JLD2.
* Fix Makie precompiles for faster time-to-first-plot in Julia 1.11 ([PR
#329](https://github.com/SunnySuite/Sunny.jl/pull/329)).

## v0.7.3
(Nov 12, 2024)
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

2 comments on commit 854f1f7

@kbarros
Copy link
Member Author

@kbarros kbarros commented on 854f1f7 Dec 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/120871

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.7.4 -m "<description of version>" 854f1f71398198138fa73217dc1e404fea253e43
git push origin v0.7.4

Please sign in to comment.