Band structure

There are some functions for quick peeks of band structures.

Contents

Index

API

WannierPlots._get_band_plotMethod
_get_band_plot(
    x::AbstractVector{T},
    E::AbstractArray{T};
    fermi_energy::Union{Nothing,T}=nothing,
    shift_fermi::Bool=false,
    symm_idx::Union{Nothing,AbstractArray{Int}}=nothing,
    symm_label::Union{Nothing,AbstractVector{String}}=nothing,
    color="black",
    kwargs...,
) where {T<:Real}

Return a PlotlyJS Plot struct for the band structure.

Arguments

  • x: 1D array for x axis
  • E: band energies, 1D of length n_kpts, or 2D array of size n_bands * n_kpts

Keyword Arguments

  • fermi_energy: Fermi energy, will draw a horizontal line
  • shift_fermi: shift the Fermi energy to 0
  • symm_idx: indices of high-symmetry kpoints
  • symm_label: labels of high-symmetry kpoints
  • color: color of the band
  • kwargs: additional keyword arguments for PlotlyJS, the line attribute of scatter. For a full customization, directly manipulate the returned Plot struct. See PlotlyJS documentation.
source
WannierPlots._merge_consecutive_labelsMethod
_merge_consecutive_labels(
    symm_idx::AbstractArray{Int}, symm_label::AbstractVector{String}
)

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

  • symm_idx: indices of high-symmetry kpoints, start from 1
  • symm_label: labels of high-symmetry kpoints
source
WannierPlots.plot_bandMethod
plot_band(x::AbstractVector, E::AbstractArray; kwargs...)

Plot band structure.

Arguments

  • x: 1D array for x axis
  • E: band energies, 1D of length n_kpts, or 2D array of size n_bands * n_kpts

Keyword Arguments

See also the keyword arguments of _get_band_plot.

source
WannierPlots.plot_bandMethod
plot_band(kpi::KPathInterpolant, E::AbstractArray; kwargs...)

Plot band structure.

Arguments

  • kpi: KPathInterpolant
  • E: band energies, 1D of length n_kpts, or 2D array of size n_bands * n_kpts

Keyword Arguments

See also the keyword arguments of _get_band_plot.

source
WannierPlots.plot_band_diffMethod
plot_band_diff(kpi::KPathInterpolant, E1::AbstractArray, E22::AbstractArray; kwargs...)

Compare two band structures.

E1 in black, while E2 in dashed orange.

Arguments

  • kpi: KPathInterpolant
  • E1: band energies, 1D of length n_kpts, or 2D array of size n_bands * n_kpts
  • E2: band energies, 1D of length n_kpts, or 2D array of size n_bands * n_kpts

Keyword Arguments

See also the keyword arguments of _get_band_plot.

source