update
This commit is contained in:
30
2021.05.07_Quantum_Espresso/silicon/plot_bands.py
Normal file
30
2021.05.07_Quantum_Espresso/silicon/plot_bands.py
Normal file
@@ -0,0 +1,30 @@
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
|
||||
plt.rcParams["figure.dpi"]=150
|
||||
plt.rcParams["figure.facecolor"]="white"
|
||||
plt.rcParams["figure.figsize"]=(8, 6)
|
||||
|
||||
# load data
|
||||
data = np.loadtxt('./si_bands.dat.gnu')
|
||||
|
||||
k = np.unique(data[:, 0])
|
||||
bands = np.reshape(data[:, 1], (-1, len(k)))
|
||||
|
||||
for band in range(len(bands)):
|
||||
plt.plot(k, bands[band, :], linewidth=1, alpha=0.5, color='k')
|
||||
plt.xlim(min(k), max(k))
|
||||
|
||||
# Fermi energy
|
||||
plt.axhline(6.6416, linestyle=(0, (5, 5)), linewidth=0.75, color='k', alpha=0.5)
|
||||
# High symmetry k-points (check bands_pp.out)
|
||||
plt.axvline(0.8660, linewidth=0.75, color='k', alpha=0.5)
|
||||
plt.axvline(1.8660, linewidth=0.75, color='k', alpha=0.5)
|
||||
plt.axvline(2.2196, linewidth=0.75, color='k', alpha=0.5)
|
||||
# text labels
|
||||
plt.xticks(ticks= [0, 0.8660, 1.8660, 2.2196, 3.2802], \
|
||||
labels=['L', '$\Gamma$', 'X', 'U', '$\Gamma$'])
|
||||
plt.ylabel("Energy (eV)")
|
||||
plt.text(2.3, 5.6, 'Fermi energy')
|
||||
plt.savefig('si_bands.jpg')
|
||||
plt.show()
|
Reference in New Issue
Block a user