SunnySuite / Sunny.jl

Spin dynamics and generalization to SU(N) coherent states
Other
65 stars 19 forks source link

Better support for Brillouin.jl #248

Open kbarros opened 4 months ago

kbarros commented 4 months ago

The package Brillouin.jl conveniently reports high-symmetry k-points and paths. This is especially useful when the user specifies the chemical cell in a nonconventional way.

In the special case where a Sunny.Crystal has complete chemical information, example usage looks like this:

using Brillouin, Spglib
kp = irrfbz_path(Spglib.Cell(cryst.latvecs, cryst.positions, cryst.types))

Which outputs:

KPath{3} (6 points, 3 paths, 12 points in paths):
 points: :M => [0.5, 0.0, 0.0]
         :A => [0.0, 0.0, 0.5]
         :H => [0.333333, 0.333333, 0.5]
         :K => [0.333333, 0.333333, 0.0]
         :Γ => [0.0, 0.0, 0.0]
         :L => [0.5, 0.0, 0.5]
  paths: [:Γ, :M, :K, :Γ, :A, :L, :H, :A]
         [:L, :M]
         [:H, :K]
   ...

We should make it easier and more robust. Two options:

  1. Crystal could store the internally built Spglib.Cell to facilitate integration with Brillouin.jl on the user side.
  2. If we're willing to make Brillouin.jl a dependency, then Crystal could directly store the special k-points directly.