Skip to content

Commit

Permalink
Merge branch 'devel' into simplify_example
Browse files Browse the repository at this point in the history
  • Loading branch information
HuangJiameng authored Aug 13, 2022
2 parents 18a2317 + 741f4cd commit 735197d
Show file tree
Hide file tree
Showing 32 changed files with 5,574 additions and 10 deletions.
7 changes: 5 additions & 2 deletions dpgen/generator/arginfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,15 @@ def fp_style_siesta_args() -> List[Argument]:
def fp_style_cp2k_args() -> List[Argument]:
doc_user_fp_params = 'Parameters for cp2k calculation. find detail in manual.cp2k.org. only the kind section must be set before use. we assume that you have basic knowledge for cp2k input.'
doc_external_input_path = 'Conflict with key:user_fp_params, use the template input provided by user, some rules should be followed, read the following text in detail.'
doc_ratio_failed = 'Check the ratio of unsuccessfully terminated jobs. If too many FP tasks are not converged, RuntimeError will be raised.'

return [
Argument("user_fp_params", dict, optional=False,
Argument("user_fp_params", dict, optional=True,
doc=doc_user_fp_params),
Argument("external_input_path", str, optional=False,
Argument("external_input_path", str, optional=True,
doc=doc_external_input_path),
Argument("ratio_failed", float, optional=True,
doc=doc_ratio_failed),
]


Expand Down
6 changes: 3 additions & 3 deletions dpgen/generator/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -2905,7 +2905,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 @@ -3109,7 +3109,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 @@ -3608,7 +3608,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

0 comments on commit 735197d

Please sign in to comment.