根据2018.9-2019.2之间的三个VASP计算实例总结,为今后所有VASP计算整理模板。以后其它VASP功能教程也应当添加在此处。
Preparation of the first calculation
DOS (态密度)
你可能发现所有原子的spd态的密度和与DOSCAR
给出的总态密度不符(偏小)。这是因为计算spd态密度对应原子周围的电子,而加和所有原子周围会遗漏一些结构中的空隙中的态密度。
van de Waals & dipole
IVDW
, LVDW
LVDW
https://cms.mpi.univie.ac.at/wiki/index.php/IVDW
https://cms.mpi.univie.ac.at/wiki/index.php/DFT-D2
https://cms.mpi.univie.ac.at/wiki/index.php/DFT-D3
VdW-DF functional
需要附带一个文件?
IDIPOL
, LDIPOL
https://cms.mpi.univie.ac.at/wiki/index.php/Monopole_Dipole_and_Quadrupole_corrections
VASP: +U
VASP标签含义
ICHARG |
LCHARG |
---|---|
0 : 1 : 2: : +10 : NSCF |
determines whether the charge densities (files CHGCAR and CHG ) are written. |
Convergence
1 Convergence for frozen spin SCF
https://cms.mpi.univie.ac.at/wiki/index.php/Constraining_local_magnetic_moments
(Convergence for frozen spin SCF)
What can one do when convergence is bad:
- Start from charge density of non-spin-polarized calculation using
ISTART=0
(or remove theWAVECAR
file) andICHARG=1
. - Use linear mixing by setting
BMIX=0.0001
andBMIX_MAG=0.0001
.
Mix slowly, i.e., reduceAMIX
andAMIX_MAG
. - REDUCE
MAXMIX
, the number of steps stored in the Broyden mixer (defaultMAXMIX=45
). - Restart from partially converged results (stop a calculation after say 20 steps and restart from the
WAVECAR
file). - Use constraints to stabilize the magnetic configuration.
- Pray.
2 What to do when electronic convergence fails
https://www.vasp.at/vasp-workshop/slides/optelectron.pdf
What to do when electronic convergence fails
tags | description |
---|---|
AMIN |
AMIN specifies the minimal mixing parameter in Kerker’s[1] initial approximation to the charge dielectric function used in the Broyden[2][3]/Pulay[4] mixing scheme (IMIX=4, INIMIX=1). |
AMIX |
AMIX specifies the linear mixing parameter. |
BMIX |
BMIX sets the cutoff wave vector for Kerker mixing scheme[1] (IMIX=1 and/or INIMIX=1). |
AMIX_MAG |
AMIX_MAG linear mixing parameter for the magnetization density. |
BMIX_MAG |
BMIX_MAG sets the cutoff wave vector for Kerker mixing scheme[1] (IMIX=1 and/or INIMIX=1) for the magnetization density. |
问题( 未分类 )
- 在限制原子自旋的计算下,需要指定
RWIGS
。这个标签可以在POSCAR
中找到,但是如果在POSCAR
中寻找RWIGS
,每个原子都有两个值,如Sr:
1 | TITEL = PAW_PBE Sr_sv 07Sep2000 |
从Co/Pt的计算来看,我们用的是第二个。Why?(因为第二个是以A为单位。。。第一个是au单位)
-
运行1分钟,
.out
文件报错:mpirun noticed that process rank 4 with PID 22351 on node c2812 exited on signal 9 (Killed). 网上说是内存不够。解决方法1. 增加内存
#SBATCH --mem=250GB
(这个就是总的每个node的内存,不是分到每个cpu的) 2. 减少运算量:减小KPOINTS密度:例如对于7.8807001114 × 15.7615003586 × 真空层的体系,K点取8×4×1 (在算单胞的时候我们取16×16×16,现在面内晶格参数增大了一倍,相应k点也要减半,大三倍,k变1/4) 或者减少ENCUT
,再者修改LREAL
-
如下:
Code1
2
3ZBRENT: fatal error in bracketing
please rerun with smaller EDIFF, or copy CONTCAR
to POSCAR and continue师兄说法:一般就把
CONTCAR
复制为POSCAR
然后继续算就好了。
此外,在一网站上:https://sites.tufts.edu/andrewrosen/density-functional-theory/vasp/ 解释到:In large, flexible materials with many degrees of freedom, the CG optimization algorithm (IBRION=2) oftentimes results in a bracketing error once it gets relatively close to the local minimum (search for ZBRENT: fatal error in bracketing in the standard output file). This occurs because the potential energy surface is very flat, and the CG algorithm implemented in VASP is based on the energy differences. One option to fix this is to copy the CONTCAR to the POSCAR and tighten EDIFF to 1e-6 , but a more reliable option is to use a force-based optimizer. Of these, I’d recommend FIRE as implemented with VTST (IBRION=3, IOPT=7). I have found that FIRE is generally more robust than the QN (IBRION=1) method.
是说
IBRION = 2
所用的方法和梯度有关,在接近平衡位置时,参数的梯度变得很小,因此方法会失效。然后解决方案为减小EDIFF
(但是我已经用了1e-6
了啊!),或者用一种VTST的VASP扩展。。。。。需要新安装,好麻烦。 -
出现奇怪的非收敛问题:检查
INCAR
,INCAR
(!)以及POSCAR
-
想要让
OZICAR
显示整理过的矢量磁矩信息,单纯设定Non-Colinear的参数是不够的,还需要有LAMBDA
设置。如果非共线性计算并没有限制磁矩所以没有设置LAMBDA
,那很简单,LAMBDA = 0
即可。
Template
INCAR
for all purpose
1 | SYSTEM = 2CMO2CIOVac_4by1 |
Test
Rhino & Crane
1 | module load compiler/intel/19 intel-mkl/19 openmpi/4.0 vasp/5.4 |
1 | module load compiler/intel/15 intel-mkl/15 openmpi/1.10 |
Test-succe
Successive jobs
1 |
|
Test-spiral
Several qSpiral’s
1 | rm WAVECAR |