Types
Index
CrystalBase.KPathCrystalBase.KPathCrystalBase.KSegmentCrystalBase.KSegmentCrystalBase.KSegmentCrystalBase.group_nearby_indicesCrystalBase.linear_pathCrystalBase.linear_pathCrystalBase.merge_nearby_labelsCrystalBase.unicode_kpoint_labelsCrystalBase.unicode_kpoint_labels!
Documentation
CrystalBase.KSegment — Type
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
CrystalBase.KSegment — Method
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 vectoratom_positions:n_atoms-length vector of fractional coordinatesatom_labelsoratom_numbers:n_atomsof atomic numbers (integer) or atomic labels (string)
CrystalBase.KSegment — Method
KSegment(recip_lattice, kpoint_path)
Arguments
recip_lattice: each column is a reciprocal lattice vectorkpoint_path: a vector of paths, each path is a vector of two kpoints, each kpoint is aPairof 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 returnedkpoint_pathofWannierIO.read_win().
CrystalBase.unicode_kpoint_labels — Method
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"CrystalBase.KPath — Type
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: aKSegmentn_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 ofbands_num_points.
This reproduce exactly the wannier90 behavior, if
- the
ksegis generated from thekpoint_pathobtained byWannierIO.read_winwhich parses thekpoint_pathblock ofwinfile, - the
n_pointsis the same as wannier90winfile input parameterbands_num_points, which again can be obtained byWannierIO.read_win.
CrystalBase.KPath — Type
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 kpathindices: Indices of high-symmetry kpoints along the kpathlabels: Labels of high-symmetry kpoints
CrystalBase.group_nearby_indices — Method
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]CrystalBase.linear_path — Function
linear_path(kpoints_cart)
linear_path(kpoints_cart, indices)
Get a 1D vector of cumulative distance along the kpath.
CrystalBase.linear_path — Method
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 kpathtick_indices: indices of high-symmetry kpoints after mergingtick_labels: labels of high-symmetry kpoints after merging
CrystalBase.merge_nearby_labels — Method
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 1labels: labels of high-symmetry kpoints
Return
tick_indices: indices of high-symmetry kpoints after mergingtick_labels: labels of high-symmetry kpoints after merging
CrystalBase.unicode_kpoint_labels! — Method
unicode_kpoint_labels!(kpath)
Convert labels of high-symmetry kpoints in kpath to unicode string.