|||
问题的提出见附注。
0.Hejiangang谈优化
(1) 全局优化与局域优化
(2) 赝势与截断半径、截断能
赝势将假象的不参与成键的芯电子及核电荷产生的势当作一个假象的电荷中心产生的势来对待,价电子产生的势则用平面波来描述;增加截断能,及将芯电子产生的变化剧烈的势中的一部分划入价电子产生的势来对待,因此需要更多的平面波来描述,芯电子以外这部分势。
若赝势中芯电子的划分不合理,尤其是在高压情形下,部分芯电子会参与反应,因此,对于不合理的赝势增加截断能,芯电子的错误划分决定了还是不合理;对与合理的赝势增加截断能计算成本将大大增加。一般1.5 ENMAX就已足够,截断能测试势能量收敛,并不是必须的。
而且截断能测试时,对每分子势精确到1meV是没有意义的;几meV可能是由数值误差引起。所以对于ENMAX=228 eV的氢截断能选为800 eV是没有必要的,选400 eV就足够了!!!!【详见氢的截断能测试,当ENMAX=700 eV势,选1000 eV 接近1.5倍认为合理,所以当ENMAX=228 eV时,选400 eV确实是足够了!】
(3)KPOINTS
a*k=40,即1/b*k=40,k/b=40,亦寄 b/k=0.025 A-1,即倒空间b矢量的划分足够细
(4) 准确的计算压力的方式并不是通过设定PST=来设定,而是通过固定不同体积优化 (POSCAR第二行指定体积,INCAR ISIF=4),通过状态方程拟合得到压力。
(5)声子谱是通过力来计算的,通过不同软件计算声子谱时,须将结构在各软件下再优化,已得到各软件下完全relax的构型,再计算声子谱。 采用vasp 优化势,是否完全relax也是检查受力,或通过less OSZICAR查看是否只有 1F.查看:Craig J Fennie 文章
若OUTCAR异常终止,Log文件提示cp CONTCAR to POSCAR,则表示优化未结束,结构没有完全得到弛豫,应多次优化; 若数次优化仍为得到好的结果,则考虑改变IBRION,使等于1试试。 IBRION适用于对已经历多次优化的构型,找到最稳定的结构(即局域优化)。类似错误有:ZBRENT: increasing internall也表示优化没完成
(6)错误::LAPACK: Routine ZPOTRF failed....Signal 15 received.
表示程序ZPOTRF运行错误,可以键长原子间的最近距离是否合理, grep nearest OUTCAR;并考虑加入IAlgo=48参数优化。
(7)错误:Very BAD NEWS! internal error in subroutine SGRCON
多由结构不合理导致,即结构不合理VASP子程序SGRCON无法准确找到结构的对称性。可通过调节SYMPrec来改观,调大调小均可,只要能使程序SGRCON找到对称性即可,SGRCON找到对称性即可根据对称性来分配k点,决定哪些k点的积分可以根据对称性省去(对角化)。或导入MS找对称性或采用ISYM=0
(8) 单点计算选用ISMEAR=-5,可以准确的得到能量; sigma太小会影响计算量。
增加截断能相当于相当于波矢量增加,即λ减小,如公式所示2πk=2π/λ。
1. GGY谈优化
(1)ISYM一般不要设置为0;特别是当你想知道某一对称性的结构在特定压力下的能量时;设置ISYM=0会使计算变慢。
如果ISYM没有设置为0,而优化到某一压力下时对称性发生了变化,则可查看变化后的对称性,提取该对称性结构,在不同压力点下优化
(2)注意并不是所有结构都是金属,优化的INCAR文件中请注意选择ISMEAR = 1;SIGMA = 0.2或ISMEAR = 0;SIGMA = 0.05;虽然这种选择对能量和焓的影响不大
(3)优化前,不仅仅要进行k点测试,一般还要进行截断能测试,对ENMAX=250 eV,选择400 eV的截断能可能有点小。特别是对于焓差图中焓差较小的两相,如不进行截断能测试,则有可能改变相变顺序。
2. 优化之我见
当截断能相同时,在不同的k-mesh密度下,对同一结构计算的焓值可以相差数十meV,足以与其他结构的焓差,即改变相变顺序(因为实际操作时,不可能是所有结构的k-mesh都选为一样)。
当然,截断能对焓的影响更大;但不同结构可以选择相同的截断能,因此计算焓差时,一定程度上可以抵消截断能(没收敛)带来的误差。
保险的做法是,在正式优化前:
1) 选定较小的截断能,改变k-mesh密度,对每一结构在高压端和低压端分别进行k-mesh收敛测试,直到选择的k-mesh可使焓变收敛到1meV的范围;
2) 选定较小的k-mesh密度(或选择上述可使焓变收敛的k-mesh密度),改变截断能,对每一结构(高压端或低压端)进行截断能收敛测试,直到选择的截断能可使焓变收敛到1meV的范围。
当然,为加快计算进度,对预测的结构,可以分两步进行优化:
1) 得到各压力点下的位形;应选择较小的参数如小的k-mesh密度及截断能,将预测得到的结构在不同压力下优化,得到不同压力下的位形文件后,在以此作为输入,进行精细优化--见2);
2)选择经收敛测试的k-mesh和截断能,对每一压力点下的结构分别进行精细优化。
3. 优化问题一
红色标注行优化均由问题,可用下述语句check优化任务是否正常结束:
grep Volun */OUTCAR* | sort -n
为便于查找可能出现的错误,在每个压力下优化时,最后保留vasp.out, output.* 或OSZICAR文件。
100 126.71 -28.67789959 OUTCAR_100
195.99 114.00 -21.18131813 OUTCAR_200
296.84 104.53 -14.38771785 OUTCAR_300
500.07 91.30 -2.21945575 OUTCAR_500
806.63 78.04 13.59752583 OUTCAR_800
999.98 71.82 22.96121416 OUTCAR_1000
1150.02 67.98 29.50825142 OUTCAR_1150
2419.72 50.79 75.46889240 OUTCAR_2420
2449.48 50.55 76.41759557 OUTCAR_2450
2500 50.20 77.98675940 OUTCAR_2500
2970.12 47.03 92.22965916 OUTCAR_2970
2999.89 46.86 93.10865490 OUTCAR_3000
3500.01 44.38 107.33779419 OUTCAR_3500
3870.56 47.65 8.72578250 OUTCAR_1500
4000.04 42.50 120.89145326 OUTCAR_4000
4499.81 40.97 133.91560726 OUTCAR_4500
5000.21 39.67 146.50033611 OUTCAR_5000
26425.5 30.66 -602.13387243 OUTCAR_2000
(1) 150GPa下优化顺利结束,但external pressure 与Pullay stress相差巨大:
OUTCAR文件摘录如下:
。。。。。。。。
POSITION TOTAL-FORCE (eV/Angst)
-----------------------------------------------------------------------------------
0.95843 -0.81563 0.00000 -0.412732 0.357739 0.000000
-0.00041 1.63055 4.20389 0.000185 -0.715158 0.000000
0.51813 0.46398 8.40778 0.412547 0.357419 0.000000
0.51839 -0.46442 6.30583 0.412732 -0.357739 0.000000
-0.00026 0.92840 10.50972 -0.000185 0.715158 0.000000
0.95802 0.81492 2.10194 -0.412547 -0.357419 0.000000
-----------------------------------------------------------------------------------
total drift: 0.000000 0.000000 0.000917
【力更薄就没有收敛!!!】
................
Total 73.44975 165.46821 106.42305 -0.07131 0.00000 0.00000
in kB 2469.66293 5563.67730 3578.35189 -2.39771 0.00000 0.00000
external pressure = 2370.56 kB Pullay stress = 1500.00 kB
............................
(2) 200 GPa下优化感觉无疾而终(异常终止),external pressure更是离谱得惊人:
..............
FORCE on cell =-STRESS in cart. coord. units (eV):
Direction XX YY ZZ XY YZ ZX
--------------------------------------------------------------------------------------
Alpha Z 1745.29267 1745.29267 1745.29267
Ewald -2411.59945 -2600.71858 -3664.41244 2.43850 0.00000 0.00001
Hartree 761.34970 1648.67961 -28.78065 1.84892 0.00000 0.00001
E(xc) -826.85658 -819.88285 -822.40907 -0.00243 0.00000 0.00000
Local 1268.22934 -73.54558 3277.49647 -4.97473 -0.00001 -0.00002
n-local -740.38158 -697.65742 -763.59204 -21.65071 0.87305 0.71737
augment -838.14402 -390.88733 -895.13417 0.49185 0.00000 0.00000
Kinetic 1288.92587 1231.59920 1269.40649 30.78766 2.08077 1.71368
Fock 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
-------------------------------------------------------------------------------------
Total 125.52885 1273.52070 117.86727 -0.90062 0.00000 0.00000
in kB 6560.33684 66556.20925 6159.93028 -47.06771 0.00019 0.00007
external pressure = 24425.49 kB Pullay stress = 2000.00 kB
......................
POSITION TOTAL-FORCE (eV/Angst)
-----------------------------------------------------------------------------------
0.31362 -0.66089 0.00000 -4.070092 7.484287 0.000000
-0.00075 1.32049 3.67598 0.008049 -14.954633 0.000000
0.55566 0.93769 7.35196 4.062043 7.470346 0.000000
0.55663 -0.93937 5.51397 4.070092 -7.484287 0.000000
-0.00097 1.87706 9.18996 -0.008049 14.954633 0.000000
0.31287 0.65959 1.83799 -4.062043 -7.470346 0.000000
-----------------------------------------------------------------------------------
total drift: 0.000000 0.000000 0.003188
【似乎力根本就没有收敛!】
.............
FREE ENERGIE OF THE ION-ELECTRON SYSTEM (eV)
---------------------------------------------------
free energy TOTEN = -640.40289976 eV
energy without entropy= -640.40431470 energy(sigma->0) = -640.40337141
enthalpy is TOTEN = -602.13387243 eV P V= 38.26902733
d Force = 0.5084153E+01[ 0.106E+02,-0.459E+00] d Energy = 0.6115515E+03-0.606E+03
d Force =-0.2551843E+01[-0.127E+01,-0.383E+01] d Ewald = 0.1051214E+04-0.105E+04
POTLOK: cpu time 0.04: real time 0.04
WAVPRE: cpu time 0.00: real time 0.00
FEWALD executed in parallel
FEWALD: cpu time 0.00: real time 0.00
GENKIN: cpu time 0.14: real time 0.14
............
(3)优化的INCAR文件如下:
for i in 100 200 300 800 1150 2450 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
do
mkdir $i
cat > INCAR << EOF
SYSTEM = Various- local optimisation
PREC = Accurate
ENCUT =400.0
EDIFF = 1E-7
EDIFFG = -1E-3
#SYMPREC=1e-3
IBRION = 2
POTIM = 0.1
ISIF = 3
NSW = 100
PSTRESS = $i
ISMEAR = 1
SIGMA = 0.2
LREAL = .FALSE. 【难道与设置LREAL=.FALSE.有关?】
#LCHARG = FALSE
#LWAVE = FALSE
EOF
cp CONTCAR_$i POSCAR
# start calculation
$MPIDIR/mpirun -np $NP -machinefile $CURDIR/.nodelist $EXEDIR/vasp > vasp.out
wait
mv CONTCAR ./$i/CONTCAR_$i
mv OUTCAR ./$i/OUTCAR_$i
done
(4)297 GPa优化顺利结束时的OUTCAR摘录
。。。。。。。。。。。。
FORCE on cell =-STRESS in cart. coord. units (eV):
Direction XX YY ZZ XY YZ ZX
--------------------------------------------------------------------------------------
Alpha Z 1137.76956 1137.76956 1137.76956
Ewald -2637.50323 -2637.50323 -2302.31741 0.00000 0.00000 0.00000
Hartree 265.24897 265.24897 372.64811 0.00000 0.00000 0.00000
E(xc) -343.75438 -343.75438 -343.39975 0.00000 0.00000 0.00000
Local 956.40336 956.40339 559.30474 -0.00004 0.00000 0.00000
n-local -468.97180 -356.19216 -428.25217 -14.91427 0.48025 0.77786
augment 151.53199 151.53198 145.66696 0.00006 0.00000 0.00000
Kinetic 926.91824 1013.21267 945.75355 -4.97646 0.88962 -0.69048
Fock 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
-------------------------------------------------------------------------------------
Total 87.17975 87.17975 87.17358 0.00000 0.00000 0.00000
in kB 2970.18998 2970.18999 2969.97983 0.00000 0.00000 0.00000
external pressure = 0.12 kB Pullay stress = 2970.00 kB
【从中可以看出,完美优化时,external pressure 为0最好】
【对话摘录:
external pressure + Pulllay stress 的值就是压力。
如果你优化的合理。 最后external pressure 是接近0的。
】
。。。。。。。。
POSITION TOTAL-FORCE (eV/Angst)
-----------------------------------------------------------------------------------
0.99051 -0.57187 0.00000 -0.000336 0.000194 0.000000
0.00000 1.14375 3.46198 0.000000 -0.000387 0.000000
0.98970 0.57141 6.92397 0.000336 0.000194 0.000000
0.98970 -0.57141 5.19298 0.000336 -0.000194 0.000000
0.00000 1.14281 8.65496 0.000000 0.000387 0.000000
0.99051 0.57187 1.73099 -0.000336 -0.000194 0.000000
-----------------------------------------------------------------------------------
total drift: 0.000000 0.000000 0.000000
【力收敛得很好】
。。。。。。。。。。。。。。
4. 优化遇到的问题二
(1)Strange of the optimization of C2m structure of XH6
a ). KPOINTS file
EA
0
Monkhorst-pack
19 19 9
0 0 0
b ). 遇到的问题描述
问题一:
压力越大,晶格常数越小,倒空间长度越大;在相同的k mensh 密度(Auto 方式)下,倒空间的分割数将越多;当采用Monkhorst-pack方式时,倒空间各个方向的分割数确定了,总的分割数在各个压力下应该统一为19*19*9=3249 (不考虑对称性引起的实际分割数减小),此时如果各压力下的分割数不一致,则应考虑是否在优化过程中对称性发生了变化。
而下面实际观察到的分割数:
在100、300、500、1000、1500 kBar压力下,分割数为1625;
而在800、2000、2500、3000、4000 kBar下,分割数为860,似乎看不到分割数随压力变化的明显规律。
推测有可能是对称性发生了变化?
/c2m-sch6-300G-21-12/first_opt> grep NKPTOUTCAR_
OUTCAR_100: k-points NKPTS = 1625
OUTCAR_1000: k-points NKPTS = 1625
OUTCAR_1500: k-points NKPTS = 1625
OUTCAR_2000: k-points NKPTS = 860
OUTCAR_2500: k-points NKPTS = 860
OUTCAR_300[300 kbar]: k-points NKPTS = 1625
OUTCAR_3000: k-points NKPTS = 860
OUTCAR_3500: k-points NKPTS = 860
OUTCAR_4000: k-points NKPTS = 860
OUTCAR_500: k-points NKPTS = 1625
OUTCAR_800: k-points NKPTS = 860
问题二: 为什么100、300、500的OUTCAR文件特别大?
du -haOUTCAR_*
106M OUTCAR_100
54M OUTCAR_1000
56M OUTCAR_1500
22M OUTCAR_2000
21M OUTCAR_2500
185M OUTCAR_300
30M OUTCAR_3000
16M OUTCAR_3500
16M OUTCAR_4000
12K OUTCAR_4500
67M OUTCAR_500
12K OUTCAR_5000
12K OUTCAR_5500
12K OUTCAR_6000
26M OUTCAR_800
问题三:为什么其他压力4500、5000、5500、6000,优化过程中报错? 是什么错误导致了优化自动终止?
OUTCAR_6000 文件部分内容如下:
.....
LATTYP: Found a base centered monoclinic cell.
ALAT = 10.7968166255
B/A-ratio = 0.2843729178
C/A-ratio = 0.4125032756
COS(beta) = -0.8775607193
Lattice vectors:
A1 = ( -1.7390051049, -3.0576672854, 4.3733332633)
A2 = ( -3.4778552568, -0.5271972004, 4.3733440389)
A3 = ( 0.7459471293, 0.5125784332, -4.3607875297)
Analysis of symmetry for initial positions (statically):
=====================================================================
Subroutine PRICEL returns:
Original cell was already a primitive cell.
Routine SETGRP: Setting up the symmetry group for a
base centered monoclinic supercell.
Subroutine GETGRP returns: Found 4 space group operations
(whereof 4 operations were pure point group operations)
out of a pool of 4 trial point group operations.
The static configuration has the point symmetry C_2h.
Analysis of symmetry for dynamics (positions and initial velocities):
=====================================================================
Subroutine PRICEL returns:
Original cell was already a primitive cell.
Routine SETGRP: Setting up the symmetry group for a
base centered monoclinic supercell.
Subroutine GETGRP returns: Found 4 space group operations
(whereof 4 operations were pure point group operations)
out of a pool of 4 trial point group operations.
The dynamic configuration has the point symmetry C_2h.
问题四:即使是采用Auto 方式产生KPOINTS,在静态计算(单点)计算时,也发生类似错误;真让人分解。
LATTYP: Found a base centered monoclinic cell.
ALAT = 10.7968166255
B/A-ratio = 0.2843729178
C/A-ratio = 0.4125032756
COS(beta) = -0.8775607193
Lattice vectors:
A1 = ( -1.7390051049, -3.0576672854, 4.3733332633)
A2 = ( -3.4778552568, -0.5271972004, 4.3733440389)
A3 = ( 0.7459471293, 0.5125784332, -4.3607875297)
Analysis of symmetry for initial positions (statically):
=====================================================================
Subroutine PRICEL returns:
Original cell was already a primitive cell.
Routine SETGRP: Setting up the symmetry group for a
base centered monoclinic supercell.
Subroutine GETGRP returns: Found 4 space group operations
(whereof 4 operations were pure point group operations)
out of a pool of 4 trial point group operations.
The static configuration has the point symmetry C_2h.
Analysis of symmetry for dynamics (positions and initial velocities):
=====================================================================
Subroutine PRICEL returns:
Original cell was already a primitive cell.
Routine SETGRP: Setting up the symmetry group for a
base centered monoclinic supercell.
Subroutine GETGRP returns: Found 4 space group operations
(whereof 4 operations were pure point group operations)
out of a pool of 4 trial point group operations.
The dynamic configuration has the point symmetry C_2h.
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-16 04:19
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社