sisl.io.siesta.bandsSileSiesta
- class sisl.io.siesta.bandsSileSiesta
Bases:
SileSiesta
Bandstructure information
Plotting
Plotting functions for the
bandsSileSiesta
class.plot.bands
(*[, Erange, E0, ...])Creates a
BandsData
object and then plots aBandsPlot
from it.Methods
base_directory
([relative_to])Retrieve the base directory of the file, relative to the path relative_to
close
()dir_file
([filename, filename_base])File of the current Sile
read
(*args, **kwargs)Generic read method which should be overloaded in child-classes
read_data
([as_dataarray])Returns data associated with the bands file
Returns the Fermi level in the bands file
write
(*args, **kwargs)Generic write method which should be overloaded in child-classes
Attributes
- base_directory(relative_to='.')
Retrieve the base directory of the file, relative to the path relative_to
- close()
- dir_file(filename=None, filename_base='')
File of the current Sile
- plot.bands(*, Erange=None, E0=0.0, E_axis='y', bands_range=None, spin=None, bands_style={'color': 'black', 'dash': 'solid', 'opacity': 1, 'width': 1}, spindown_style={'color': 'blue', 'width': 1}, colorscale=None, gap=False, gap_tol=0.01, gap_color='red', gap_marker={'size': 7}, direct_gaps_only=False, custom_gaps=[], line_mode='line', group_legend=True, backend='plotly')
Creates a
BandsData
object and then plots aBandsPlot
from it.- Parameters:
Erange (Optional[tuple[float, float]]) – The energy range to plot. If None, the range is determined by bands_range.
E0 (float) – The energy reference.
E_axis (Literal['x', 'y']) – Axis to plot the energies.
bands_range (Optional[tuple[int, int]]) – The bands to plot. Only used if Erange is None. If None, the 15 bands above and below the Fermi level are plotted.
spin (Optional[Literal[0, 1]]) – Which spin channel to display. Only meaningful for spin-polarized calculations. If None and the calculation is spin polarized, both are plotted.
bands_style (StyleSpec) – Styling attributes for bands.
spindown_style (StyleSpec) – Styling attributes for the spin down bands (if present). Any missing attribute will be taken from bands_style.
colorscale (Optional[Colorscale]) – Colorscale to use for the bands in case the color attribute is an array of values. If None, the default colorscale is used for each backend.
gap (bool) – Whether to display the gap.
gap_tol (float) – Tolerance in k for determining whether two gaps are the same.
gap_color (str) – Color of the gap.
gap_marker (dict) – Marker styles for the gap (as
plotly
marker’s styles).direct_gaps_only (bool) – Whether to only display direct gaps.
custom_gaps (Sequence[dict]) – List of custom gaps to display. See the showcase notebooks for examples.
line_mode (Literal['line', 'scatter', 'area_line']) – The method used to draw the band lines.
group_legend (bool) –
Whether to group all bands in the legend to show a single legend item.
If the bands are spin polarized, bands are grouped by spin channel.
backend (str) – The backend to use to generate the figure.
- Return type:
See also
BandsPlot
The plot class used to generate the plot.
BandsData
The class to which data is converted.
- read(*args, **kwargs)
Generic read method which should be overloaded in child-classes
- Parameters:
kwargs – keyword arguments will try and search for the attribute
read_<>
and call it with the remaining**kwargs
as arguments.
- read_data(as_dataarray=False)[source]
Returns data associated with the bands file
The energy levels are shifted with respect to the Fermi-level.
- Parameters:
as_dataarray (
boolean
, optional) – if True, the information is returned as anxarray.DataArray
Ticks (if read) are stored as an attribute of the DataArray (under array.ticks and array.ticklabels)
- write(*args, **kwargs)
Generic write method which should be overloaded in child-classes
- Parameters:
**kwargs – keyword arguments will try and search for the attribute write_ and call it with the remaining
**kwargs
as arguments.
- property base_file
File of the current Sile
- property file
File of the current Sile
- plot
Plotting functions for the
bandsSileSiesta
class.