Note
Click here to download the full example code or to run this example in your browser via Binder
Brillouin zoneΒΆ
This example shows how to display the Brillouin zone with pymatgen and matplotlib.
from abipy.abilab import abiopen
import abipy.data as abidata
# Open the WKF file.
wfk_file = abiopen(abidata.ref_file("si_scf_WFK.nc"))
# Extract the crystalline structure.
structure = wfk_file.structure
To visualize the BZ with matplotlib, use:
structure.plot_bz()
Out:
<Figure size 640x480 with 1 Axes>
Remember to close the wfk file with:
wfk_file.close()
Total running time of the script: ( 0 minutes 0.226 seconds)