Eastsheng's Wiki

PERTURBO 教程

2026-06-01 18:11:28

[toc]

PERTURBO 教程

Quantum Espresso to Perturbo

1. 自洽SCF计算

1
2
cd perturbo-examples-light/example01-silicon-qe2pert/pw-ph-wann/scf
mpirun -np 4 pw.x -i scf.in | tee scf.out

2. 声子计算

1
2
3
4
5
6
cd ../phonon/
cp -r ../scf/tmp ./
mpirun -np 4 ph.x -i ph.in | tee ph.out

bash ph-collect.sh
# 获得save

3. nSCF计算

1
2
3
4
5
cd ../nscf
cp -r ../scf/tmp ./
# 可以使用 Wannier90 中 utility 文件夹内的 kmesh.pl 脚本生成 k 点列表:
# kmesh.pl 8 8 8 >> nscf.in
mpirun -np 4 pw.x -i nscf.in | tee nscf.out

4. Wannier90 计算

1
2
3
4
5
6
7
8
cd ../wann/
mkdir tmp && cd tmp
ln -sf ../../nscf/tmp/si.save
cd ..
wannier90.x -pp si
pw2wannier90.x < pw2wan.in
wannier90.x si

5. 运行 qe2pert.x

现在我们已经准备好计算粗 k 点(由 nSCF 步骤确定)和 q 点(由声子步骤确定)布里渊区网格上的 e‑ph 矩阵元。首先,将电子和声子计算结果复制或链接到当前目录。

1
2
3
4
5
6
7
8
9
10
11
cd ../../qe2pert
mkdir tmp && cd tmp
ln -sf ../../pw-ph-wann/nscf/tmp/si.save
cd ..
ln -sf ../pw-ph-wann/wann/si_u.mat
ln -sf ../pw-ph-wann/wann/si_u_dis.mat
ln -sf ../pw-ph-wann/wann/si_centres.xyz

export OMP_NUM_THREADS=4
mpirun -np 2 qe2pert.x -npools 2 -i qe2pert.in | tee qe2pert.out
tree -L 1

.
├── qe2pert.in
├── qe2pert.out
├── qe2pert_output.yml
├── si_centres.xyz -> ../pw-ph-wann/wann/si_centres.xyz
├── si_epr.h5
├── si_u.mat -> ../pw-ph-wann/wann/si_u.mat
├── si_u_dis.mat -> ../pw-ph-wann/wann/si_u_dis.mat
└── tmp

1 directory, 7 files

  • 已经完成了从 Quantum Espresso 和 Wannier90 生成 PERTURBO 所需 HDF5 文件的全过程。接下来便可以运行 perturbo.x 进行各种电子动力学和输运性质的计算。

Running Perturbo

1. 使用万尼尔函数插值电子能带结构

1
2
cd example02-silicon-perturbo/perturbo/pert-bands
cat pert.in

&perturbo
prefix = ‘si’
calc_mode = ‘bands’
fklist = ‘si_band.kpt’
/

1
cat si_band.kpt

6
0.500 0.500 0.500 50
0.000 0.000 0.000 50
0.500 0.000 0.500 20
0.500 0.250 0.750 20
0.375 0.375 0.750 50
0.000 0.000 0.000 1

1
2
3
4
ln -sf ../../../example01-silicon-qe2pert/qe2pert/si_epr.h5 .

mpirun -n 2 perturbo.x -npools 2 -i pert.in | tee pert.out

  • 后处理可视化

    1
    2
    # pip install perturbopy

2. 通过对实空间原子间力常数进行傅里叶变换,插值声子色散

1
2
cd ../pert-phdisp/
cat pert.in

&perturbo
prefix = ‘si’
calc_mode = ‘phdisp’
fqlist = ‘si_phdisp.qpt’
/

1
cat si_phdisp.qpt

6
0.5 0.5 0.5 50 !L
0.0 0.0 0.0 50 !G
0.5 0.0 0.5 25 !X
0.5 0.25 0.75 25 !W
0.375 0.375 0.75 50 !K
0.0 0.0 0.0 1 !G

1
2
ln -sf ../../../example01-silicon-qe2pert/qe2pert/si_epr.h5 .
mpirun -n 1 perturbo.x -npools 1 -i pert.in | tee pert.out
  • 后处理perturbopy

3. 使用万尼尔函数插值电子-声子(e‑ph)矩阵元

  • 'prefix'_epr.h5
  • pert.in
  • fklistk 点列表文件)
  • fqlistq 点列表文件)
1
2
cd ../pert-ephmat/
cat pert.in

&perturbo
prefix = ‘si’
calc_mode = ‘ephmat’
fklist = ‘eph.kpt’
fqlist = ‘eph.qpt’

band_min = 2
band_max = 4

phfreq_cutoff = 1 !meV
/

1
2
3
ln -sf ../../../example01-silicon-qe2pert/qe2pert/si_epr.h5 .
mpirun -n 1 perturbo.x -npools 1 -i pert.in | tee pert.out

Electron-phonon Scattering

PERTURBO 中与电子‑声子散射计算相关的三种模式:

  • **setup**:为输运计算或载流子动力学模拟准备电子 k 网格和声子 q 网格,计算态密度并(可选)确定化学势。
  • **imsigma**:计算电子‑声子自能的虚部(即散射率)。
  • **meanfp**:计算电子的平均自由程、带速度和弛豫时间。

1. 准备电子 k 网格和声子 q 网格(calc_mode = 'setup'

1
2
3
cd ../pert-setup-electron/
ln -sf ../../../example01-silicon-qe2pert/qe2pert/si_epr.h5 .
mpirun -n 1 perturbo.x -npools 1 -i pert.in | tee pert.out

2. 电子‑声子自能虚部(calc_mode = 'imsigma'

1
2
3
4
cd ../pert-imsigma-electron/
ln -sf ../../../example01-silicon-qe2pert/qe2pert/si_epr.h5 .
export OMP_NUM_THREADS=4
mpirun -n 8 perturbo.x -npools 8 -i pert.in | tee pert.out

3. 电子平均自由程(calc_mode = 'meanfp'

基于 imsigma 的结果,计算电子态的平均自由程(MFP)、弛豫时间带速度

必须先运行 imsigma 计算,得到 'prefix'.imsigma 文件。

imsigma 完全相同,仅将 calc_mode 改为 'meanfp'

1
2
3
cd ../pert-meanfp-electron/
ln -sf ../../../example01-silicon-qe2pert/qe2pert/si_epr.h5 .
mpirun -n 1 perturbo.x -npools 1 -i pert.in | tee pert.out

输出文件si_meanfp.yml