Skip to content

Commit

Permalink
Added Exception for user if no fermisurface is found the structure is…
Browse files Browse the repository at this point in the history
… probably not metallic
  • Loading branch information
lllangWV committed Aug 23, 2024
1 parent acc721c commit b34f6a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyprocar/core/fermisurface3D.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ def _combine_isosurfaces(self):
band_indices_cells_list=[i_surface]*n_cells
surface_band_indices_cells.extend(band_indices_cells_list)


if surface == None:
raise ValueError("No Fermi surface found. The structure is probably not metallic, so there will be no Fermi surface.")

# Setting band indices on the points of the combined surfaces
surface_band_indices_points.reverse()
surface.point_data['band_index']=np.array(surface_band_indices_points)
Expand Down

0 comments on commit b34f6a6

Please sign in to comment.