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()
No description has been provided for this image
In [4]:
# Do the DFT calculation
scf = SCF(cell, etol=1e-5)
scf.run();
Start auto minimization...
Method  Iteration  Etot [Eh]    dEtot [Eh]   |Gradient|   
pccg           1   +13.495751   
pccg           2   +1.610131    -1.1886e+01  [+2.30e+03]  
pccg           3   -2.929543    -4.5397e+00  [+3.16e+02]  
pccg           4   -5.273781    -2.3442e+00  [+6.06e+01]  
pccg           5   -6.371354    -1.0976e+00  [+1.19e+01]  
pccg           6   -6.819118    -4.4776e-01  [+2.54e+00]  
pccg           7   -6.986510    -1.6739e-01  [+6.62e-01]  
pccg           8   -7.067039    -8.0529e-02  [+2.32e-01]  
pccg           9   -7.116239    -4.9200e-02  [+1.05e-01]  
pccg          10   -7.166926    -5.0686e-02  [+7.17e-02]  
pccg          11   -7.215263    -4.8338e-02  [+7.13e-02]  
pccg          12   -7.249710    -3.4446e-02  [+4.34e-02]  
pccg          13   -7.270572    -2.0862e-02  [+1.94e-02]  
pccg          14   -7.283618    -1.3046e-02  [+1.09e-02]  
pccg          15   -7.289574    -5.9559e-03  [+5.78e-03]  
pccg          16   -7.291941    -2.3671e-03  [+2.52e-03]  
pccg          17   -7.292917    -9.7568e-04  [+1.09e-03]  
pccg          18   -7.293351    -4.3493e-04  [+4.78e-04]  
pccg          19   -7.293528    -1.7615e-04  [+2.06e-04]  
pccg          20   -7.293596    -6.8121e-05  [+7.75e-05]  
pccg          21   -7.293621    -2.5546e-05  [+2.94e-05]  
pccg          22   -7.293632    -1.0743e-05  [+1.21e-05]  
pccg          23   -7.293637    -4.6187e-06  [+4.98e-06]  
SCF converged after 23 iterations.
Total SCF time: 0.19871 s
Etot = -7.293636624 Eh
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();
Minimize occupied band energies...
Start auto minimization...
Method  Iteration  Etot [Eh]    dEtot [Eh]   |Gradient|   
pccg           1   +13.528242   
pccg           2   +3.816956    -9.7113e+00  [+7.18e+01]  
pccg           3   +2.018460    -1.7985e+00  [+1.15e+01]  
pccg           4   +1.154521    -8.6394e-01  [+3.91e+00]  
pccg           5   +0.764094    -3.9043e-01  [+1.32e+00]  
pccg           6   +0.579888    -1.8421e-01  [+5.05e-01]  
pccg           7   +0.487176    -9.2712e-02  [+2.47e-01]  
pccg           8   +0.437014    -5.0162e-02  [+1.28e-01]  
pccg           9   +0.405138    -3.1876e-02  [+7.07e-02]  
pccg          10   +0.382471    -2.2667e-02  [+4.57e-02]  
pccg          11   +0.367114    -1.5357e-02  [+3.19e-02]  
pccg          12   +0.358589    -8.5251e-03  [+1.90e-02]  
pccg          13   +0.354492    -4.0969e-03  [+9.13e-03]  
pccg          14   +0.352233    -2.2597e-03  [+4.83e-03]  
pccg          15   +0.350965    -1.2680e-03  [+3.06e-03]  
pccg          16   +0.350238    -7.2694e-04  [+1.63e-03]  
pccg          17   +0.349821    -4.1684e-04  [+8.82e-04]  
pccg          18   +0.349584    -2.3674e-04  [+4.68e-04]  
pccg          19   +0.349474    -1.1049e-04  [+2.52e-04]  
pccg          20   +0.349420    -5.3737e-05  [+1.19e-04]  
pccg          21   +0.349397    -2.2513e-05  [+5.80e-05]  
pccg          22   +0.349387    -1.0846e-05  [+2.60e-05]  
pccg          23   +0.349381    -5.6492e-06  [+1.48e-05]  
Band minimization converged after 23 iterations.
Total band minimization time: 5.34356 s
Minimize unoccupied band energies...
Start auto minimization...
Method  Iteration  Etot [Eh]    dEtot [Eh]   |Gradient|   
pccg           1   +10.121290   
pccg           2   +5.361753    -4.7595e+00  [+1.28e+01]  
pccg           3   +3.397710    -1.9640e+00  [+1.95e+00]  
pccg           4   +2.459052    -9.3866e-01  [+3.64e-01]  
pccg           5   +2.028931    -4.3012e-01  [+7.28e-02]  
pccg           6   +1.822802    -2.0613e-01  [+1.88e-02]  
pccg           7   +1.713880    -1.0892e-01  [+6.57e-03]  
pccg           8   +1.654530    -5.9350e-02  [+2.71e-03]  
pccg           9   +1.621663    -3.2867e-02  [+1.14e-03]  
pccg          10   +1.603770    -1.7893e-02  [+5.37e-04]  
pccg          11   +1.594180    -9.5899e-03  [+2.66e-04]  
pccg          12   +1.588345    -5.8355e-03  [+1.47e-04]  
pccg          13   +1.584403    -3.9418e-03  [+9.43e-05]  
pccg          14   +1.581572    -2.8314e-03  [+6.68e-05]  
pccg          15   +1.579543    -2.0291e-03  [+4.91e-05]  
pccg          16   +1.578312    -1.2304e-03  [+3.02e-05]  
pccg          17   +1.577649    -6.6306e-04  [+1.66e-05]  
pccg          18   +1.577241    -4.0841e-04  [+1.03e-05]  
pccg          19   +1.576939    -3.0212e-04  [+7.42e-06]  
pccg          20   +1.576681    -2.5775e-04  [+5.85e-06]  
pccg          21   +1.576410    -2.7086e-04  [+5.79e-06]  
pccg          22   +1.576155    -2.5559e-04  [+5.38e-06]  
pccg          23   +1.575954    -2.0063e-04  [+4.55e-06]  
pccg          24   +1.575817    -1.3647e-04  [+3.34e-06]  
pccg          25   +1.575728    -8.9092e-05  [+2.28e-06]  
pccg          26   +1.575671    -5.7336e-05  [+1.48e-06]  
pccg          27   +1.575631    -4.0193e-05  [+9.50e-07]  
pccg          28   +1.575598    -3.3267e-05  [+7.16e-07]  
pccg          29   +1.575569    -2.8409e-05  [+6.12e-07]  
pccg          30   +1.575544    -2.5350e-05  [+5.24e-07]  
pccg          31   +1.575517    -2.6594e-05  [+5.33e-07]  
pccg          32   +1.575489    -2.7896e-05  [+5.88e-07]  
pccg          33   +1.575464    -2.5499e-05  [+6.04e-07]  
pccg          34   +1.575444    -1.9619e-05  [+5.17e-07]  
pccg          35   +1.575430    -1.4292e-05  [+3.79e-07]  
pccg          36   +1.575418    -1.1489e-05  [+2.94e-07]  
pccg          37   +1.575410    -8.3164e-06  [+2.32e-07]  
Band minimization converged after 37 iterations.
Total band minimization time: 14.23344 s
In [8]:
# At last, plot the resulting band structure
plot_bandstructure(scf)
No description has been provided for this image