Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor plotting code, support Brillouin.jl #328

Merged
merged 11 commits into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ authors = ["The Sunny team"]
version = "0.7.4"

[deps]
Brillouin = "23470ee3-d0df-4052-8b1a-8cbd6363e7f0"
CrystalInfoFramework = "6007d9b0-c6b2-11e8-0510-1d10e825f3f1"
DynamicPolynomials = "7c1d4256-1411-5781-91ec-d7bc3513ac07"
ElasticArrays = "fdbdab4c-e67f-52f5-8c3f-e7b388dad3d4"
Expand Down Expand Up @@ -35,6 +36,7 @@ PlottingExt = "Makie"
WGLMakiePrecompilesExt = "WGLMakie"

[compat]
Brillouin = "0.5.19"
CrystalInfoFramework = "0.7.0"
DynamicPolynomials = "0.6.0"
ElasticArrays = "1.2.12"
Expand Down
8 changes: 4 additions & 4 deletions docs/src/library.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ Private = false

## Optional Makie extensions

The following will be enabled through a package extension if either `GLMakie` or
`WGLMakie` is loaded.
Load a Makie graphics package (`GLMakie`, `WGLMakie`, or `CairoMakie`) to enable
the following extensions:

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

## Optional WriteVTK extensions

The following will be enabled through a package extension if `WriteVTK` is
loaded.
Load the `WriteVTK` package to enable the following extensions:

```@docs
export_vtk
Expand Down
13 changes: 8 additions & 5 deletions docs/src/versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
## v0.7.4
(In development)

* Better error message when a $g$-tensor is symmetry disallowed.
* Higher-precision convergence in [`minimize_energy!`](@ref).
* Fix [`minimize_energy!`](@ref) when used with [`set_vacancy_at!`](@ref).
* The `System` constructor now, by default, seeds its internal random number
generator with `seed=rand(UInt)`. Note that Julia's global random number
generator can itself be seeded with `Random.seed!`.
* 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.
* 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.

## v0.7.3
(Nov 12, 2024)
Expand Down
2 changes: 1 addition & 1 deletion examples/09_Disorder_KPM.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ plot_spins(sys; color=[S[3] for S in sys.dipoles], ndims=2)
qs = [[0, 0, 0], [1/3, 1/3, 0], [1/2, 0, 0], [0, 0, 0]]
labels = ["Γ", "K", "M", "Γ"]
path = q_space_path(cryst, qs, 150; labels)
kernel = lorentzian(fwhm=0.4);

# Perform a traditional spin wave calculation. The spectrum shows sharp modes
# associated with coherent excitations about the K-point ordering wavevector,
# ``𝐪 = [1/3, 1/3, 0]``.

kernel = lorentzian(fwhm=0.4)
energies = range(0.0, 3.0, 150)
swt = SpinWaveTheory(sys; measure=ssf_perp(sys))
res = intensities(swt, path; energies, kernel)
Expand Down
2 changes: 1 addition & 1 deletion examples/spinw_tutorials/SW11_La2CuO4.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ units = Units(:meV, :angstrom)
latvecs = lattice_vectors(1, 1, 10, 90, 90, 90)
positions = [[0, 0, 0]]
types = ["Cu"]
cryst = Crystal(latvecs, positions; types)
cryst = Crystal(latvecs, positions, 139; types)
view_crystal(cryst; ndims=2)

# Build a spin system using the exchange parameters from [R. Coldea, Phys. Rev.
Expand Down
Loading
Loading