Skip to content

Commit

Permalink
loose check dpgen run jdata (deepmodeling#952)
Browse files Browse the repository at this point in the history
Since there are lots of parameters still not added (deepmodeling#771, deepmodeling#773, deepmodeling#774,
deepmodeling#781, deepmodeling#782), we only enable loose check for `dpgen run` (i.e.
`strict_check=False`).
  • Loading branch information
njzjz authored Sep 16, 2022
1 parent 916685b commit 403d42d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dpgen/generator/arginfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def run_mdata_arginfo() -> Argument:
# basics
def basic_args() -> List[Argument]:
doc_type_map = 'Atom types.'
doc_mass_map = 'Standard atomic weights (default: "auto"). if one want to use isotopes, or non-standard element names, chemical symbols, or atomic number in the type_map list, please customize the mass_map list instead of using "auto". Tips: at present the default value will not be applied automatically, so you need to set "mass_map" manually in param.json.'
doc_mass_map = 'Standard atomic weights (default: "auto"). if one want to use isotopes, or non-standard element names, chemical symbols, or atomic number in the type_map list, please customize the mass_map list instead of using "auto".'
doc_use_ele_temp = 'Currently only support fp_style vasp. \n\n\
- 0: no electron temperature. \n\n\
- 1: eletron temperature as frame parameter. \n\n\
Expand Down
6 changes: 5 additions & 1 deletion dpgen/generator/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@
from dpgen.generator.lib.ele_temp import NBandsEsti
from dpgen.remote.decide_machine import convert_mdata
from dpgen.dispatcher.Dispatcher import Dispatcher, _split_tasks, make_dispatcher, make_submission
from dpgen.util import sepline, expand_sys_str
from dpgen.util import sepline, expand_sys_str, normalize
from dpgen import ROOT_PATH
from pymatgen.io.vasp import Incar,Kpoints,Potcar
from dpgen.auto_test.lib.vasp import make_kspacing_kpoints
from .arginfo import run_jdata_arginfo


template_name = 'template'
Expand Down Expand Up @@ -3721,6 +3722,9 @@ def run_iter (param_file, machine_file) :
with open (machine_file, 'r') as fp:
mdata = json.load (fp)

jdata_arginfo = run_jdata_arginfo()
jdata = normalize(jdata_arginfo, jdata, strict_check=False)

update_mass_map(jdata)

if jdata.get('pretty_print',False):
Expand Down

0 comments on commit 403d42d

Please sign in to comment.