||
计算材料的弹性常数,对于计算资深老鸟,不是什么难事。把晶胞拉拉,扭扭,算一下总能。把能量差和形变差除一下,就搞定了,计算量不大,就是输入文件弄半天。计算结果对着公式再整理,也是比较烦人。对于VASP用户就比较幸福,有VASPKIT帮忙直接算这些弹性常数和模量。Quantum Espresso好像没有自带的算弹性常数的。只有带了一个ev.x可以计算体模量的。
ElaStic有QE的接口,可以通过QE+ElaStic计算弹性常数和模量等力学性质。但没有中文说明,对于中文初学者不是那么方便。这几天,摸索了一下,写一个简单的使用说明,给初学者做参考。另一个重要的原因是,怕自己一段时间不用,忘了,再捡起来又要化比较多的时间。
1.下载地址:
http://exciting.wdfiles.com/local--files/elastic/ElaStic_1.1.tar.gz
写这个说明书时,这是最新的了。
2.安装
解压文件
tar xvzf ElasStic_1.1.tar.gz
Linux系统的账户目录下,在 .bashrc 文件中加入两行export…:
export ElaSticROOT=/home/dir1/dir2/ElaStic
#准备把ElaStic安装的绝对路径,修改dir1和dir2
export PATH=$PATH:/home/dir1/dir2/ElaStic
#让系统自动找到ElaStic的可执行文件
在这个目录下编译SpaceGroups
tar xfvp adon_v1_0.tar.gz
cd SpaceGroups
make
cp sgroup $ElaSticROOT
为了分析计算结果,还要安装xmgrace
3.使用(QE+ElaStic)
计算石墨的弹性常数和模量为例
1)建立计算输入结构文件
ElaStic_Setup_ESPRESSO
进入交互式输入模式
Energy ---=> 1
Stress ---=> 2
>>>> Please choose the method of the calculation (choose 1 or 2): 1
2nd ---=> 2
3rd ---=> 3
>>>> Please choose the order of the elastic constant (choose 2 or 3): 2
>>>> Please enter the name of the Quantum-ESPRESSO input file: scf.in
Number and name of space group: 194 (P 63/m m c)
Hexagonal I structure in the Laue classification.
This structure has 5 independent second-order elastic constants.
>>>> Please enter the maximum Lagrangian strain
The suggested value is between 0.030 and 0.150: 0.05
The maximum Lagrangian strain is 0.05
>>>> Please enter the number of the distorted structures [odd number > 4]: 41
The number of the distorted structures is 41
加黑加红的字体,是要输入的内容。其中三处做个说明:
1. QE输入文件,要事先做好弛豫(vc-relax),得到平衡晶格常数和原子位置。
2.形变最大值(maximum Lagrangian strain),一般取0.05就够了。取太大没意义,还可能引起错误。
3.扭曲结构数目,不要取太小。按照我的经验,一般取21。取越大越好,但取太大数值,计算时间就比较长。因为这个数值越大,计算的扭曲结构越多,自然就需要越多的时间了。
2)计算各种扭曲结构的能量
写了一个shell的循环脚本,放到集群或超算的脚本文件中,方便提交计算。
m=5 #要计算的弹性常数个数,不知道就看一下Dst0?目录,?对应最大的数。
n=41 #就是扭曲结构数目,上一步输入的。
pw_command='mpirun -np 32 /home/tylv/tool/qe/qe-6.3/bin/pw.x' #修改成自己系统pw.x对应的可执行命令就好
for ((i=1;i<=$m;i=i+1))
do
cd Dst0${i}
for ((j=1;j<=$n;j=j+1))
do
if [ $j -lt 10 ]; then
cd Dst0${i}_0${j}
else
cd Dst0${i}_${j}
fi
input=`ls | cut -d "." -f 1`
input=${input}.in
output=`ls | cut -d "." -f 1`
output=${output}.out
${pw_command} < ${input} > ${output}
rm -rf tmp #这个就是为了节约存储空间,删除这一行也可以
echo ${output}
cd ..
done
cd ..
done
3)分析计算结果
ElaStic_Analyze
这一步要用到xmgrace看图。
结合两个图片,发现:对于Dst01,形变最大值(ηmax)取0.02,拟合的多项式阶数n=4
(具体原理,看安装包自带的文章ElaStic_Paper.pdf,就是在找“平台”)
其他的几(Dst02,Dst03,Dst04……)个也是类似,确定ηmax和n
4)计算弹性常数和模量
编辑文件ElaStic_2nd.in
Dst01 0.02 4
Dst02 0.01 2
Dst03 0.02 6
……
编辑好后,执行命令
ElaStic_Result
5)模量说明
上步计算得到ElaStic_2nd.out文件,要的东西都在这个文件中了。
弹性常数没什么好说的,文件里标得清清楚楚。
但是各种模量,给出了三类:Voigt、Reuss、Hill
按照文章ElaStic_Paper.pdf说:
模量的极大值(Voigt),模量的极小值(Reuss)
模量(Hill)=(Voigt+Reuss)/2
例如:
Voigt bulk modulus, B_V = 293.50 Gpa
Reuss bulk modulus, B_R = 29.90 Gpa
Hill bulk modulus, B_H = 161.70 Gpa
**********************************************************************
搞了半天,其实在使用(QE+ElaStic)的第一步时,设置:
>>>> Please enter the maximum Lagrangian strain
The suggested value is between 0.030 and 0.150: 0.03
The maximum Lagrangian strain is 0.03
>>>> Please enter the number of the distorted structures [odd number > 4]: 11
The number of the distorted structures is 11
第4步编辑文件ElaStic_2nd.in,直接用
Dst01 0.03 6
Dst02 0.03 6
Dst03 0.03 6
……
得到的结果就可以用了。什么找“平台”,结果也没好到哪里去,费时费力。
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-9-27 15:16
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社