QEtool
2024-09-26 约 1451 字
预计阅读 3 分钟
准备
QE路径
1
qe_bin = '/opt/ohpc/pub/apps/qe-7.3/bin'
赝势路径
1
2
3
4
5
6
7
8
9
if upf_type == 'sssp_precision' :
upf_files = { line . split ()[ 0 ]: line . split ()[ 1 ] for line in upf_files_sssp_precision . strip () . split ( ' \n ' )}
pseudo_dir = '/opt/ohpc/pub/apps/sssp/precision/'
elif upf_type == 'sssp_efficiency' :
upf_files = { line . split ()[ 0 ]: line . split ()[ 1 ] for line in upf_files_sssp_efficiency . strip () . split ( ' \n ' )}
pseudo_dir = '/opt/ohpc/pub/apps/sssp/efficiency/'
elif upf_type == 'pslibrary' :
upf_files = { line . split ()[ 0 ]: line . split ()[ 1 ] for line in upf_files_pslibrary . strip () . split ( ' \n ' )}
pseudo_dir = '/opt/ohpc/pub/apps/pslibrary.1.0.0/pbe/PSEUDOPOTENTIALS/'
提供POSCAR
relax
1
calculation_type = 'relax' # 'relax' | 'vc-relax' | 'scf' | 'nscf' | 'dos_plot'
运行QEtool.py
,生成relax.in
文件。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
#SBATCH --job-name=qe_test
#SBATCH --partition=cpu3_q
#SBATCH --output=%j.out
#SBATCH --error=%j.err
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=32
qe = 'mpirun /opt/ohpc/pub/apps/qe-7.3/bin/pw.x'
$qe <relax.in> relax.out
# $qe <vc-relax.in> vc-relax.out
# $qe <scf.in> scf.out
# $qe <nscf.in> nscf.out
提交集群计算,生成relax.out
文件和./out
文件夹。
1
sbatch job.sh # or qsub job.sh
1
2
3
4
5
6
7
8
9
10
ATOMIC_POSITIONS ( crystal)
Cd 0.0000000000 0.0000000000 0.0000000000
Cd 0.0000000000 0.5000000000 0.5000000000
Cd 0.5000000000 0.0000000000 0.5000000000
Cd 0.5000000000 0.5000000000 0.0000000000
Te 0.2500000000 0.2500000000 0.2500000000
Te 0.7500000000 0.7500000000 0.2500000000
Te 0.7500000000 0.2500000000 0.7500000000
Te 0.2500000000 0.7500000000 0.7500000000
End final coordinates
vc-relax
1
calculation_type = 'vc-relax' # 'relax' | 'vc-relax' | 'scf' | 'nscf' | 'dos_plot'
运行QEtool.py
,生成vc-relax.in
文件。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
#SBATCH --job-name=qe_test
#SBATCH --partition=cpu3_q
#SBATCH --output=%j.out
#SBATCH --error=%j.err
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=32
qe = 'mpirun /opt/ohpc/pub/apps/qe-7.3/bin/pw.x'
# $qe <relax.in> relax.out
$qe <vc-relax.in> vc-relax.out
# $qe <scf.in> scf.out
# $qe <nscf.in> nscf.out
提交集群计算,生成 vc-relax.out
文件和 ./out
文件夹。
1
sbatch job.sh # or qsub job.sh
查看 vc-relax.out
以确认优化后的晶胞大小和原子坐标。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Begin final coordinates
new unit-cell volume = 1882.60412 a.u.^3 ( 278.97315 Ang^3 )
density = 5.71449 g/cm^3
CELL_PARAMETERS ( angstrom)
6.534125441 0.000000000 0.000000000
0.000000000 6.534125441 0.000000000
0.000000000 0.000000000 6.534125441
ATOMIC_POSITIONS ( crystal)
Cd 0.0000000000 0.0000000000 0.0000000000
Cd 0.0000000000 0.5000000000 0.5000000000
Cd 0.5000000000 0.0000000000 0.5000000000
Cd 0.5000000000 0.5000000000 0.0000000000
Te 0.2499998757 0.2499998757 0.2499998757
Te 0.7500001243 0.7500001243 0.2499998757
Te 0.7500001243 0.2499998757 0.7500001243
Te 0.2499998757 0.7500001243 0.7500001243
End final coordinates
scf
1
calculation_type = 'scf' # 'relax' | 'vc-relax' | 'scf' | 'nscf' | 'dos_plot'
注意
QEtool.py
会自动根据vc-relax.out
替换优化后的晶胞大小和原子坐标;
若无vc-relax.out
但有relax.out
,则会自动替换优化后的原子坐标;
若两者均无,则使用cdte.vasp
的晶胞大小和原子坐标。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
#SBATCH --job-name=qe_test
#SBATCH --partition=cpu3_q
#SBATCH --output=%j.out
#SBATCH --error=%j.err
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=32
qe = 'mpirun /opt/ohpc/pub/apps/qe-7.3/bin/pw.x'
# $qe <relax.in> relax.out
# $qe <vc-relax.in> vc-relax.out
$qe <scf.in> scf.out
# $qe <nscf.in> nscf.out
提交集群计算,生成scf.out
文件和./out
文件夹。
1
sbatch job.sh # or qsub job.sh
dos
1
calculation_type = 'nscf' # 'relax' | 'vc-relax' | 'scf' | 'nscf' | 'dos_plot'
注意
QEtool.py
会自动根据vc-relax.out
替换优化后的晶胞大小和原子坐标;
若无vc-relax.out
但有relax.out
,则会自动替换优化后的原子坐标;
若两者均无,则使用cdte.vasp
的晶胞大小和原子坐标。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
#SBATCH --job-name=qe_test
#SBATCH --partition=cpu3_q
#SBATCH --output=%j.out
#SBATCH --error=%j.err
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=32
qe = 'mpirun /opt/ohpc/pub/apps/qe-7.3/bin/pw.x'
# $qe <relax.in> relax.out
# $qe <vc-relax.in> vc-relax.out
# $qe <scf.in> scf.out
$qe <nscf.in> nscf.out
提交集群计算,生成nscf.out
文件和./out
文件夹。
1
sbatch job.sh # or qsub job.sh
dos_plot
1
calculation_type = 'dos_plot' # 'relax' | 'vc-relax' | 'scf' | 'nscf' | 'dos_plot'
运行QEtool.py
时,脚本首先生成pdos.in
,然后调用projwfc.x
命令生成qe.pdos_tot
及一系列文件,如qe.pdos_atm#1(Cd)_wfc#1(s)
。接着,脚本调用sumpdos.x
根据元素种类自动生成Cd.dat
和Te.dat
,读取nscf.out
中的费米能量,最终生成dos.jpg
。