VASP(计算前的各种测试)
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
VASP(计算前的各种测试)
(计算前的)验证
⼀、检验赝势的好坏:
(⼀)⽅法:对单个原⼦进⾏计算;
(⼆)要求:1、对称性和⾃旋极化均采⽤默认值;
2、ENCUT要⾜够⼤;
3、原胞的⼤⼩要⾜够⼤,⼀般设置为15 ?⾜矣,对某些元素还可以取得
更⼩⼀些。
(三)以计算单个Fe原⼦为例:
1、INCAR⽂件:
SYSTEM = Fe atom
ENCUT = 450.00 eV
NELMDL = 5 ! make five delays till charge mixing,详细意义见注释⼀
ISMEAR = 0
SIGMA=0.1
2、POSCAR⽂件:
atom
15.00
1.00 0.00 0.00
0.00 1.00 0.00
0.00 0.00 1.00
1
Direct
0 0 0
3、KPOINTS⽂件:(详细解释见注释⼆。
)
Automatic
Gamma
1 1 1
0 0 0
4、POTCAR⽂件:(略)
注释⼀:关键词“NELMDL”:
A)此关键词的⽤途:指定计算开始时电⼦⾮⾃洽迭代的步数(即
NELMDL gives the number of non-selfconsistent steps at the beginning),
⽬的是make calculations faster。
“⾮⾃洽”指的是保持charge density 不变,由于Charge density is used to set up the Hamiltonian, 所以“⾮⾃洽”也指保持初始的哈密顿量不变。
B)默认值(default value):
NELMDL = -5 (当ISTART=0, INIWA V=1, and IALGO=8时)
NELMDL = -12 (当ISTART=0, INIWA V=1, and IALGO=48时)
NELMDL = 0 (其他情况下)
NELMDL might be positive or negative.
A positive number means that a delay is applied after each ionic
movement -- in general not a convenient option. (在每次核运动之后)
A negative value results in a delay only for the start-configuration. (只在
第⼀步核运动之前)
C)关键词“NELMDL”为什么可以减少计算所需的时间?
Charge density is used to set up the Hamiltonian, then the wavefunctions are optimized iteratively so that they get closer to the exact wavefunctions of this Hamiltonian. From the optimized wavefunctions a new charge density is calculated, which is then mixed with the old input-charge density. A brief flowchart is given below.(参⾃Manual P105页)
⼀般情况下,the initial guessed wavefunctions是⽐较离谱的,在前NELMDL次⾮⾃洽迭代过程中保持charge density不变、保持初始的哈密顿量不变,只对wavefunctions进⾏优化,在得到⼀个与the exact
wavefunctions of initial Hamiltonian较为接近的wavefunctions后,再开
始同时优化charge density。
这样⼀来,计算时间要⽐⼀开始就同时优
化charge density 和wavefunctions短得多。
注释⼆:为什么这⾥只需要⼀个k点?
For atoms and molecules, the Bloch theorem does not apply, hence there is no need to use more than one single k-point. When more k-points are used,
only the interaction between the atoms (which should be zero) is described
more accurately.
(三)计算任务执⾏⽅法:
输⼊:vasp
(四)赝势好的判断标准:计算得到的OUTCAR⽂件中的“energy without entropy”能
量值在-0.001~-0.01 eV之间。
⼆、筛选合适的ENCUT⼤⼩:
(⼀)输⼊⽂件:
1、⽤脚本程序optencut.sh代替INCAR⽂件:
rm WAVECAR
for i in 100 150 200 250 300 350 400 450 500 550 600
do
cat > INCAR <
SYSTEM = bcc Fe
ENCUT = $i
ISTART = 0 ; ICHARG = 2
ISMEAR = -5
PREC = Accurate
!
echo "ENCUT = $i eV"; time vasp
E=$(grep "TOTEN" OUTCAR | tail -1| awk '{printf "%12.6f \n", $5}')
echo $i $E >> comment
done
2、POSCAR⽂件:
bcc Fe
2.866
1.00 0.00 0.00
0.00 1.00 0.00
0.00 0.00 1.00
2
Direct
0 0 0
0.5 0.5 0.5
3、KPOINTS⽂件:
Automatic generation
Monkhorst-Pack
9 9 9
0.0 0.0 0.0
4、POTCAR⽂件:(略)
(⼆)计算任务执⾏⽅法:
输⼊:dos2unix optencut.sh
bash optencut.sh
(三)判别标准:计算完成后得到comment⽂件,它列出了在每个ENCUT时计算得到的
相应的总能,只要总能变化在0.001 eV左右就⾜够了。
三、选择合适的k点数⽬:
(⼀)输⼊⽂件:
1、INCAR⽂件:
SYSTEM = bcc Fe
ENCUT = 450.00 eV
ISTART = 0 ; ICHARG = 2
ISMEAR = -5
PREC = Accurate
2、POSCAR⽂件:
bcc Fe
2.866
1.00 0.00 0.00
0.00 1.00 0.00
0.00 0.00 1.00
2
Direct
0 0 0
0.5 0.5 0.5
3、⽤脚本程序optkpoints.sh代替KPOINTS⽂件:
rm WAVECAR
for i in 5 7 9 11 13 15
do
cat > KPOINTS <
Automatic generation
Monkhorst-pack
$i $i $i
0.0 0.0 0.0
!
echo " k mesh = $i x $i x $i"; time vasp
E=$(grep "TOTEN" OUTCAR | tail -1| awk '{printf "%12.6f \n", $5}') KP=$(grep "irreducible" OUTCAR | tail -1| awk '{printf "%5i \n", $2}') echo $i $KP $E >> comment
done
4、POTCAR⽂件:(略)
(⼆)计算任务执⾏⽅法:
输⼊:dos2unix optkpoints.sh
bash optkpoints.sh
(三)判别标准:计算完成后得到comment⽂件,它列出了在k点数⽬与总能的对应值,只要总能变化在0.001 eV左右就⾮常⾜够了。
四、优化选择合适的SIGMA值(展宽σ值):
(⼀)为什么要优化SIGMA值?
若展宽σ太⼩,则计算难以收敛;若展宽σ太⼤,则会产⽣多余的熵(entropy),因此必须选择合适的σ值。
(Too large smearing-parameters might result in a wrong total
energy, small smearing parameters require a large k-point mesh.)
(⼆)ISMEAR和SIGMA:
1、ISMEAR和SIGMA这两个关键词要联合起来使⽤,前者⽤来指定smearing的⽅
法,后者⽤来指定smearing的展宽——σ值。
2、ISMEAR和SIGMA的默认值分别为1和0.2。
3、ISMEAR可能的取值为-5,-4,-3,-2,-1,0,N (N表⽰正整数):
ISMEAR=-5,表⽰采⽤Blochl修正的四⾯体⽅法;
ISMEAR=-4,表⽰采⽤四⾯体⽅法,但是没有Blochl修正;
ISMEAR=-1,表⽰采⽤Fermi-Dirac smearing⽅法;
ISMEAR=0,表⽰采⽤Gaussian smearing⽅法;
ISMEAR=N,表⽰采⽤Methfessel-Paxton smearing⽅法,其中N是表⽰此⽅法中
的阶数,⼀般情况下N取1或2, 但是
In most cases and
leads to very similar results。
4、σ值⼀般在0.1~0.3 eV范围内。
5、ISMEAR取值的⼀些经验:
(1)⼀般说来,⽆论是对何种体系,进⾏何种性质的计算,采⽤ISMEAR=0并
选择⼀个合适的SIGMA值,都能得到合理的结果。
(2)在进⾏静态计算(能量单点计算, no relaxation in metals)或态密度计算且k点
数⽬⼤于4时,取ISMEAR=-5。
(3)当原胞较⼤⽽k点数⽬较⼩(⼩于4个)时,取ISMEAR=0,并选择⼀个
合适的SIGMA值。
(if the cell is too large (or if you use only a single or two k-points) use
ISMEAR=0 in combination with a small SIGMA=0.05)
(4)对半导体或绝缘体,不论是静态还是结构优化计算,都取ISMEAR=-5。
(Mind:
Avoid to use ISMEAR>0 for semiconductors and insulators, since it might cause problems. For
insulators use ISMEAR=0 or ISMEAR=-5.)
(5)对⾦属体系(for relaxations in metals),取ISMEAR=1或2,并选择⼀个合适的SIGMA值。
(三)当采⽤ISMEAR=0或N时,如何优化选择合适的SIGMA值?
(以bcc Fe为例)
1、⽤脚本程序optsigma.sh代替INCAR⽂件:
rm WAVECAR
for i in 0.10 0.12 0.14 0.16 0.18 0.20 0.22 0.24 0.26 0.28 0.30
do
cat > INCAR <
SYSTEM = bcc Fe
ENCUT = 450
GGA = 91
ISTART = 0 ; ICHARG = 2
ISMEAR = 0 ; SIGMA = $i
PREC = Accurate
!
echo " SIGMA = $i eV "; time vasp
TS=$(grep "EENTRO" OUTCAR | tail -1 | awk '{printf "%12.6f \n", $5}')
echo $i $TS >> comment
done
2、POSCAR⽂件:
bcc Fe
2.866
1.00 0.00 0.00
0.00 1.00 0.00
0.00 0.00 1.00
2
Direct
0 0 0
0.5 0.5 0.5
3、KPOINTS⽂件:
Automatic generation
Monkhorst-Pack
9 9 9
0.0 0.0 0.0
4、POTCAR⽂件:(略)
(四)计算任务执⾏⽅法:
输⼊:dos2unix optsigma.sh
bash optsigma.sh
(五)判断标准:熵(entropy)越⼩越好,选择entropy T*S EENTRO值中最⼩的那个所对应的SIGMA。
( SIGMA should be as large as possible keeping the difference between the free energy and the total energy (i.e. the term 'entropy T*S') in the OUTCAR file negligible (1 meV/atom).)
(五)注意:
1、当k点的数⽬发⽣变化后,要重新优化选择SIGMA值。