Quick Start of VASP
Quick Start of VASP
本教程基于 HPC of zhenggroup 集群环境
一、VASP简介
关于 VASP
https://www.vasp.at/info/about/
The Vienna Ab initio Simulation Package (VASP) is a computer program for atomic scale materials modelling, e.g. electronic structure calculations and quantum-mechanical molecular dynamics, from first principles.
VASP是用于原子尺度材料模拟的计算程序,基于第一性原理
- 计算电子结构性质
- 计算量子力学分子动力学
VASP computes an approximate solution to the many-body Schrödinger equation, either within density functional theory (DFT), solving the Kohn-Sham equations, or within the Hartree-Fock (HF) approximation, solving the Roothaan equations. Hybrid functionals that mix the Hartree-Fock approach with density functional theory are implemented as well.Furthermore, Green’s functions methods (GW quasiparticles, and ACFDT-RPA) and many-body perturbation theory (2nd-order Møller-Plesset) are available in VASP.
VASP计算多体薛定谔方程近似解。
- DFT求解Kohn-Sham方程
- HF求解Roothaan方程
- 杂化泛函
- 格林函数方法(GW准粒子和ACFDT-RPA)和多体微扰理论(二阶Møller-Plesset)
In VASP, central quantities, like the one-electron orbitals, the electronic charge density, and the local potential are expressed in plane wave basis sets. The interactions between the electrons and ions are described using norm-conserving or ultrasoft pseudopotentials, or the projector-augmented-wave method.
- 中心量,如单电子轨道、电子电荷密度和局域势都以平面波基组表示。
- 电子和离子之间的相互作用以模守恒赝势、超软赝势或缀加投影缀加波(PAW)方法来描述。
To determine the electronic groundstate, VASP makes use of efficient iterative matrix diagonalisation techniques, like the residual minimisation method with direct inversion of the iterative subspace (RMM-DIIS) or blocked Davidson algorithms. These are coupled to highly efficient Broyden and Pulay density mixing schemes to speed up the self-consistency cycle.
为确定电子基态,VASP使用高效迭代的矩阵对角化技术,如带有迭代子空间直接反演的残差极小化方法(RMM-DIIS)或阻塞Davidson算法。这些算法与高效Broyden和Pulay密度混合方案相耦合,用以加快自洽循环。
VASP 算法
结构优化算法:conjugate gradient, Quasi-Newton or damped molecular dynamics
过渡态搜索:Nudged elastic band methods
VASP 应用和局限
VASP 侧重表面、体相材料计算
PBE泛函 + PAW赝势 + PW基组Perdew-Burke- Ernzerhof
+projector-augmented-wave
+plane wave
PBE泛函:Phys. Rev. Lett. 78, 1396 (1997)
关于PAW算法的介绍:https://zhuanlan.zhihu.com/p/575479762
PW基组
- 计算周期性的体系
- 体系不能过大,200原子以内
二、VASP使用
输入文件
INCAR
,POSCAR
,POTCAR
,KPINTS
,(OPTCELL)
,vasp.pbs
表面建模
- 真空层
R. Hoffmann, Angew. Chem. Int. Ed., 2013, 52, 93-103
MS建模:https://www.bilibili.com/video/BV1b54y1672a/?spm_id_from=333.999.0.0
Modules-Amorphous Cell模块添加溶剂化层* - Wood表面标记
fcc(100)-c(2×2) <=> fcc(100)-($\sqrt{2}$ × $\sqrt{2}$)R45° - 结构,VASP仅识别文件名为
POSCAR
的结构,其他结构可以转换成*.vasp
文件后重命名为POSCAR
1
2
3
4
5
6
7
8
9
10
11
12O H # system
1.00000000000000 # 比例系数,压力
11.0000000000000000 0.0000000000000000 0.0000000000000000 # 晶胞基矢a
0.0000000000000000 12.0000000000000000 0.0000000000000000 # 晶胞基矢b
0.0000000000000000 0.0000000000000000 13.0000000000000000 # 晶胞基矢c
O H # 元素识别
1 2 # 元素数量识别
Selective # 原子固定
Cartesian # 笛卡尔坐标、分数坐标
+10.7708483093 +11.6761039758 +0.0000000000 T T T # 原子1坐标
+0.7421507349 +11.7181789381 +0.0000000000 T T T # 原子2坐标
+10.4870009558 +0.6057170861 +0.0000000000 T T T # 原子3坐标 - 画图:MS,vesta,VMD,origin,illustrator
环境准备
在提交脚本vasp.pbs
内添加以下内容
1 | # 方法一:镜像 |
INCAR 常用参数说明
输入输出
1
2
3
4
5
6
7
8
9
10SYSTEM = string # 注释行
ISTART = 0|1 # 存在WAVECAR,1; 否则,0初猜
ICHAGE = 1|2 # ISTART为0,取2用原子电荷密度组装|1:从CHGCAR文件读入
NWRITE = 2 # 控制输出信息的详细程度
LCHARG = .T. # 输出电荷密度CHG/CHGCAR
LWAVE = .T. # 输出波函数文件WAVECAR
LVTOT = .T. # 输出总局域势LOCPOT
LELF = .T. # 输出电子局域密度函数ELFCAR文件结构优化
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
27
28
29# 泛函选择
GGA = PE # PBE泛函
# 电子步
ALGO = N # 电子优化算法;IALGO
NELM = 200 # 最大电子步数
ISMEAR = 0|-5 # 决定如何确定电子部分占据数,0,高斯展开|-5,布洛赫校正四面体方法,DOS|金属建议用正整数
SIGMA = 0.05 # 展宽越小,计算越精确,一般设置0.05 ~ 0.1
ENCUT = 400 # 平面波基的截断能
PREC = N|A # 网格精度,建议一般优化取N|单点和频率取A
# 离子步
IBRION = -1|0|1|2|3 # 离子优化算法;-1离子不运动|0分子动力学模拟|1准牛顿法离子弛豫|2共轭梯度CG算法的离子弛豫
POTIM = 0.1 # 作用在力上的比例系数
NSW = 500 # 离子步长
ISIF = 2|3 # 控制离子运动,2晶胞不优化|3优化
ISYM = 0|1 # 对称性是否开启,算吸附态时建议为0
# 电子自旋、磁矩
ISPIN = 1|2 # 电子总自旋。1无自旋|2有自旋
MAGMOM = N*M ... # 指定特定原子的磁矩
# 表面计算
LDIPOL = .T. # 偶极矩校正开
IDIPOL = 3 # 偶极矩校正精度频率计算
1
2
3
4IBRION = 5 # 频率计算
NFREE = 2 # 自由度
POTIM = 0.015 # 频率计算模式
EDIFF = 1E-6 # 防止虚频单点计算/bader/pdos
1
2
3
4
5
6
7NSW = 1
# Bader
LAECHG = .T.
LCHARG = .T.
# Pdos 需要提高K点网格,有真空层的情况下扩大XY方向的K点
ISMEAR = -5
LORBIT = 11POTCAR
1
cat /public/scripts/Pseudopotentials-VASP/potpaw_PBE/Cu/POTCAR >> POTCAR
KPOINTS
https://www.bigbrosci.com/2017/12/10/ex18/
https://www.vasp.at/wiki/index.php/KPOINTS
三、数据处理
- 检查输入文件
/public/scripts/checkinput.sh
- 查看优化结果
/public/scripts/ta.sh
- 快速固定坐标
/public/scripts/dtoc.py