FatBands¶
- class FatBands(bands: Bands, data: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], labels: dict | None = None)¶
Band structure with data per k-point, like SOC or pDOS
- Parameters:
- bands
Bands
The bands on wich the data is written
- dataarray_like
An array of values wich were computed as a function of the bands.k_path. It can be 2D or 3D. In the latter case each column represents the result of a different function applied to the same
variable
input.- labelsdict
Plot labels: ‘data’, ‘title’ and ‘columns’.
- bands
Attributes
callsig
num_bands
Methods
_decorate_plot
([point_labels, ax])Decorate the band structure
_point_names
(k_points)colorbar
(**kwargs)Draw a colorbar with the label of
Sweep.data
dos
([energies, broadening])Calculate the density of states as a function of energy
line_plot
([point_labels, ax, idx, plot_colorbar])Line plot of the band structure with the color of the lines the data of the FatBands.
plot
([point_labels, ax, legend])Line plot of the band structure with the given data
plot_bands
(**kwargs)Line plot of the band structure like in Bands.
plot_kpath
([point_labels])Quiver plot of the k-path along which the bands were computed
reduced
([columns, orbitals, fill_other])Return a copy where the data is summed over the columns
with_data
(data)Return a copy of this result object with different data
- colorbar(**kwargs)¶
Draw a colorbar with the label of
Sweep.data
- dos(energies: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None = None, broadening: float | None = None) Series ¶
Calculate the density of states as a function of energy
\[\text{DOS}(E) = \frac{1}{c \sqrt{2\pi}} \sum_n{e^{-\frac{(E_n - E)^2}{2 c^2}}}\]for each \(E\) in
energies
, where \(c\) isbroadening
and \(E_n\) iseigenvalues[n]
.- Parameters:
- energiesarray_like
Values for which the DOS is calculated. Default: min/max from Bands().energy, subdivided in 100 parts [ev].
- broadeningfloat
Controls the width of the Gaussian broadening applied to the DOS. Default: 0.05 [ev].
- Returns:
- line_plot(point_labels: List[str] | None = None, ax: Axes | None = None, idx: int = 0, plot_colorbar: bool = True, **kwargs) LineCollection | None ¶
Line plot of the band structure with the color of the lines the data of the FatBands.
- Parameters:
- point_labelsOptional[List[str]]
Labels for the
k_points
.- axOptional[plt.Axes]
The Axis to plot the bands on.
- idxint
The i-th column to plot. Default: 0.
- plot_colorbarbool
Show also the colorbar.
- **kwargs
Forwarded to
matplotlib.collection.LineCollection()
.
- plot(point_labels: List[str] | None = None, ax: Axes | None = None, legend: bool = True, **kwargs) List[PathCollection] | None ¶
Line plot of the band structure with the given data
- Parameters:
- point_labelsOptional[List[str]]
Labels for the
k_points
.- axOptional[plt.Axes]
The Axis to plot the bands on.
- legendbool
Plot the legend of the bands on the axes.
- **kwargs
Forwarded to
plt.plot()
.
- plot_kpath(point_labels: List[str] | None = None, **kwargs) None ¶
Quiver plot of the k-path along which the bands were computed
Combine with
Lattice.plot_brillouin_zone()
to see the path in context.- Parameters:
- point_labelsOptional[List[str]]
Labels for the k-points.
- **kwargs
Forwarded to
quiver()
.
- reduced(columns: List[int] | None = None, orbitals: List[str] | None = None, fill_other: float = 0.0) FatBands ¶
Return a copy where the data is summed over the columns
Only applies to results which may have multiple columns of data, e.g. results for multiple orbitals for LDOS calculation.
- Parameters:
- columnsOptional[List[int]]
The colummns to contract to the new array. The length of
columns
agrees with the dimensions of data.shape[2]. The value at each position corresponds to the new column of the new Series object- orbitals: Optional[List[str]]
Optional new list of entries for the
orbitals
label inlabels
- fill_otherfloat
In case an array is made with a new column, fill it with this value. Default: 0.