FermiSlice

class ifermi.slice.FermiSlice(isolines, reciprocal_slice, structure)[source]

Bases: MSONable

A FermiSlice object is a 2D slice through a Fermi surface.

Variables:
  • isolines – A dict containing a list of isolines for each spin channel.

  • reciprocal_space – A reciprocal slice defining the intersection of the slice with the Brillouin zone edges.

  • structure – The structure.

all_lines(spins=None, band_index=None)[source]

Get the segments for all isolines.

Parameters:
  • spins (Spin | Collection[Spin] | None) – One or more spin channels to select. Default is all spins available.

  • band_index (int | list | dict | None) –

    A choice of band indices (0-based). Valid options are:

    • A single integer, which will select that band index in both spin channels (if both spin channels are present).

    • A list of integers, which will select that set of bands from both spin channels (if both a present).

    • A dictionary of {Spin.up: band_index_1, Spin.down: band_index_2}, where band_index_1 and band_index_2 are either single integers (if one wishes to plot a single band for that particular spin) or a list of integers. Note that the choice of integer and list can be different for different spin channels.

    • None in which case all bands will be selected.

Return type:

list[ndarray]

Returns:

A list of segments arrays.

all_properties(spins=None, band_index=None, projection_axis=None, norm=False)[source]

Get the properties for all isolines.

Parameters:
  • spins (Spin | Collection[Spin] | None) – One or more spin channels to select. Default is all spins available.

  • band_index (int | list | dict | None) –

    A choice of band indices (0-based). Valid options are:

    • A single integer, which will select that band index in both spin channels (if both spin channels are present).

    • A list of integers, which will select that set of bands from both spin channels (if both a present).

    • A dictionary of {Spin.up: band_index_1, Spin.down: band_index_2}, where band_index_1 and band_index_2 are either single integers (if one wishes to plot a single band for that particular spin) or a list of integers. Note that the choice of integer and list can be different for different spin channels.

    • None in which case all bands will be selected.

  • projection_axis (tuple[int, int, int] | None) – A (3, ) in array of the axis to project the properties onto (vector properties only).

  • norm (bool) – Calculate the norm of the properties (vector properties only). Ignored if projection_axis is set.

Return type:

list[ndarray]

Returns:

A list of properties arrays for each isosurface.

as_dict()[source]

Get a json-serializable dict representation of a FermiSlice.

Return type:

dict

classmethod from_dict(d)[source]

Return FermiSlice object from a dict.

Return type:

FermiSlice

classmethod from_fermi_surface(fermi_surface, plane_normal, distance=0)[source]

Get a slice through the Fermi surface.

The slice is defined by the intersection of a plane with the Fermi surface.

Parameters:
  • fermi_surface – A Fermi surface object.

  • plane_normal (tuple[int, int, int]) – (3, ) int array of the plane normal in fractional indices.

  • distance (float) – The distance from the center of the Brillouin zone (Γ-point).

Return type:

FermiSlice

Returns:

The Fermi slice.

property has_properties: bool

Whether all isolines have segment properties.

property n_lines: int

Number of isolines in the Fermi slice.

property n_lines_per_band: dict[Spin, dict[int, int]]

Get number of lines for each band index for each spin channel.

Returned as a dict of {spin: {band_idx: count}}.

property n_lines_per_spin: dict[Spin, int]

Get number of lines per spin channel.

Returned as a dict of {spin: count}.

property properties_ndim: int

Dimensionality of isoline properties.

property spins: tuple[Spin]

The spin channels in the Fermi slice.