ABACUS计算所需的结构文件STRU
(参考2.1.1)需要计算性质的结构文件,最好是优化过的文件,后续计算会节省时间。
优化晶胞和结构的INPUT文件
对于不同体系这个INPUT可能不是最合适的,需要经过前期测试来确定;该文件的目的主要是通过晶格和原子位置优化获得稳定的基态构型。
INPUT_PARAMETERS
#Parameters (1.General)
calculation cell-relax
#Parameters (2.Iteration)
ecutwfc 100
scf_nmax 100
#Parameters (3.Basis)
basis_type lcao
symmetry 0
kspacing 0.08
#Parameters (4.Smearing)
smearing_method gauss
smearing_sigma 0.002
#Parameters (5.Mixing)
mixing_type pulay
mixing_beta 0.7
cal_stress 1
cal_force 1
做电子自洽迭代的INPUT文件,scf计算
对于特定体系需要经过收敛性测试给出合适的INPUT,此处只是参考;该文件的目的主要是在后续计算中,通过scf计算获得晶格晶格扩大或缩小后的结构能量和力等信息。
INPUT_PARAMETERS
#Parameters (1.General)
calculation scf
#Parameters (2.Iteration)
ecutwfc 100
scf_nmax 100
#Parameters (3.Basis)
basis_type lcao
symmetry 0
kspacing 0.08
#Parameters (4.Smearing)
smearing_method gauss
smearing_sigma 0.002
#Parameters (5.Mixing)
mixing_type pulay
mixing_beta 0.7
cal_stress 1
cal_force 1
DPGEN的autotest需要的relax.json
准备好ABACUS计算文件之后,可用DPGEN调用ABACUS进行相关性质的计算,同时DPGEN会收集结果并做输出。
首先利用DPGEN对STRU文件进行结构优化,以确保获得的结构是基态结构,即需要relax.json文件。
{
"structures": ["./"],
"interaction": {
"type": "abacus",
"incar": "/home/zxg/BeCu/abacus_SET/INPUT_rlx_cell",
"potcar_prefix":"/home/zxg/BeCu/SG15_v1.0_ONCVPP_and_Orbitals/",
"potcars": {"Be": "Be_ONCV_PBE-1.0.upf","Cu":"Cu_ONCV_PBE-1.0.upf"},
"orb_files": {"Be":"Be_gga_10au_100Ry_4s1p.orb","Cu":"Cu_gga_9au_100Ry_4s2p2d1f.orb"}
},
"relaxation":
{
"cal_type": "relaxation",
"cal_setting":
{
"input_prop": "/home/zxg/BeCu/abacus_SET/INPUT_rlx_cell"
}
}
}
其中"structures": ["./"],是STRU文件所在文件夹的的名称, ["./"],表示在当前目录下;注:后续计算也会在该目录下进行,因此建议在当前目录进行计算,也可以建立一个EOS文件或conf文件进行计算。
"interaction": {}#指明计算DFT计算需要的文件;
"type": "abacus",#利用ABACUS进行后续的计算;
"incar": "/home/zxg/BeCu/abacus_SET/INPUT_rlx_cell",#结构和晶胞优化的INPUT文件夹所在位置;
"potcar_prefix":"/home/zxg/BeCu/SG15_v1.0_ONCVPP_and_Orbitals/",#轨道文件所在文件夹的路径;
"potcars": {"Be": "Be_ONCV_PBE-1.0.upf","Cu":"Cu_ONCV_PBE-1.0.upf"},#使用的pw势函数
"orb_files": {"Be":"Be_gga_10au_100Ry_4s1p.orb","Cu":"Cu_gga_9au_100Ry_4s2p2d1f.orb"}#使用的院子轨道基组
"relaxation": {}#指明后续需要计算的内容
"cal_setting":{ "input_prop": "/home/zxg/BeCu/abacus_SET/INPUT_rlx_cell"},计算所需的具体INPUT文件。
DPGEN的autotest需要的property.json
另外在计算EOS或相关性质时需要提供DPGEN的一个过程控制文件property.json,该文件的解释跟上边解释类似,同样是调用ABACUS进行相关性质的计算并提取结果。但是在计算内容方面改成了"properties": []
{
"structures": ["./"],
"interaction": {
"type": "abacus",
"incar": "/home/zxg/BeCu/abacus_SET/INPUT_rlx_cell",
"potcar_prefix":"/home/zxg/BeCu/SG15_v1.0_ONCVPP_and_Orbitals/",
"potcars": {"Be": "Be_ONCV_PBE-1.0.upf","Cu":"Cu_ONCV_PBE-1.0.upf"},
"orb_files": {"Be":"Be_gga_10au_100Ry_4s1p.orb","Cu":"Cu_gga_9au_100Ry_4s2p2d1f.orb"}
},
"properties": [
{
"cal_setting":{
"input_prop": "/home/zxg/BeCu/abacus_SET/INPUT_scf"
},
"type": "eos",
"vol_start": 0.9,
"vol_end": 1.1,
"vol_step": 0.02
},
{
"cal_setting":{
"input_prop": "/home/zxg/BeCu/abacus_SET/INPUT_scf"
},
"type": "elastic",
"norm_deform": 1e-2,
"shear_deform": 1e-2
}
]
}
"type": "eos",#设定为计算EOS
"vol_start": 0.9,#开始时晶格大小缩小至原来晶格的0.9倍
"vol_end": 1.1,#最终计算构型扩展到原来晶格的1.1倍
"vol_step": 0.02#晶格大小在原晶胞的0.9至1.1倍之间按0.02的比例进行插值
"type": "elastic",#计算弹性常数
"norm_deform": 1e-2,#单轴拉伸长幅度为0.01
"shear_deform": 1e-2#剪切拉伸幅度为0.01
注: "cal_setting",由于这里有两次cal_setting,因此在后续计算时会同时提交两个ABACUS的任务。
DPGEN的autotest需要的machine.json
machine.json其实设定好一次之后就可以多次使用。这里给一个我单个服务器计算,未安装列队操作的文件参考。
{
"api_version": "1.0",
"deepmd_version": "2.1.5",
"train" :[
{
"command": "dp",
"machine": {
"batch_type": "Shell",
"context_type": "LazyLocalContext",
"local_root" : "./",
"remote_root" : "./"
},
"resources": {
"number_node": 1,
"cpu_per_node": 12,
"gpu_per_node": 1,
"strategy" : {"if_cuda_multi_devices": true },
"queue_name": "zw",
"group_size": 4,
"source_list": ["/home/zxg/BeCu/conda_env/deepmd"]
}
}
],
"model_devi":
[{
"command": "lmp",
"machine": {
"batch_type": "Shell",
"context_type": "LazyLocalContext",
"local_root" : "./",
"remote_root" : "./"
},
"resources": {
"number_node": 1,
"cpu_per_node": 20,
"gpu_per_node": 1,
"strategy" : {"if_cuda_multi_devices": true },
"queue_name": "zw",
"group_size": 3500,
"source_list": ["/home/zxg/BeCu/conda_env/deepmd"]
}
}
],
"fp":
[
{
"command": "OMP_NUM_THREADS=1 mpirun -n 12 abacus",
"machine": {
"batch_type": "Shell",
"context_type": "LazyLocalContext",
"local_root" : "./",
"remote_root" : "./",
"clean_asynchronously": false
},
"resources":
{
"number_node": 1,
"cpu_per_node": 12,
"gpu_per_node": 1,
"group_size": 500,
"para_deg": 1,
"_source_list": ["/home/zxg/BeCu/conda_env/abacus"]
}
}
]
}
与conda环境配套的DeePMD文件如下
#!/bin/bash
source activate deepmd
与conda环境配套的ABACUS文件如下
#!/bin/bash
source activate abacus_env
具体的参数设置可以查看官网介绍文档,我是贵州师范大学的张为老师帮我设定好的,因此不做过多评论,我自己设定容易出问题,参考他的可行。其中需要注意,我修改过 "context_type": "LazyLocalContext",到 "context_type": "Local",计算过程会出现结果没搜集,文件被删除情况。而我按张老师文件来的话就没问题。