VASPKIT能带图计算

本文章为原创,版权归作者刘锦程所有,文章转载请先取得作者的同意,非常欢迎转发文章链接!严禁以任何方式挪用本文内容,用于以盈利为目的各种活动。

一句话提要:用VASPKIT是计算能带结构图最简单的方式。302/303一键生成输入文件,212/213一键提取计算结果,想要了解原理的同学从深入分析能带结构(一)开始看,想要直接算的同学翻到本文最后一节的例子。

相关内容

深入分析能带结构(一) 能带的形成

深入分析能带结构(三)-Origin画能带图

pymatgen画能带图方法-高通量计算初探

这篇文章主要讨论怎么用最简单且可靠的方式计算能带结构。要做带结构计算,关键是要准备一个素晶胞和其相应的倒易空间中的K点路径(K-path),该K点路径一般在不可约布里渊区的边界上选取。VASPKIT可以自动识别晶胞的对称性,计算倒易空间中的不可约布里渊区,找到所有的高对称点,并通过一点选取法则,得到K-path。所谓的选取法则是采用的高通量计算(Computational Materials Science 128 (2017) 140–184)中的建议选择方式,可以不遗漏重要信息自动生成line-mode模式的KPOINTS文件。

举两个例子:

(1)FCC金属的惯用晶胞,第一布里渊区,高对称点:

FCC,conventional cell,布里渊区,高对称点,K-path

(2)BCC金属的惯用晶胞,第一布里渊区,高对称点:

BCC,conventional cell,布里渊区,高对称点,K-path

​ 可见,即使是最简单的晶胞,也有多个高对称点,其连线的路径就有很多条(红色线)。想要一笔画把所有的路径都走到一般是不可能,所以计算能带的时候可以中间有不连续的断点,用 “ | ” 符号隔开,比如上图的BCC金属最后有一段P-N的线是和前面的路线隔开的。对称性低的晶胞含有更多的高对称点,路径也会取得更多的连线。

​ 那么对于230种空间群的晶体,对应的对称性不同的布里渊区就有24种(24 centrosymmetric symmorphic space groups)。对于每种都给定走K-path的方式,这样对于任意一种晶体的能带计算,都可以完全自动的生成KPOINTS文件了。

布里渊区中的K-path

二维材料的布里渊区和K点路径的选择要简单的多,图示如下:

unfold band

传统方法使用Materials studio需要人为的去确定K-path,并手动写入KPOINTS文件,非常麻烦而且易出错。使用seeK-path,网站则需要每次都把结构文件上传。而使用VASPKIT,只需要一个命令就可以在LINUX系统里完成这项工作,VASPKIT使用的生成K-path规则和seeK-path网站是完全一样的。而且VASPKIT不但能够处理3D材料,也可以处理2D和1D材料。

以单层MoS2为例,介绍VASPKIT计算2D材料投影能带图方法

(1)准备POSCAR结构文件,注意由于VASPKIT产生的2D K-path高对称点处在倒空间z方向为0的位置,所以也要保证2D材料在实空间的晶格中是z方向的中心(即分数坐标0.5处),可以用VASPKIT的 921 或 923 功能实现自动把2D材料移动到z方向的中心。923功能标准化2D材料的晶胞,(i) 把真空层放在z方向,(ii) 把2D材料的中心放到z方向分数坐标0.5位置。

(注:如果是3D材料,则需要运行一次602功能,自行的找到标准化的primitive cell,得到PRIMCELL.vasp 覆盖原有的POSCAR,以确保后续算能带时候Vaspkit生成的K-path和实空间的晶胞方向是匹配的):

unfold band

POSCAR:

1
2
3
4
5
6
7
8
9
10
11
MoS2
1.0
3.1659998894 0.0000000000 0.0000000000
-1.5829999447 2.7418363326 0.0000000000
0.0000000000 0.0000000000 18.4099998474
S Mo
2 1
Direct
0.000000000 0.000000000 0.413899988
0.000000000 0.000000000 0.586099982
0.666666687 0.333333343 0.500000000

VASPKIT 923功能标准化2D材料的晶胞,(i) 把真空层放在z方向,(ii) 把2D材料的中心放到z方向分数坐标0.5位置:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
92
+-------------------------- Warm Tips --------------------------+
Please Use These Features with CAUTION!
+---------------------------------------------------------------+
===================== 2D Materials Toolkit ======================
921) Center Aomic-Layer along z direction
922) Resize Vacuum Thickness
923) Standardize 2D Crystal Cell
926) Elastic Constants for 2D Materials
927) Valence and Conduction Band Edges Referenced to Vacuum Level
929) Summary for Relaxed 2D Structure

0) Quit
9) Back
------------>>
923
-->> (1) Reading Structural Parameters from POSCAR File...
-->> (2) Written POSCAR_NEW File!

(2)做结构优化,然后单点自洽计算得到CHGCAR。

(3)运行302功能准备2D材料能带计算的KPOINTS文件,注意检查打印到屏幕上的对称性信息是否有错误:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
302
+-------------------------- Warm Tips --------------------------+
See An Example in VASPKIT/examples/seek_kpath/graphene_2D.
This feature is still experimental & check the PRIMCELL.vasp file.
+---------------------------------------------------------------+
-->> (1) Reading Structural Parameters from POSCAR File...
+-------------------------- Summary ----------------------------+
The vacuum slab is supposed to be along c axis
Prototype: AB2
Total Atoms in Input Cell: 3
Lattice Constants in Input Cell: 3.166 3.166 18.410
Lattice Angles in Input Cell: 90.000 90.000 120.000
Total Atoms in Primitive Cell: 3
Lattice Constants in Primitive Cell: 3.166 3.166 18.410
Lattice Angles in Primitive Cell: 90.000 90.000 120.000
2D Bravais Lattice: Hexagonal
Space Group: 187
Point Group: 26 [ D3h ]
International: P-6m2
Symmetry Operations: 12
Suggested K-Path: (shown in the next line)
[ GAMMA-M-K-GAMMA ]
+---------------------------------------------------------------+
-->> (2) Written PRIMCELL.vasp file.
-->> (3) Written KPATH.in File for Band-Structure Calculation.
-->> (4) Written HIGH_SYMMETRY_POINTS File for Reference.

KPATH.in是包含line-mode模式的KPOINTS文件,cp KPATH.in KPOINTS即可。

HIGH_SYMMETRY_POINTS是所有的高对称点在倒易空间的分数坐标:

1
2
3
4
5
6
7
8
9
High-symmetry points (in fractional coordinates). You can check them with the seekpath database [https://www.materialscloud.org/work/tools/seekpath].
0.0000000000 0.0000000000 0.0000000000 GAMMA
0.3333333333 0.3333333333 0.0000000000 K
0.5000000000 0.0000000000 0.0000000000 M


If you use this module, please cite the following work:
[1] V. Wang, N. Xu, J.-C. Liu, VASPKIT: A Pre- and Post-Processing Program for the VASP Code. http://VASPKIT.sourceforge.net.
[2] V. Wang, Y.-Y. Liang, Y. Kawazeo, W.-T. Geng, High-Throughput Computational Screening of Two-Dimensional Semiconductors, arXiv:1806.04285.

VASPKIT程序并不保证此功能的正确性,所以要对比此结果和seeK-path网站的结果(https://www.materialscloud.org/work/tools/seekpath)

(4)提交能带计算任务,读取单点计算得到的CHGCAR,做非自恰计算。

INCAR文件如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
##### initial I/O #####
SYSTEM = MoS2
KPAR = 4
NCORE = 5
ISTART = 1
ICHARG = 11
LWAVE = .TRUE.
LCHARG = .TRUE.
LVTOT = .FALSE.
LVHAR = .FALSE.
LELF = .FALSE.
LORBIT = 11
NEDOS = 1000

##### SCF #####
ENCUT = 500
ISMEAR = 0
SIGMA = 0.05
EDIFF = 1E-6
NELMIN = 5
NELM = 300
GGA = PE
LREAL = .FALSE.
PREC = Accurate

(5)计算完成以后,运行VASPKIT的 21功能,处理能带数据:

211功能绘制基本能带图

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
211
-->> (01) Reading Input Parameters From INCAR File...
-->> (02) Reading Fermi-Energy from DOSCAR File...
ooooooooo The Fermi Energy will be set to zero eV ooooooooooooooo
-->> (03) Reading Energy-Levels From EIGENVAL File...
-->> (04) Reading Structural Parameters from POSCAR File...
-->> (05) Reading K-Paths From KPOINTS File...
-->> (06) Written BAND.dat File!
-->> (07) Written BAND_REFORMATTED.dat File!
-->> (08) Written KLINES.dat File!
-->> (09) Written KLABELS File!
-->> (10) Written BAND_GAP File!
If you want use the default setting, type 0, if modity type 1
0
/public1/home/pg2059/.local/lib/python2.7/site-packages/matplotlib/font_manager.py:1328: UserWarning: findfont: Font family [u'arial'] not found. Falling back to DejaVu Sans
(prop.get_family(), self.defaultFamily[fontext]))
-->> (11) Graph has been generated!

输出BAND.dat,BAND_REFORMATTED.dat,KLINES.dat,KLABELS,BAND_GAP文件,

BAND.dat,BAND_REFORMATTED.dat保存了能带数据,可以直接导入Origin里画图:

BAND_REFORMATTED.dat的文件格式如下,第一列是能带图的横坐标,后面每一列是一条能带在对应K上的能级:

1
2
3
4
5
6
7
8
9
10
11
#K-Path     Energy-Level
0.000 -14.278 -13.063 -5.798 -2.813 -2.813 -1.962 -1.693 ...
0.060 -14.268 -13.058 -5.787 -2.836 -2.802 -2.055 -1.710 ...
0.120 -14.239 -13.044 -5.752 -2.906 -2.769 -2.226 -1.761 ...
0.180 -14.190 -13.021 -5.695 -3.015 -2.716 -2.416 -1.840 ...
0.240 -14.123 -12.989 -5.619 -3.157 -2.642 -2.614 -1.943 ...
0.300 -14.039 -12.948 -5.528 -3.321 -2.817 -2.551 -2.064 ...
0.360 -13.938 -12.900 -5.428 -3.496 -3.023 -2.443 -2.195 ...
0.420 -13.823 -12.846 -5.329 -3.671 -3.232 -2.333 -2.322 ...
0.480 -13.696 -12.786 -5.244 -3.830 -3.441 -2.471 -2.190 ...
...

KLABELS保存了高对称点在能带图中的横坐标位置:

1
2
3
4
5
6
7
8
K-Label    K-Coordinate in band-structure plots 
GAMMA 0.000
M 1.140
K 1.798
GAMMA 3.114


* Give the label for each high symmetry point in KPOINTS (KPATH.in) file. Otherwise, they will be identified as 'Undefined' in KLABELS file

BAND_GAP文件保存了VBM,CBM和带隙的数据:

1
2
3
4
5
6
7
8
9
10
11
+-------------------------- Summary ----------------------------+
Band Character: Direct
Band Gap (eV): 1.6743
Eigenvalue of VBM (eV): -0.2257
Eigenvalue of CBM (eV): 1.4485
HOMO & LUMO Bands: 9 10
Location of VBM: 0.333333 0.333333 0.000000
Location of CBM: 0.333333 0.333333 0.000000
+---------------------------------------------------------------+

NOTE: The VBM and CBM are subtracted by the Fermi Energy.

如果安装有matplotlib的python环境,还能直接输出band.png能带图:

unfold band

212,213,214功能绘制投影能带图

212) Projected Band-Structure for Selected Atoms,选择投影的原子,格式是自由格式的,可以同时选取几个原子或元素同时输出其投影能带数据,输入的方式可以是:

(1) 指定的原子序号,或序号集合:1-4 7 8 24

(2) 指定的元素:C Fe H

比如想要数据,1号和2号原子的投影能带数据,根据提示输入1-2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
212
-->> (01) Reading Input Parameters From INCAR File...
-->> (02) Reading Fermi-Energy from DOSCAR File...
ooooooooo The Fermi Energy will be set to zero eV ooooooooooooooo
-->> (03) Reading Structural Parameters from POSCAR File...
-->> (04) Reading Energy-Levels From EIGENVAL File...
-->> (05) Reading Band-Weights From PROCAR File...
-->> (06) Reading K-Paths From KPOINTS File...
|---------------------------------------------------------------|
Input the element-symbol and/or atom-index to SUM [Total-atom: 3]
(Free Format is OK, e.g., C Fe H 1-4 7 8 24)

------------>>
1-2
-->> (07) Written SELECTED_ATOM_LIST File!
-->> (08) Written PBAND_A1.dat File!
-->> (09) Written PBAND_A2.dat File!
-->> (10) Written KLINES.dat File!
-->> (11) Written KLABELS File!

输出的PBAND_A1.dat 和 PBAND_A2.dat文件,分别包含1号和2号原子在每个角动量和磁角动量上的分量,该文件中把s py pz px dxy dyz dz2 dxz x2-y2 tot的贡献分别按列划分,在Origin里画图即可:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#K-Path    Energy     s     py     pz     px    dxy    dyz    dz2    dxz  x2-y2    tot
#Band-index 1
0.000 -14.278 0.275 0.000 0.005 0.000 0.000 0.000 0.000 0.000 0.000 0.281
0.060 -14.268 0.276 0.000 0.005 0.000 0.000 0.000 0.000 0.000 0.000 0.281
0.120 -14.239 0.276 0.000 0.005 0.000 0.000 0.000 0.000 0.000 0.000 0.281
0.180 -14.190 0.277 0.000 0.005 0.000 0.000 0.000 0.000 0.000 0.000 0.282
0.240 -14.123 0.278 0.000 0.005 0.000 0.000 0.000 0.000 0.000 0.000 0.284
0.300 -14.039 0.280 0.000 0.005 0.001 0.000 0.000 0.000 0.000 0.000 0.285
0.360 -13.938 0.281 0.000 0.005 0.001 0.000 0.000 0.000 0.000 0.000 0.288
0.420 -13.823 0.283 0.000 0.005 0.001 0.000 0.000 0.000 0.000 0.000 0.290
...
#Band-index 2
3.114 -13.063 0.315 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.316
3.045 -13.056 0.315 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.316
...
#Band-index 3
0.000 -5.798 0.018 0.000 0.125 0.000 0.000 0.000 0.000 0.000 0.000 0.143
0.060 -5.787 0.018 0.000 0.125 0.000 0.000 0.000 0.000 0.000 0.000 0.143
...

213) Projected Band-Structure for Each Element,投影到每种元素上:

1
2
3
4
5
6
7
8
9
10
11
12
213
-->> (1) Reading Input Parameters From INCAR File...
-->> (2) Reading Fermi-Level From DOSCAR File...
ooooooooo The Fermi Energy will be set to zero eV ooooooooooooooo
-->> (3) Reading Structural Parameters from POSCAR File...
-->> (4) Reading Energy-Levels From EIGENVAL File...
-->> (5) Reading Band-Weights From PROCAR File...
-->> (6) Reading K-Paths From KPOINTS File...
-->> (7) Written PBAND_S.dat File!
-->> (8) Written PBAND_Mo.dat File!
-->> (9) Written KLINES.dat File!
-->> (*) Written KLABELS File!

PBAND_S.dat 和 PBAND_Mo.dat 文件的格式和上述的PBAND_A1.dat一样的,画图效果如下:

unfold band

214) The Sum of Projected Band-Structure for Selected Atoms,该功能可以把几个原子或者元素的投影贡献加和:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
214
-->> (01) Reading Input Parameters From INCAR File...
-->> (02) Reading Fermi-Energy from DOSCAR File...
ooooooooo The Fermi Energy will be set to zero eV ooooooooooooooo
-->> (03) Reading Structural Parameters from POSCAR File...
-->> (04) Reading Energy-Levels From EIGENVAL File...
-->> (05) Reading Band-Weights From PROCAR File...
-->> (06) Reading K-Paths From KPOINTS File...
|---------------------------------------------------------------|
Input the element-symbol and/or atom-index to SUM [Total-atom: 3]
(Free Format is OK, e.g., C Fe H 1-4 7 8 24)

------------>>
Mo
-->> (07) Written SELECTED_ATOM_LIST File!
-->> (08) Written PBAND_SUM.dat File!
-->> (09) Written KLINES.dat File!
-->> (10) Written KLABELS File!

输出的PBAND_SUM.dat文件包含我们自由定义的部分的加和,此功能可用于研究表面态,通过定义原子编号,把slab模型的单个layer的投影在能带上,从而对比深层的和表层的不同贡献。

unfold band
欢迎在评论区讨论问题、补充内容、指出错误。请勿发送占楼、沙发、点赞等无意义的回复。
目录