MgB2 Fermi surfaceΒΆ

This example shows how to plot the Fermi surface with matplotlib

plot fermisurface


<Figure size 640x480 with 1 Axes>

from abipy import abilab
import as abidata

with abilab.abiopen(abidata.ref_file("")) as fbnc_kmesh:
    ebands = fbnc_kmesh.ebands

# Build ebands in full BZ.
eb3d = ebands.get_ebands3d()

# Use matplotlib to plot isosurfaces corresponding to the Fermi level (default)
# Warning: requires skimage package, rendering could be slow.

# Alternatively, it's possible to export the data in xcrysden format
# and then use `xcrysden --bxsf mgb2.bxsf`

# If you have mayavi installed, try:

Total running time of the script: ( 0 minutes 0.376 seconds)

Gallery generated by Sphinx-Gallery