Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example: add abacus examples #853

Merged
merged 4 commits into from
Aug 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dpgen/generator/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -2903,7 +2903,7 @@ def make_fp (iter_index,
make_fp_vasp(iter_index, jdata)
elif fp_style == "pwscf" :
make_fp_pwscf(iter_index, jdata)
elif fp_style == "abacus/scf" :
elif fp_style == "abacus" :
make_fp_abacus_scf(iter_index, jdata)
elif fp_style == "siesta" :
make_fp_siesta(iter_index, jdata)
Expand Down Expand Up @@ -3107,7 +3107,7 @@ def run_fp (iter_index,
forward_files = ['input'] + fp_pp_files
backward_files = ['output']
run_fp_inner(iter_index, jdata, mdata, forward_files, backward_files, _qe_check_fin, log_file = 'output')
elif fp_style == "abacus/scf":
elif fp_style == "abacus":
fp_params = {}
if 'user_fp_params' in jdata.keys() :
fp_params = jdata['user_fp_params']
Expand Down Expand Up @@ -3606,7 +3606,7 @@ def post_fp (iter_index,
post_fp_vasp(iter_index, jdata)
elif fp_style == "pwscf" :
post_fp_pwscf(iter_index, jdata)
elif fp_style == "abacus/scf":
elif fp_style == "abacus":
post_fp_abacus_scf(iter_index, jdata)
elif fp_style == "siesta":
post_fp_siesta(iter_index, jdata)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions examples/init/abacus/fcc-Al-lcao/Al.STRU
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
ATOMIC_SPECIES
Al 26.982 Al_ONCV_PBE-1.0.upf

NUMERICAL_ORBITAL
Al_gga_9au_100Ry_4s4p1d.orb

LATTICE_CONSTANT
1.8897261254578281

LATTICE_VECTORS
4.04 0.0 0.0
0.0 4.04 0.0
0.0 0.0 4.04

ATOMIC_POSITIONS
Direct # Cartesian(Unit is LATTICE_CONSTANT)
Al
0.0
4
0.00 0.00 0.00 1 1 1
0.51 0.51 0.00 1 1 1
0.50 0.00 0.50 1 1 1
0.00 0.50 0.50 1 1 1
1,226 changes: 1,226 additions & 0 deletions examples/init/abacus/fcc-Al-lcao/Al_ONCV_PBE-1.0.upf

Large diffs are not rendered by default.

2,065 changes: 2,065 additions & 0 deletions examples/init/abacus/fcc-Al-lcao/Al_gga_9au_100Ry_4s4p1d.orb

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions examples/init/abacus/fcc-Al-lcao/INPUT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
INPUT_PARAMETERS
#Parameters (1.General)
suffix ABACUS
calculation md
ntype 1
symmetry 0

#Parameters (2.Iteration)
ecutwfc 100
scf_thr 1e-8
scf_nmax 100
#Parameters (3.Basis)
basis_type lcao

#Parameters (4.Smearing)
smearing_method gauss
smearing_sigma 0.002

#Parameters (5.Mixing)
mixing_type pulay
mixing_beta 0.3

cal_stress 1

md_type 0
md_nstep 10
md_tfirst 10
md_tfreq 0.5
25 changes: 25 additions & 0 deletions examples/init/abacus/fcc-Al-lcao/INPUT.rlx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
INPUT_PARAMETERS
#Parameters (1.General)
suffix ABACUS
calculation relax
ntype 1
symmetry 0

#Parameters (2.Iteration)
ecutwfc 100
scf_thr 1e-8
scf_nmax 100
#Parameters (3.Basis)
basis_type lcao

#Parameters (4.Smearing)
smearing_method gauss
smearing_sigma 0.002

#Parameters (5.Mixing)
mixing_type pulay
mixing_beta 0.3

cal_stress 1

kspacing 100
4 changes: 4 additions & 0 deletions examples/init/abacus/fcc-Al-lcao/KPT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
K_POINTS
0
Gamma
1 1 1 0 0 0
4 changes: 4 additions & 0 deletions examples/init/abacus/fcc-Al-lcao/KPT.rlx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
K_POINTS
0
Gamma
2 2 2 0 0 0
24 changes: 24 additions & 0 deletions examples/init/abacus/fcc-Al-lcao/init.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"init_fp_style": "ABACUS",
"stages": [1,2,3,4],
"cell_type": "diamond",
"super_cell": [2, 1, 1],
"elements": ["Al"],
"from_poscar": true,
"from_poscar_path": "./Al.STRU",
"potcars": ["Al_ONCV_PBE-1.0.upf"],
"orb_files": ["Al_gga_9au_100Ry_4s4p1d.orb"],
"relax_incar": "./INPUT.rlx",
"md_incar" : "./INPUT.md",
"relax_kpt": "./KPT.rlx",
"md_kpt": "./KPT.md",
"md_nstep": 3,
"scale": [1.00],
"skip_relax": false,
"pert_numb": 2,
"pert_box": 0.03,
"pert_atom": 0.01,
"deepgen_templ": "../generator/template/",
"coll_ndata": 5000,
"_comment": "that's all"
}
106 changes: 106 additions & 0 deletions examples/init/abacus/fcc-Al-lcao/machine.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"api_version": "1.0",
"deepmd_version": "2.0.1",
"train" :[
{
"command": "dp",
"machine": {
"batch_type": "Lebesgue",
"context_type": "LebesgueContext",
"local_root" : "./",
"remote_profile":{
"email": "",
"password": "",
"program_id": ,
"keep_backup":true,
"input_data":{
"job_type": "indicate",
"log_file": "00*/train.log",
"grouped":true,
"job_name": "dpgen_train_job",
"disk_size": 200,
"scass_type":"",
"checkpoint_files":["00*/checkpoint","00*/model.ckpt*"],
"checkpoint_time":30,
"platform": "",
"region":"",
"image_name":"",
"on_demand":0,
"job_type":""
}
}
},
"resources": {
"local_root":"./",
"group_size": 1
}
}],
"model_devi":
[{
"command": "lmp -i input.lammps -v restart 0",
"machine": {
"batch_type": "Lebesgue",
"context_type": "LebesgueContext",
"local_root" : "./",
"remote_profile":{
"email": "",
"password": "",
"program_id": ,
"keep_backup":true,
"input_data":{
"job_type": "indicate",
"log_file": "*/model_devi.log",
"grouped":true,
"job_name": "dpgen_model_devi_job",
"disk_size": 200,
"scass_type":"",
"platform": "",
"region":"",
"image_name":"",
"checkpoint_files": "sync_files",
"checkpoint_time":30,
"on_demand":0,
"job_type":""
}
}
},
"resources": {
"local_root":"./",
"group_size": 50
}
}],
"fp":
[{
"command": "OMP_NUM_THREADS=1 mpirun -n 8 abacus",
"machine": {
"batch_type": "Lebesgue",
"context_type": "LebesgueContext",
"local_root" : "./",
"remote_profile":{
"email": "",
"password": "",
"program_id": ,
"keep_backup":true,
"input_data":{
"job_type": "indicate",
"log_file": "task*/fp.log",
"grouped":true,
"job_name": "dpgen_fp_job",
"disk_size": 100,
"checkpoint_files": "sync_files",
"checkpoint_time":30,
"scass_type":"",
"platform": "",
"image_name":"",
"on_demand":0
}
}
},
"resources": {
"group_size": 50,
"local_root":"./",
"source_list": [""]
}
}
]
}
20 changes: 20 additions & 0 deletions examples/init/abacus/fcc-Al-pw/Al.STRU
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
ATOMIC_SPECIES
Al 26.982 Al_ONCV_PBE-1.0.upf

LATTICE_CONSTANT
1.8897261254578281

LATTICE_VECTORS
4.04 0.0 0.0
0.0 4.04 0.0
0.0 0.0 4.04

ATOMIC_POSITIONS
Direct # Cartesian(Unit is LATTICE_CONSTANT)
Al
0.0
4
0.00 0.00 0.00 1 1 1
0.48 0.53 0.00 1 1 1
0.50 0.00 0.50 1 1 1
0.00 0.50 0.50 1 1 1
Loading