EN 中文

使用 QE 进行自洽能量计算

Published on 2024-03-17

pw.x 处理的计算包括七种类型,在输入文件中通过 calculation 指定:

输入文件

在 QE 输入文件中,包含 NAMELISTSINPUT_CARDS

PWscf 需要三个必需的 NAMELISTS

  1. &CONTROL:指定计算流程。
  2. &SYSTEM:描述系统。
  3. &ELECTRONS:定义求解 Kohn-Sham 方程的算法。

两个额外的 NAMELISTS&IONS&CELLS 用于特定计算。

PWscf 的三个必需 INPUT_CARDSATOMIC_SPECIESATOMIC_POSITIONSK_POINTS。根据计算类型可能需要其他信息。

示例:硅的自洽计算(pw.scf.silicon.in

&CONTROL
calculation='scf',   # 自洽场计算
prefix='silicon',   # 输出文件前缀
pseudo_dir='./pseudo/',   # 赝势目录
outdir='./out/',   # 输出文件目录
/
&SYSTEM
ibrav=2,   # 布拉维晶格类型(FCC)
celldm(1)=10.2625,   # 晶格常数(单位 Bohr,1 Bohr = 0.529 Å)
nat=2,   # 原子数
ntyp=1,   # 原子类型数
ecutwfc=60.0,   # 波函数截断能(单位 Ry,1 Ry = 13.606 eV)
ecutrho=720.0,   # 电荷密度截断能
/
&ELECTRONS
mixing_beta=0.7,   # 电荷密度混合比(默认 0.7)
conv_thr=1d-8,   # SCF 收敛阈值(默认 1d-6)
/
ATOMIC_SPECIES
Si 28.0855 Si.pbe-rrkj.UPF   # 赝势
ATOMIC_POSITIONS (alat)   # 原子坐标(alat = 晶格参数)
Si 0.00 0.00 0.00
Si 0.25 0.25 0.25
K_POINTS automatic  # 自动 k 点网格
4 4 4 1 1 1

详见 PWscf 用户手册

执行

mpirun -np 4 pw.x -inp pw.scf.silicon.in > pw.scf.silicon.out

输出文件

检查输出文件 pw.scf.silicon.out 中的收敛信息:

grep -e 'total energy' -e estimate pw.scf.silicon.out

示例:

Self-consistent Calculation

iteration #  1     ecut=    16.00 Ry     beta= 0.70
Davidson diagonalization with overlap
ethr =  1.00E-02,  avg # of iterations =  2.0
Threshold (ethr) on eigenvalues was too large:
Diagonalizing with lowered threshold
Davidson diagonalization with overlap
ethr =  6.93E-04,  avg # of iterations =  1.0
total cpu time spent up to now is        0.3 secs
total energy              =     -15.83539933 Ry
estimated scf accuracy    <       0.06071141 Ry

iteration #  2     ecut=    16.00 Ry     beta= 0.70
Davidson diagonalization with overlap
ethr =  7.59E-04,  avg # of iterations =  1.0
total cpu time spent up to now is        0.4 secs
total energy              =     -15.83851631 Ry
estimated scf accuracy    <       0.00218630 Ry

iteration #  3     ecut=    16.00 Ry     beta= 0.70
Davidson diagonalization with overlap
ethr =  2.73E-05,  avg # of iterations =  2.3
total cpu time spent up to now is        0.4 secs
total energy              =     -15.83897965 Ry
estimated scf accuracy    <       0.00007075 Ry

iteration #  4     ecut=    16.00 Ry     beta= 0.70
Davidson diagonalization with overlap
ethr =  8.84E-07,  avg # of iterations =  2.6
total cpu time spent up to now is        0.4 secs
total energy              =     -15.83900178 Ry
estimated scf accuracy    <       0.00000211 Ry

iteration #  5     ecut=    16.00 Ry     beta= 0.70
Davidson diagonalization with overlap
ethr =  2.64E-08,  avg # of iterations =  3.6
total cpu time spent up to now is        0.4 secs
total energy              =     -15.83900299 Ry
estimated scf accuracy    <       0.00000012 Ry

iteration #  6     ecut=    16.00 Ry     beta= 0.70
Davidson diagonalization with overlap
ethr =  1.46E-09,  avg # of iterations =  2.7
total cpu time spent up to now is        0.4 secs

End of self-consistent calculation

注意:

!    total energy              =     -15.83900302 Ry
     estimated scf accuracy    <          3.2E-10 Ry

     The total energy is the sum of the following terms:
     one-electron contribution =       4.79863652 Ry
     hartree contribution      =       1.07565897 Ry
     xc contribution           =      -4.81353993 Ry
     ewald contribution        =     -16.89975858 Ry

     convergence has been achieved in   6 iterations

提示

补充信息

Exchange-correlation= SLA  PZ   NOGX NOGC
sticks:   dense  smooth     PW     G-vecs:    dense   smooth      PW
Sum         433     433    139                 5961     5961    1067
number of electrons       =         8.00
number of Kohn-Sham states=            8