📖📖 Online Documentation 📖📖
IFermi is a package for plotting Fermi surfaces and from ab initio calculation outputs. The main features include:
- Plotting three-dimensional Fermi surfaces, with interactive plotting supported by mayavi, plotly and matplotlib.
- Plotting slices of three-dimensional Fermi surfaces along a specified plane.
IFermi currently only supports VASP calculations but support for additional DFT packages will be added in the future.
Example
An example of the Fermi surface and a two-dimensional slice for MgB2 is shown below:
Usage
The online documentation provides a full
description of the available options. To summarise, three-dimensional Fermi surfaces can
be plotted from a vasprun.xml file using:
ifermi
The two-dimensional slice of a Fermi slices along the plane specified by the miller
indices (A B C) and distance d can be plotted from a vasprun.xml file using:
ifermi --slice A B C d
Python interface
Alternatively, IFermi can be controlled using the Python API. A full summary of the API is given in the API introduction page in the documentation.
The core classes in IFermi are:
Inerpolator: to take a band structure on a uniform k-point mesh and interpolate it onto a denser mesh.FermiSurface: to store isosurfaces and reciprocal lattice information.FermiSurfacePlotter: to plot a Fermi surface from aFermiSurfaceobject.
A minimal working example to plot the Fermi surface from a vasprun.xml file is:
from pymatgen.io.vasp.outputs import Vasprun
from ifermi.fermi_surface import FermiSurface
from ifermi.interpolator import Interpolator
from ifermi.plotter import FermiSurfacePlotter, show_plot, save_plot
vr = Vasprun("vasprun.xml")
bs = vr.get_band_structure()
# interpolate the energies to a finer k-point mesh
interpolator = Interpolator(bs)
dense_bs, kmesh = interpolator.interpolate_bands(interpolation_factor=10)
fs = FermiSurface.from_band_structure(dense_bs, kmesh, mu=0.0, wigner_seitz=True)
plotter = FermiSurfacePlotter(fs)
plot = plotter.get_plot(plot_type='plotly')
save_plot(plot, "fermi-surface.png") # saves the plot to a file
show_plot(plot) # displays an interactive plot
Note, if you're not running the example in a notebook then it must be proceeded by if __name__ == '__main__':.
Installation
IFermi can be installed with the command:
pip install ifermi
IFermi is currently compatible with Python 3.5+ and relies on a number of open-source python packages, specifically:
- pymatgen for parsing VASP calculation output.
- BoltzTrap2 for band structure interpolation.
- matplotlib, mayavi, and plotly for three-dimensional plotting.
What’s new?
Track changes to IFermi through the changelog.
Contributing
We greatly appreciate any contributions in the form of Pull Request. We maintain a list of all contributors here.
License
IFermi is made available under the MIT License.
Acknowledgements
Alex Ganose for developing/improving code and documentation. Sinead Griffin for suggesting the project.
Metadata
Release files for ifermi 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ifermi-0.1.4.tar.gz | 3.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ifermi-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.1 MB
Release files / ifermi-0.1.4.tar.gz
| Download URL | ifermi-0.1.4.tar.gz |
|---|---|
| Size | 3.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eea234e01b8e6b27dd3aab9b87789c9402f47a885163fa4c054af299dc3219ff
|
|
BLAKE2b-256 checksum How to use checksums |
f199dbe8ea5ef9606b2650a900d6e5cf578bfe46b10bed9c4523601f5fde7118
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
|
Release files / ifermi-0.1.4-py3-none-any.whl
| Download URL | ifermi-0.1.4-py3-none-any.whl |
|---|---|
| Size | 26.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
be531d9b6e345e86efb94864719be9838af570717d31ca4dfab47099a2b3fb9c
|
|
BLAKE2b-256 checksum How to use checksums |
dfe808ccef5bcbcd68d5af52c71f95767a3437761a8056423883296bb3db23bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
|