Types

Index

Documentation

CrystalBase.KSegmentType
struct KSegment{T<:Real}

Segments of high-symmetry kpoint path, each segment is a continuous path between high-symmetry kpoints. Different segments are disconnected in the Brillouin zone.

See also KPath for an alternative representation of kpoint path.

Fields

  • recip_lattice: Reciprocal lattice vectors (in units of 1/L, where L is unit of length)

  • segments: Segments of high-symmetry kpoint path, each segment is a continuous path between high-symmetry kpoints. Different segments are disconnected in the Brillouin zone.

  • coords: Coordinates of high-symmetry kpoints
source
CrystalBase.KSegmentMethod
KSegment(lattice, atom_positions, atom_labels)

Get a KSegment for arbitrary cell (can be non-standard).

Requires using Spglib, Brillouin.

Arguments

  • lattice: 3 * 3, each column is a lattice vector
  • atom_positions: n_atoms-length vector of fractional coordinates
  • atom_labels or atom_numbers: n_atoms of atomic numbers (integer) or atomic labels (string)
source
CrystalBase.KSegmentMethod
KSegment(recip_lattice, kpoint_path)

Arguments

  • recip_lattice: each column is a reciprocal lattice vector
  • kpoint_path: a vector of paths, each path is a vector of two kpoints, each kpoint is a Pair of label and fractional coordinate, e.g., julia kpoint_path = [ [:Γ => [0.0, 0.0, 0.0], :M => [0.5, 0.5, 0.0]], [:M => [0.5, 0.5, 0.0], :R => [0.5, 0.5, 0.5]], ] This is the same as the returned kpoint_path of WannierIO.read_win().
source
CrystalBase.unicode_kpoint_labelsMethod
unicode_kpoint_labels(labels)

Convert labels of high-symmetry kpoints to unicode string.

Examples

CrystalBase.unicode_kpoint_labels(["GAMMA", "DELTA_0", "LAMBDA_1", "SIGMA_2", "X"])
# output
5-element Vector{String}:
 "Γ"
 "Δ₀"
 "Λ₁"
 "Σ₂"
 "X"
source
CrystalBase.KPathType
KPath(kseg)
KPath(kseg, n_points_first_segment)

Generate a KPath containing kpoint coordinates that are exactly the same as wannier90.

The kpoints are generated by the following criteria:

  • the kpath spacing of remaining segments are kept the same as the first segment
  • merge same high-symmetry labels at the corner between two segments; keep both labels if the two labels (ending of the 1st segment and starting point of the 2nd segment) are different

Arguments

  • kseg: a KSegment
  • n_points_first_segment: number of kpoints in the first segment, remaining segments will have the same spacing as the 1st segment. The default value is 100, which is the same as wannier90 default value of bands_num_points.
Note

This reproduce exactly the wannier90 behavior, if

  • the kseg is generated from the kpoint_path obtained by WannierIO.read_win which parses the kpoint_path block of win file,
  • the n_points is the same as wannier90 win file input parameter bands_num_points, which again can be obtained by WannierIO.read_win.
source
CrystalBase.KPathType
struct KPath{T<:Real}

Kpoint path in the Brillouin zone.

Storing explicitly the kpoint coordinates along the path, as well as the indices and labels of high-symmetry kpoints.

See also KSegment for an alternative representation of kpoint path, which only stores the segments of high-symmetry kpoint path but not the explicit kpoint coordinates along the path.

Fields

  • recip_lattice: Reciprocal lattice vectors (in units of 1/L, where L is unit of length)

  • points: Fractional kpoint coordinates along the kpath

  • indices: Indices of high-symmetry kpoints along the kpath

  • labels: Labels of high-symmetry kpoints

source
CrystalBase.group_nearby_indicesMethod
group_nearby_indices(indices)

Group consecutive high-symmetry points.

If two high-symmetry kpoints are neighbors, group them together.

Arguments

  • indices: indices of high-symmetry kpoints, start from 1

Return

  • groups: a vector of vectors, if the inner vector contains more than 1 index, it means those indices are neighbors and are grouped together.

Example

CrystalBase.group_nearby_indices([1, 2, 4, 5, 6])
# output
2-element Vector{Vector{Int64}}:
 [1, 2]
 [4, 5, 6]
source
CrystalBase.linear_pathFunction
linear_path(kpoints_cart)
linear_path(kpoints_cart, indices)

Get a 1D vector of cumulative distance along the kpath.

source
CrystalBase.linear_pathMethod
linear_path(kpath)

Get a 1D vector of cumulative distance along the kpath, and the corresponding tick indices and labels for high-symmetry kpoints.

Return

  • x: 1D vector of cumulative distance along the kpath
  • tick_indices: indices of high-symmetry kpoints after merging
  • tick_labels: labels of high-symmetry kpoints after merging
source
CrystalBase.merge_nearby_labelsMethod
merge_nearby_labels(indices, labels)

Merge consecutive high-symmetry points.

If two high-symmetry kpoints are neighbors, merge them into one, with label X|Y, where X and Y are the original labels of the two kpoints, respectively.

Arguments

  • indices: indices of high-symmetry kpoints, start from 1
  • labels: labels of high-symmetry kpoints

Return

  • tick_indices: indices of high-symmetry kpoints after merging
  • tick_labels: labels of high-symmetry kpoints after merging
source