compute_isosurfaces#

ifermi.surface.compute_isosurfaces(bands, kpoints, fermi_level, reciprocal_space, decimate_factor=None, decimate_method='quadric', smooth=False, calculate_dimensionality=False, property_interpolator=None, trim_to_first_bz=True)[source]#

Compute the isosurfaces at a particular energy level.

Parameters:
  • bands (dict[Spin, ndarray]) – The band energies, given as a dictionary of {spin: energies}, where energies has the shape (nbands, nkpoints).

  • kpoints (ndarray) – The k-points in fractional coordinates.

  • fermi_level (float) – The energy at which to calculate the Fermi surface.

  • reciprocal_space (ReciprocalCell) – The reciprocal space representation.

  • decimate_factor (Optional[float]) – If method is “quadric”, and factor is a floating point value then factor is the scaling factor by which to reduce the number of faces. I.e., final # faces = initial # faces * factor. If method is “quadric” but factor is an integer then factor is the target number of final faces. If method is “cluster”, factor is the voxel size in which to cluster points. Default is None (no decimation).

  • decimate_method (str) – Algorithm to use for decimation. Options are “quadric” or “cluster”.

  • smooth (bool) – If True, will smooth resulting isosurface. Requires PyMCubes. Smoothing algorithm will use constrained smoothing algorithm to preserve fine details if input dimension is lower than (500, 500, 500), otherwise will apply a Gaussian filter.

  • calculate_dimensionality (bool) – Whether to calculate isosurface dimensionality.

  • property_interpolator (Optional[LinearInterpolator]) – An interpolator class for interpolating properties onto the surface. If None, no properties will be calculated.

  • trim_to_first_bz (bool) – If true, only includes Fermi surface within one Brillouin zone. If false, include Fermi surface within entire supercell.

Return type:

dict[Spin, list[Isosurface]]

Returns:

A dictionary containing a list of isosurfaces for each spin channel.