avatar

目录
VASP计算汇总教程

根据2018.9-2019.2之间的三个VASP计算实例总结,为今后所有VASP计算整理模板。以后其它VASP功能教程也应当添加在此处。

Preparation of the first calculation

DOS (态密度)

你可能发现所有原子的spd态的密度和与DOSCAR给出的总态密度不符(偏小)。这是因为计算spd态密度对应原子周围的电子,而加和所有原子周围会遗漏一些结构中的空隙中的态密度。

van de Waals & dipole

IVDW, 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

https://cms.mpi.univie.ac.at/wiki/index.php/VdW-DF_functional_of_Langreth_and_Lundqvist_et_al.#cite_note-klimes2010-3

需要附带一个文件?

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 the WAVECAR file) and ICHARG=1.
  • Use linear mixing by setting BMIX=0.0001 and BMIX_MAG=0.0001.
    Mix slowly, i.e., reduce AMIX and AMIX_MAG.
  • REDUCE MAXMIX, the number of steps stored in the Broyden mixer (default MAXMIX=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:
bash
1
2
3
4
5
6
7
8
TITEL  = PAW_PBE Sr_sv 07Sep2000
LULTRA = F use ultrasoft PP ?
IUNSCR = 1 unscreen: 0-lin 1-nonlin 2-no
RPACOR = 2.200 partial core radius
POMASS = 87.620; ZVAL = 10.000 mass and valenz
RCORE = 2.500 outmost cutoff radius
RWIGS = 4.040; RWIGS = 2.138 wigner-seitz radius (au A)
ENMAX = 229.353; ENMIN = 172.014 eV

从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

  • 如下:

    Code
    1
    2
    3
    ZBRENT: 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扩展。。。。。需要新安装,好麻烦。

  • 出现奇怪的非收敛问题:检查INCARINCAR(!)以及POSCAR

  • 想要让OZICAR显示整理过的矢量磁矩信息,单纯设定Non-Colinear的参数是不够的,还需要有LAMBDA设置。如果非共线性计算并没有限制磁矩所以没有设置LAMBDA,那很简单,LAMBDA = 0即可。

Template

INCAR for all purpose

bash
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
SYSTEM    = 2CMO2CIOVac_4by1


### Read Previous Data & Output Options
ICHARG = 1 # 1:Read from previous
LCHARG = .TRUE.
LWAVE = .FALSE.
LORBIT = 11 # Whether the PROCAR or PROOUT files are written
#SYMPREC = 1E-4 # POSCAR accuracy



### Convergence Control & Mixing Parameters and Calculation Limits
PREC = Accurate # "precision" mode
ENCUT = 400 eV # ENMAX is identical to ENCUT
#LMAXMIX = 4 # L channel mixing for the mixing charge and wavefunction
LREAL = AUTO
ALGO = VERY_FAST
AMIX = 0.1
BMIX = 0.00001
AMIX_MAG = 0.2
BMIX_MAG = 0.00001
ISMEAR = -5 # Gaussian Smearing of the Fermi function
SIGMA = 0.2 # Width of the the gaussian smearing ( -2 read the occupancies formt the incar or potcar file and keep it constant)
#ISYM = -1



### Colinear, Non-Colinear Spin and SOC
ISPIN = 1 # 1:NM 2:CL
#MAGMOM = 18*0.0 2 2 2 2
#LNONCOLLINEAR = .TRUE.
#LSORBIT = .TRUE.
#SAXIS = 0 0 1



### Constrained local magnetic moments
#I_CONSTRAINED_M = 1 # 1:direction 2:size and direction
#M_CONSTR = 24*0.0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 60*0.0
#LAMBDA = 10
#RWIGS = 2.138 1.402 0.820



### Spin Spiral
#LASPH = .TRUE.
#LSPIRAL = .TRUE.
#QSPIRAL = $i $j 0
#ENINI = 320 eV # for spiral



### Ion Motion Control and Limits
NSW = 0
ISIF = 3
#POTIM = 0.2
#IBRION = 2
EDIFFG = -0.001
EDIFF = 1E-6



### Electron Motion Control and Limits
NELM = 300
#NELMDL = 20



### van de Waals and dipole




### LDA



### Hardware System Control & Parallel
NPAR = 6

Test Rhino & Crane

Code
1
2
module load compiler/intel/19 intel-mkl/19 openmpi/4.0  vasp/5.4
mpirun vasp_ncl
Code
1
2
module load compiler/intel/15 intel-mkl/15 openmpi/1.10
mpirun /home/tsymbal/kaihuang/bin/vasp/vasp_ncl

Test-succe Successive jobs

Code
1
2
3
4
5
6
7
8
 
mpirun vasp_ncl

cp ./*.out CHGCAR INCAR OUTCAR OSZICAR ./*.err ./某个地址
rm WAVECAR
echo "" > ./*.out
echo "" > ./*.err
rm CONTCAR CHG vasprun.xml PROCAR OSZICAR IBZKPT

Test-spiral Several qSpiral’s

bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
rm WAVECAR
rm CHGCAR
rm IBZKPT

cp ./NCL_SCF/CHGCAR ./

for i in 0.25 -0.25
do

#j=`echo "scale=3; $i*-1" | bc`
cat >INCAR << eof

eof

mpirun vasp_ncl

mkdir "QSPIRAL${i}"
cp ./*.out CHGCAR INCAR OUTCAR OSZICAR ./*.err ./"QSPIRAL${i}"
rm WAVECAR
echo "" > ./*.out
echo "" > ./*.err
rm CONTCAR CHG vasprun.xml PROCAR OSZICAR IBZKPT XDATCAR EIGENVAL PCDAT INCAR

done
文章作者: HuangXiaoKai
文章链接: 2020/03/04/VASP计算汇总教程/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 篁竹水声de公共空间
打赏
  • 微信
    微信
  • 支付宝
    支付宝

评论