Package: ifermi
📖Official Documentation📖🙋Support Forum🙋📝JOSS Paper📝IFermi is a Python (3.9+) library and set of command-line tools for the generation,
analysis, and visualisation of Fermi surfaces and Fermi slices. The goal of the library
is to provide fully featured FermiSurface and FermiSlice objects that allow for easy
manipulation and analysis. The main features include:Interpolation of electronic band structures onto dense k-point meshes.Extraction of Fermi surfaces and Fermi slices from electronic band structures.Projection of arbitrary properties onto Fermi surfaces and Fermi slices.Tools to calculate Fermi surface dimensionality, orientation, and averaged projections,
including Fermi velocities.Interactive visualisation of Fermi surfaces and slices, with support formayavi,plotlyandmatplotlib.Generation and visualisation of spin-texture.IFermi's command-line tools only work with VASP calculations but support for additional
DFT packages will be added in the future.Quick startTheonline documentationprovides a full
description of the available command-line options.AnalysisFermi surface properties, including dimensionality and orientation can be extracted
from a vasprun.xml file using:ifermiinfo--propertyvelocityFermi Surface Summary
=====================

  # surfaces: 5
  Area: 32.75 Å⁻²
  Avg velocity: 9.131e+05 m/s

Isosurfaces
~~~~~~~~~~~

      Band    Area [Å⁻²]    Velocity avg [m/s]   Dimensionality    Orientation
    ------  ------------  --------------------  ----------------  -------------
         6         1.944             7.178e+05         2D           (0, 0, 1)
         7         4.370             9.092e+05      quasi-2D        (0, 0, 1)
         7         2.961             5.880e+05         2D           (0, 0, 1)
         8         3.549             1.105e+06      quasi-2D        (0, 0, 1)
         8         3.549             1.105e+06      quasi-2D        (0, 0, 1)VisualisationThree-dimensional Fermi surfaces can be visualized from avasprun.xmlfile using:ifermiplotThe two-dimensional slice of a Fermi surface along the plane specified by the miller
indices (j k l) and distance d can be plotted from avasprun.xmlfile using:ifermiplot--slicejkldPython libraryTheifermicommand line tools are build on the IFermi Python library. Here is an
example of how to load DFT calculation outputs, interpolate the energies onto a dense mesh,
generate a Fermi surface, calculate Fermi surface properties, and visualise the surface.
A more complete summary of the API is given in theAPI introduction pageand in theAPI Reference pagein the documentation.frompymatgen.io.vasp.outputsimportVasprunfromifermi.surfaceimportFermiSurfacefromifermi.interpolateimportFourierInterpolatorfromifermi.plotimportFermiSlicePlotter,FermiSurfacePlotter,save_plot,show_plotfromifermi.kpointsimportkpoints_from_bandstructure# load VASP calculation outputsvr=Vasprun("vasprun.xml")bs=vr.get_band_structure()# interpolate the energies onto a dense k-point meshinterpolator=FourierInterpolator(bs)dense_bs,velocities=interpolator.interpolate_bands(return_velocities=True)# generate the Fermi surface and calculate the dimensionalityfs=FermiSurface.from_band_structure(dense_bs,mu=0.0,wigner_seitz=True,calculate_dimensionality=True)# generate the Fermi surface and calculate the group velocity at the# center of each triangular facedense_kpoints=kpoints_from_bandstructure(dense_bs)fs=FermiSurface.from_band_structure(dense_bs,mu=0.0,wigner_seitz=True,calculate_dimensionality=True,property_data=velocities,property_kpoints=dense_kpoints)# number of isosurfaces in the Fermi surfacefs.n_surfaces# number of isosurfaces for each Spin channelfs.n_surfaces_per_spin# the total area of the Fermi surfacefs.area# the area of each isosurfacefs.area_surfaces# loop over all isosurfaces and check their properties# the isosurfaces are given as a list for each spin channelforspin,isosurfacesinfs.isosurfaces.items():forisosurfaceinisosurfaces:# the dimensionality (does the surface cross periodic boundaries)isosurface.dimensionality# what is the orientationisosurface.orientation# does the surface have face propertiesisosurface.has_properties# calculate the norms of the propertiesisosurface.properties_norms# calculate scalar projection of properties on to [0 0 1] vectorisosurface.scalar_projection((0,0,1))# uniformly sample the surface faces to a consistent densityisosurface.sample_uniform(0.1)# plot the Fermi surfacefs_plotter=FermiSurfacePlotter(fs)plot=fs_plotter.get_plot()# generate Fermi slice along the (0 0 1) plane going through the Γ-point.fermi_slice=fs.get_fermi_slice((0,0,1))# number of isolines in the slicefermi_slice.n_lines# do the lines have segment propertiesfermi_slice.has_properties# plot sliceslice_plotter=FermiSlicePlotter(fermi_slice)plot=slice_plotter.get_plot()save_plot(plot,"fermi-slice.png")# saves the plot to a fileshow_plot(plot)# displays an interactive plotCiting IFermiIf you find IFermi useful, please encourage its development by citing the followingpaperin your research output:Ganose, A. M., Searle, A., Jain, A., Griffin, S. M., IFermi: A python library for Fermi
surface generation and analysis. Journal of Open Source Software, 2021, 6 (59), 3089InstallationThe recommended way to install IFermi is in a conda environment.condacreate--nameifermipipcmakenumpy
condaactivateifermi
condainstall-cconda-forgepymatgenboltztrap2pyfftw
pipinstallifermiIFermi is currently compatible with Python 3.9+ and relies on a number of
open-source python packages, specifically:pymatgenfor parsing DFT calculation outputs.BoltzTrap2for band structure interpolation.trimeshfor manipulating isosurfaces.matplotlib,mayavi, andplotlyfor three-dimensional plotting.Running testsThe integration tests can be run to ensure IFermi has been installed correctly. First
download the IFermi source and install the test requirements.git clone https://github.com/fermisurfaces/IFermi.git
cd IFermi
pip install .[tests]The tests can be run in the IFermi folder using:pytestNeed Help?Ask questions about the IFermi Python API and command-line tools on theIFermi
support forum.
If you've found an issue with IFermi, please submit a bug reporthere.What’s new?Track changes to IFermi through thechangelog.ContributingWe greatly appreciate any contributions in the form of a pull request.
Additional information on contributing to IFermi can be foundhere.
We maintain a list of all contributorshere.LicenseIFermi is made available under the MIT License (see LICENSE file).AcknowledgementsDeveloped by Amy Searle and Alex Ganose.
Sinéad Griffin designed and led the project.