This commit is contained in:
guanjihuan 2024-12-15 22:14:24 +08:00
parent 81565244f1
commit 2b5bfab114
5 changed files with 124 additions and 0 deletions

View File

@ -0,0 +1,7 @@
pw.x < pw.scf.silicon_bands.in > pw.scf.silicon_bands.out
pw.x < pw.bands.silicon.in > pw.bands.silicon.out
bands.x < pp.bands.silicon.in > pp.bands.silicon.out
python plot_bands.py

View 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()

View File

@ -0,0 +1,13 @@
&BANDS
prefix = 'silicon'
outdir = './tmp/'
filband = 'si_bands.dat'
/
K_POINTS {crystal_b}
5
0.0000 0.5000 0.0000 20 !L
0.0000 0.0000 0.0000 30 !G
-0.500 0.0000 -0.500 10 !X
-0.375 0.2500 -0.375 30 !U
0.0000 0.0000 0.0000 20 !G

View File

@ -0,0 +1,38 @@
&control
calculation = 'bands',
restart_mode = 'from_scratch',
prefix = 'silicon',
outdir = './tmp/'
pseudo_dir = '/opt/qe-7.3.1/pseudo'
verbosity = 'high'
/
&system
ibrav = 2,
celldm(1) = 10.2076,
nat = 2,
ntyp = 1,
ecutwfc = 50,
ecutrho = 400,
nbnd = 8
/
&electrons
conv_thr = 1e-8,
mixing_beta = 0.6
/
ATOMIC_SPECIES
Si 28.086 Si.pz-vbc.UPF
ATOMIC_POSITIONS (alat)
Si 0.00 0.00 0.00
Si 0.25 0.25 0.25
K_POINTS {crystal_b}
5
0.0000 0.5000 0.0000 20 !L
0.0000 0.0000 0.0000 30 !G
-0.500 0.0000 -0.500 10 !X
-0.375 0.2500 -0.375 30 !U
0.0000 0.0000 0.0000 20 !G

View File

@ -0,0 +1,36 @@
&CONTROL
calculation = 'scf',
restart_mode = 'from_scratch',
prefix = 'silicon',
outdir = './tmp/'
pseudo_dir = '/opt/qe-7.3.1/pseudo'
verbosity = 'high'
/
&SYSTEM
ibrav = 2,
celldm(1) = 10.2076,
nat = 2,
ntyp = 1,
ecutwfc = 50,
ecutrho = 400,
nbnd = 8,
! occupations = 'smearing',
! smearing = 'gaussian',
! degauss = 0.005
/
&ELECTRONS
conv_thr = 1e-8,
mixing_beta = 0.6
/
ATOMIC_SPECIES
Si 28.086 Si.pz-vbc.UPF
ATOMIC_POSITIONS (alat)
Si 0.0 0.0 0.0
Si 0.25 0.25 0.25
K_POINTS (automatic)
8 8 8 0 0 0