首先对Cu单胞进行结构优化(bulk计算),然后使用优化的结构进行切割,再进行计算(由于晶胞已经优化过,所以本次计算其实是单点计算)。大师兄提到:
Cu(111) slab 模型(POSCAR)的制作流程(复习一下)。**注意:**前面我们用的是Conventional cell,下面用的是Primitive Cell。 一般来说用Conventional cell
, FCC的金属可以用Primitive Cell
但对于其他体系,通过Primitive Cell
切出来表面模型有问题
我准备两种都验证一下。
使用Conventional Cell建立slab模型
切割结构
将bulk计算完毕的CONTCAR文件用Vesta打开,再转换为.cif
文件使用Materials Studio打开
Step1:Build-Surface-Cleave Surface
Angstrom
是单位埃
,需要切割的晶面是(111),相应的平面方程为x + y + z − 1 = 0 x+y+z-1=0 x + y + z − 1 = 0 ,使用点到直线的距离公式即可求出晶面间距离,,即厚度thickness
PS:之前111
晶面是啥都给整忘了,算个点到直线的距离也能算错,真该抽自己两巴掌回去恶补高等数学
😭
以下是来自维基百科的关于米勒指数以及111
晶面的介绍,很形象了
平面ABC为:x + y + z − 1 = 0 x+y+z-1=0 x + y + z − 1 = 0 ,点D为(1,1,0)
算一下厚度:
d = ∣ A x 0 + B y 0 + C z 0 ∣ A 2 + B 2 + C 2 = 1 3 a ≈ 1 3 × 3.63468 ≈ 2.0984 d=\dfrac{|Ax_0+By_0+Cz_0|}{\sqrt{A^2+B^2+C^2}}=\dfrac{1}{\sqrt{3}}a\approx \dfrac{1}{\sqrt{3}}\times 3.63468 \approx 2.0984
d = A 2 + B 2 + C 2 ∣ A x 0 + B y 0 + C z 0 ∣ = 3 1 a ≈ 3 1 × 3 . 6 3 4 6 8 ≈ 2 . 0 9 8 4
在切割晶面时,thickness
设置为4.0 (4.0 = 1.0 × 4 4.0 = 1.0 \times 4 4 . 0 = 1 . 0 × 4 ),即四倍的晶胞参数、四层原子,按一下TAB
,软件软件会自动计算四层原子的真是厚度(单位:Angstrom埃),大约是8.394 ≈ 4 × 2.0984 8.394 \approx 4\times 2.0984 8 . 3 9 4 ≈ 4 × 2 . 0 9 8 4 ,这与我们手动计算的晶面间距离2.0984的四倍相符
Step2:添加真空层,Build-Crystal-Build vacuum slab-Vacuum orientation:C
Step3:右键-lattice parameters
导出为.cif
,vesta打开转换为POSCAR
,
INCAR
如下
1 2 3 4 5 6 7 8 9 10 11 12 System = Cu-conventional-slab ISMEAR = 1 SIGMA = 0.1 ALGO = Fast ENCUT = 450 # the system is too huge to adopt huge ENCUT EDIFF = 1E-5 LDIPOL = .TRUE. IDIPOL = 3 NWRITE = 0 LWAVE = .FALSE. LCHARG = .FALSE. NCORE = 20
Slab模型虽然是代表表面,但是实际上在z方向是固体-真空-固体-真空-…的交替。如果我们建立的Slab模型在z方向是非对称的,模型就会产生一个沿z方向的偶极。偶极会产生静电势,静电势接着会影响模型的镜像(周期性边界条件)。最后算出来的模型的总能量和力与真实情况是不相符的。因此我们需要方法去矫正这种虚假的静电影响。
一种常用的方法就是偶极矫正,在真空部分加入一个超窄的但是方向相反的偶极。这样一来,固体模型产生的偶极和真空中的偶极就会相互抵消。模型和其镜像之间的静电势影响就会抵消
微调KPOINTS
1 2 3 4 5 K-POINTS 0 Gamma 13 13 1 0 0 0
计算结果
1 2 [ctan@baifq-hpc141 Cu-conventional-slab]$ grep ' without' OUTCAR energy without entropy= -55.91176854 energy(sigma->0) = -55.91397643
PS:最近学迷糊了,关于收敛
脑海中有一个极其不正且的理解
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 [ctan@baifq-hpc141 bulk-calc]$ grep accuracy OUTCAR reached required accuracy - stopping structural energy minimisation [ctan@baifq-hpc141 bulk-calc]$ cat OSZICAR N E dE d eps ncg rms rms(c) DAV: 1 0.103476848532E+03 0.10348E+03 -0.27847E+04 6720 0.246E+03 DAV: 2 -0.180387697818E+02 -0.12152E+03 -0.12091E+03 7280 0.155E+02 DAV: 3 -0.185227503579E+02 -0.48398E+00 -0.48396E+00 10160 0.132E+01 DAV: 4 -0.185240376489E+02 -0.12873E-02 -0.12873E-02 8200 0.464E-01 DAV: 5 -0.185240414620E+02 -0.38131E-05 -0.38134E-05 10480 0.143E-02 0.154E+01 DAV: 6 -0.164394189736E+02 0.20846E+01 -0.72731E+01 6800 0.881E+01 0.783E+00 DAV: 7 -0.149577606472E+02 0.14817E+01 -0.11165E+01 6720 0.344E+01 0.111E+00 DAV: 8 -0.149148685722E+02 0.42892E-01 -0.18431E-02 7280 0.139E+00 0.620E-01 DAV: 9 -0.149081819010E+02 0.66867E-02 -0.51836E-02 8440 0.220E+00 0.636E-02 DAV: 10 -0.149081753161E+02 0.65849E-05 -0.22202E-04 9000 0.149E-01 0.115E-02 DAV: 11 -0.149081715196E+02 0.37964E-05 -0.16862E-06 8520 0.968E-03 0.844E-04 DAV: 12 -0.149081716052E+02 -0.85577E-07 -0.88627E-08 4640 0.248E-03 1 F= -.14908172E+02 E0= -.14905377E+02 d E =-.149082E+02 N E dE d eps ncg rms rms(c) DAV: 1 -0.149363274123E+02 -0.28156E-01 -0.51946E-01 6720 0.830E+00 0.131E+00 DAV: 2 -0.149199449776E+02 0.16382E-01 -0.41291E-01 6720 0.646E+00 0.538E-01 DAV: 3 -0.149119014518E+02 0.80435E-02 -0.68998E-02 6720 0.271E+00 0.192E-01 DAV: 4 -0.149112107699E+02 0.69068E-03 -0.11896E-03 9800 0.216E-01 0.117E-02 DAV: 5 -0.149112123403E+02 -0.15704E-05 -0.80430E-06 7320 0.267E-02 0.594E-03 DAV: 6 -0.149112142891E+02 -0.19488E-05 -0.13229E-06 4760 0.997E-03 0.128E-04 DAV: 7 -0.149112142406E+02 0.48522E-07 -0.22610E-08 3560 0.101E-03 2 F= -.14911214E+02 E0= -.14908447E+02 d E =-.304264E-02 N E dE d eps ncg rms rms(c) DAV: 1 -0.150389301673E+02 -0.12772E+00 -0.26022E+00 6720 0.187E+01 0.290E+00 DAV: 2 -0.149566578541E+02 0.82272E-01 -0.20265E+00 6720 0.143E+01 0.119E+00 DAV: 3 -0.149175257623E+02 0.39132E-01 -0.34317E-01 6720 0.604E+00 0.437E-01 DAV: 4 -0.149140056079E+02 0.35202E-02 -0.72028E-03 10080 0.565E-01 0.378E-02 DAV: 5 -0.149139977907E+02 0.78172E-05 -0.11528E-04 7840 0.108E-01 0.134E-02 DAV: 6 -0.149140005388E+02 -0.27480E-05 -0.66656E-06 7680 0.220E-02 0.371E-04 DAV: 7 -0.149140005655E+02 -0.26792E-07 -0.64306E-08 3960 0.196E-03 3 F= -.14914001E+02 E0= -.14911298E+02 d E =-.582896E-02
这是上一节里的关于bulk计算(结构优化)的部分内容,可以看到, reached required accuracy - stopping structural energy minimisation
——离子步已经收敛,在之后的OSZICAR
里,电子步迭代最多7步,并未超过设置的最大电子步数目。因此对于bulk计算,电子步和离子步都收敛
而对于slab模型的单点计算,我也傻傻的这么做😢
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 [ctan@baifq-hpc141 conventional-slab-static]$ grep accuracy OUTCAR [ctan@baifq-hpc141 conventional-slab-static]$ cat OSZICAR N E dE d eps ncg rms rms(c) DAV: 1 0.178654188479E+04 0.17865E+04 -0.88940E+04 10388 0.264E+03 DAV: 2 0.200572973408E+03 -0.15860E+04 -0.15355E+04 10388 0.519E+02 DAV: 3 -0.535557174826E+02 -0.25413E+03 -0.23428E+03 10438 0.249E+02 DAV: 4 -0.683234131101E+02 -0.14768E+02 -0.14274E+02 11572 0.815E+01 DAV: 5 -0.687193157556E+02 -0.39590E+00 -0.39405E+00 12400 0.117E+01 0.292E+01 RMM: 6 -0.611494529970E+02 0.75699E+01 -0.15131E+02 11054 0.104E+02 0.161E+01 RMM: 7 -0.558685188476E+02 0.52809E+01 -0.32335E+01 10772 0.530E+01 0.226E+00 RMM: 8 -0.559296519539E+02 -0.61133E-01 -0.22789E+00 11552 0.614E+00 0.111E+00 RMM: 9 -0.559488617332E+02 -0.19210E-01 -0.37622E-01 11539 0.361E+00 0.509E-01 RMM: 10 -0.559454147061E+02 0.34470E-02 -0.13294E-01 12844 0.193E+00 0.214E-01 RMM: 11 -0.559437301097E+02 0.16846E-02 -0.22655E-02 12875 0.691E-01 0.208E-01 RMM: 12 -0.559413428432E+02 0.23873E-02 -0.55145E-03 11960 0.354E-01 0.586E-02 RMM: 13 -0.559414638149E+02 -0.12097E-03 -0.17465E-03 13023 0.187E-01 0.323E-02 RMM: 14 -0.559411451635E+02 0.31865E-03 -0.83089E-04 11756 0.134E-01 0.373E-02 RMM: 15 -0.559412390394E+02 -0.93876E-04 -0.47990E-04 11372 0.168E-01 0.284E-02 RMM: 16 -0.559414153722E+02 -0.17633E-03 -0.21175E-04 11475 0.107E-01 0.129E-02 RMM: 17 -0.559414836424E+02 -0.68270E-04 -0.10022E-04 11751 0.526E-02 0.889E-03 RMM: 18 -0.559415856898E+02 -0.10205E-03 -0.51724E-05 11898 0.366E-02 0.682E-03 RMM: 19 -0.559416259149E+02 -0.40225E-04 -0.26297E-05 11504 0.350E-02 0.861E-03 RMM: 20 -0.559416406670E+02 -0.14752E-04 -0.10748E-05 11263 0.208E-02 0.367E-03 RMM: 21 -0.559416498741E+02 -0.92071E-05 -0.47420E-06 8911 0.102E-02 0.119E-03 RMM: 22 -0.559416543655E+02 -0.44914E-05 -0.22030E-06 7155 0.977E-03 0.193E-03 RMM: 23 -0.559416573370E+02 -0.29715E-05 -0.14726E-06 6702 0.894E-03 0.135E-03 RMM: 24 -0.559416575122E+02 -0.17515E-06 -0.44209E-07 6318 0.507E-03 1 F= -.55941658E+02 E0= -.55944345E+02 d E =0.806296E-02
不管怎么修改ALGO
、ENCUT
等参数,grep accuracy OUTCAR
始终不返回 reached required accuracy - stopping structural energy minimisation
,后来我才意识到,这是单点计算 ,NSW = 0
,并不会进行离子步迭代呀,所以我们只需关注电子步收敛即可,很明显电子步收敛,OUTCAR
里的信息也可说明
1 2 [ctan@baifq-hpc141 conventional-slab-static]$ grep abort OUTCAR ------------------------ aborting loop because EDIFF is reached ----------------------------------------
This is definitely a stupid, stupid and stupid mistake 😭
就写到这,吃饭去了,待会还要回实验室
使用Primitive Cell
使用bulk计算
且收敛的CONTCAR
进行slab模型的建立,操作还是类似的
值得注意的是,需要先find symmetry ,然后才能转换为primitive cell
然后impose symmetry
,接着再转换为primitive cell
,然后建立slab模型
POSCAR
会有些不同
1 2 3 4 5 6 7 8 9 10 11 12 CONTCAR\(1\1\1) 1.0 2.5701000690 0.0000000000 0.0000000000 -1.2850500345 2.2257719501 0.0000000000 0.0000000000 0.0000000000 21.2954006195 Cu 4 Direct 0.000000000 0.000000000 0.000000000 0.666670000 0.333330000 0.098540000 0.333330000 0.666670000 0.197080000 0.000000000 0.000000000 0.295620000
计算后的能量也有所不同:
1 2 (base) storm@DESKTOP-HE4FQ8Q:~/my-learn/ex42/Cu-primitive-slab$ grep ' without' OUTCAR energy without entropy= -13.97087892 energy(sigma->0) = -13.97120814
值得一提的是,在白老师的计算集群上运行时报错了(vasp.6.4.2
)
如果截断能ENCUT
过小可能报错Error EDDDAV: Call to ZHEGV failed. Returncode = 7 1 8
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 [ctan@baifq-hpc141 Cu-primmitive-slab]$ ls INCAR KPOINTS POSCAR POTCAR [ctan@baifq-hpc141 Cu-primmitive-slab]$ clear [ctan@baifq-hpc141 Cu-primmitive-slab]$ sbatch vasp Submitted batch job 4321 [ctan@baifq-hpc141 Cu-primmitive-slab]$ tail -f OUTCAR --------------------------------------- Ionic step 1 ------------------------------------------- --------------------------------------- Iteration 1( 1) --------------------------------------- POTLOK: cpu time 0.0215: real time 0.0258 SETDIJ: cpu time 0.0109: real time 0.0118 EDDAV: cpu time 0.7451: real time 0.7613 DOS: cpu time 0.0052: real time 0.0060 -------------------------------------------- LOOP: cpu time 0.7826: real time 0.8050 eigenvalue-minimisations : 2548 total energy-change (2. order) : 0.3445715E+03 (-0.1837296E+04) number of electron 44.0000000 magnetization augmentation part 44.0000000 magnetization DIPCOR: dipole corrections for dipol direction 3 min pos 155, dipolmoment 0.000000 0.000000 0.000026 electrons x Angstroem Tr[quadrupol] -31.061780 energy correction for charged system 0.000000 eV dipol+quadrupol energy correction -0.000000 eV added-field ion interaction 0.001451 eV (added to PSCEN) Free energy of the ion-electron system (eV) --------------------------------------------------- alpha Z PSCENC = 96.14159556 Ewald energy TEWEN = 16384.30326894 -Hartree energ DENC = -21746.47963692 -exchange EXHF = 0.00000000 -V(xc)+E(xc) XCENC = 182.01436818 PAW double counting = 4912.82663951 -5336.19386850 entropy T*S EENTRO = 0.00034874 eigenvalues EBANDS = 288.07434016 atomic energy EATOM = 5563.88447798 Solvation Ediel_sol = 0.00000000 --------------------------------------------------- free energy TOTEN = 344.57153365 eV energy without entropy = 344.57118491 energy(sigma->0) = 344.57141740 -------------------------------------------------------------------------------------------------------- --------------------------------------- Iteration 1( 2) --------------------------------------- ----------------------------------------------------------------------------- | | | EEEEEEE RRRRRR RRRRRR OOOOOOO RRRRRR | E R R R R O O R R | E R R R R O O R R | EEEEE RRRRRR RRRRRR O O RRRRRR | E R R R R O O R R | | E R R R R O O R R | EEEEEEE R R R R OOOOOOO R R | | | Error EDDDAV: Call to ZHEGV failed. Returncode = 7 1 8 | | | | ----> I REFUSE TO CONTINUE WITH THIS SICK JOB ... BYE!!! <---- | | | -----------------------------------------------------------------------------
小结
此计算是在bulk计算的基础上(最优结构 )进行的单点计算,计算时不能进行离子弛豫,不能进行离子步迭代 ,默认NSW=0
不进行离子弛豫,那么自然不能设置离子步收敛条件,不能设置EDIFFG
如果不报错运行但结果不收敛可试着增大电子步数NSW
以及截断能ENCUT