Band structures¶
In [1]:
from eminus import Cell, SCF
from eminus.extras import plot_bandstructure
In [2]:
# Create a cell for a silicon crystal
# It only contains one k-point, but this is enough to create a nice band structure
# Specify the number of bands we want to calculate (here we have 4 occupied bands and 4 unoccupied bands)
cell = Cell("Si", "diamond", ecut=10, a=10.2631, bands=8)
In [3]:
# Let's take a look at the cell first
cell.view()
In [4]:
# Do the DFT calculation
scf = SCF(cell, etol=1e-5)
scf.run();
In [5]:
# To create a band structure we have to generate a k-path
scf.kpts.path = "LGXU,KG"
# Specify the number of k-points the sampled path should contain
scf.kpts.Nk = 25
In [6]:
# We can display our Brillouin zone with all special points and the sampled band path
scf.kpts.build().view()
In [7]:
# Run the calculation for the new sampled k-points
# This will do a minimization for a fixed Hamiltonian (the one we have found in the previous calculation, saved in the SCF object)
# The calculation will perform two steps:
# 1. Find a set of occupied orbitals that minimize the band energies
# 2. Find a set of unoccupied orbitals that are orthogonal to the occupied ones that also minimize their band energies
scf.converge_bands();
In [8]:
# At last, plot the resulting band structure
plot_bandstructure(scf)