VASP Primer: Calculating Density of States and Bandwidths in Silicon
1. Tutorial Introduction
* Video Tutorial:[VASP Getting Started Tutorial] Calculating the Density of States and Energy Bands of Silicon
Introduction to VASP
VASP (Vienna Ab initio Simulation Package) It is a computer program for atomic-scale material modeling from first principles, such as electronic structure calculations and quantum mechanical molecular dynamics.
VASP is able to compute approximate solutions to the many-body Schrödinger equation, either solving the Kohn-Sham equation in density functional theory (DFT) or solving the Roothaan equation in the Hartree-Fock (HF) approximation. Hybrid functionals that mix the Hartree-Fock method with density functional theory are also implemented. In addition, Green's function methods (GW quasiparticles and ACFDT-RPA) and many-body perturbation theory (second-order Møller-Plesset) are available in VASP.
In VASP, central quantities such as single electron orbitals, electron charge density, and local potentials are represented in plane wave basis sets. The interactions between electrons and ions are described using norm conservation or ultrasoft pseudopotentials or projector augmented wave methods.
To determine the electronic ground state, VASP makes use of efficient iterative matrix diagonalization techniques such as the residual minimization method with direct inversion iterated subspace (RMM-DIIS) or the block Davidson algorithm. These are combined with the efficient Broyden and Pulay density mixing scheme to speed up the self-consistent loop.
Tutorial Content
- Structural Optimization
- Self-consistent calculations (density of states)
- Energy band calculation
Through this tutorial, you will understand the functions of the four basic input files of vasp: INCAR (vasp function control file), POSCAR (structure file), POTCAR (pseudopotential file) and KPOINTS (reciprocal lattice points), and learn how to write input files by yourself.
2. Input File
First, let me introduce the input files required for this tutorial.
1. Structural optimization
INCAR
ISTART = 1 (读取初始波函数 WAVECAR 文件)
ISPIN = 1 (本次计算为不考虑自旋的 DFT 计算)
# ICHARG = 11 (非自洽计算:用于计算能带本征值)
LREAL = .FALSE. (不在实空间投影计算)
LWAVE = .TRUE. (计算完毕输出并保存 WAVECAR)
LCHARG = .TRUE. (计算完毕输出并保存 CHGCAR)
ADDGRID= .TRUE. (增加格点密度加速收敛)
NSW = 300 (最多运行 300 步离子步)
ISMEAR = -5 (采用 Blöchl 修正的 tetrahedron 方法)
IBRION = 2 (采用 2-CG 算法进行收敛)
ISIF = 3 (优化期间原胞形状、体积和内部原子位置都将发生变化)
EDIFFG = -1.5E-02 (离子步收敛条件 eV/A)
POSCAR
Si #(体系名称)
1.0 #(放大系数 下面 3 行对应 3 个晶格矢量 )
0.0 2.75 2.75
2.75 0.0 2.75
2.75 2.75 0.0
Si #(元素)
2 #(对应元素原子数)
Direct #(采用分数坐标,下列为 2 个原子的分数坐标)
0 0 0
0.25 0.25 0.25
KPOINTS
K-Spacing Value to Generate K-Mesh: 0.020 #采用 GAMMA 方法取样
0
Gamma
16 16 16
0.0 0.0 0.0
#取 16x16x16 个格点
POTCAR
The pseudopotential combination of the corresponding elements in the system, here is the pseudopotential of Si
2. Self-consistent calculation (state density calculation)
INCAR
ISTART = 1 (读取初始波函数 WAVECAR 文件)
ISPIN = 1 (本次计算为不考虑自旋的 DFT 计算)
# ICHARG = 11 (非自洽计算:用于计算能带本征值)
LREAL = .FALSE. (不在实空间投影计算)
LWAVE = .TRUE. (计算完毕输出并保存 WAVECAR)
LCHARG = .TRUE. (计算完毕输出并保存 CHGCAR)
ADDGRID= .TRUE. (增加格点密度加速收敛)
ISMEAR = -5 (采用 Blöchl 修正的 tetrahedron 方法)
NELM = 60 (SCF 自洽步数最多为 60 步)
EDIFF = 1E-08 (SCF 能量收敛条件)
POSCAR
Use CONTCAR output from the previous step "1. Structural Optimization" and rename it to POSCAR
KPOINTS
Same as "1. Structural Optimization"
POTCAR
Same as "1. Structural Optimization"
3. Energy band calculation
INCAR
ISTART = 1 (读取初始波函数 WAVECAR 文件)
ISPIN = 1 (本次计算为不考虑自旋的 DFT 计算)
ICHARG = 11 (非自洽计算:用于计算能带本征值)
LREAL = .FALSE. (不在实空间投影计算)
LWAVE = .TRUE. (计算完毕输出并保存 WAVECAR)
LCHARG = .TRUE. (计算完毕输出并保存 CHGCAR)
ISMEAR = 0 (能带计算需要使用高斯方法)
SIGMA = 0.05 (高斯展宽)
NELM = 60 (SCF 自洽步数最多为 60 步)
EDIFF = 1E-08 (SCF 能量收敛条件)
POSCAR
Same as "2. Self-consistent calculation (state density calculation)"
KPOINTS
K-Path Generated by VASPKIT.
20 #k 点之间的间隔
Line-Mode
Reciprocal
0.0000000000 0.0000000000 0.0000000000 GAMMA
0.5000000000 0.0000000000 0.5000000000 X
0.5000000000 0.0000000000 0.5000000000 X
0.6250000000 0.2500000000 0.6250000000 U
0.3750000000 0.3750000000 0.7500000000 K
0.0000000000 0.0000000000 0.0000000000 GAMMA
0.0000000000 0.0000000000 0.0000000000 GAMMA
0.5000000000 0.5000000000 0.5000000000 L
0.5000000000 0.5000000000 0.5000000000 L
0.5000000000 0.2500000000 0.7500000000 W
0.5000000000 0.2500000000 0.7500000000 W
0.5000000000 0.0000000000 0.5000000000 X
POTCAR
Same as "1. Structural Optimization"
3. Practical operation steps
Now let's start the actual operation. The tutorial has prepared the required open source package (tutorials.zip), which can be directly cloned. Other pseudopotential files need to be downloaded and uploaded according to the tutorial for copyright reasons.
1. Clone and start the container
After the container is loaded, click Open Workspace

2. Upload input file
2.1 Open Terminal

2.2 Unzip the package
unzip tutorials.zip
2.3 Enter the directory
cd tutorials
2.4 Upload the prepared silicon pseudopotential
Here you can use the "official website example:https://www.vasp.at/wiki/images/d/d1/5_4_Si_bandstructure.tgz Pseudopotential POTCAR
Put the pseudopotential into 1_str.

3. Run vasp
Setting openmp parameters
export OMP_NUM_THREADS=1
3.1 Structural Optimization
Enter 1_str
cd 1_str
mpirun -n 2 --allow-run-as-root vasp_std
After the operation is completed, copy POTCAR, WAVECAR, CHGCAR and CHG to 2_scf
And copy CONTCAR to 2_scf and change it to POSCAR
cp POTCAR WAVECAR CHG* ../2_scf
cp CONTCAR ../2_scf/POSCAR
Enter the ../2_scf directory
cd ../2_scf
3.2 Self-consistent calculation (state density calculation)
Enter the following code to run:
mpirun -n 2 --allow-run-as-root vasp_std
At this time, vasp will read WAVECAR and CHGCAR copied in step 3.1.
After the operation is completed, copy POSCAR, POTCAR, WAVECAR, CHGCAR and CHG to 3_band
cp POSCAR POTCAR WAVECAR CHG* ../3_band
Enter the ../3_band directory
cd ../3_band
3.3 Energy band calculation
Enter the following code to run:
mpirun -n 2 --allow-run-as-root vasp_std
At this time, vasp will read WAVECAR, CHGCAR and CHG copied in step 3.2 and perform eigenvalue calculation.
Return to the main directory of the input file
cd ..
4. Install vaspkit
4.1 Install Python dependencies
pip install numpy scipy matplotlib
4.2 Configure vaspkit
chmod 777 setupvk.sh
./setupvk.sh
source ~/.bashrc
cd tutorials
5. Processing data using vaspkit
5.1 Plotting the Density of States
Enter 2_scf
cd 2_scf
Use vaspkit to process data and plot
vaspkit
111
1
The state density diagram will be generated in 2_scf

Back to Contents
cd ..
5.2 Drawing energy band diagrams
Enter 3_band
cd 3_band
Use vaspkit to process data and plot
vaspkit
211
1
You can see that the band diagram will be generated in 3_band
