You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed in deepmodeling/deepmd-kit#1518 , deepmd-kit accept initial systems (DFT results) with less elements type.
However, when try to input similarly to "sys_configs" in param.json when using qe pwscf, it is stuck at step 02.fp, because file dpgen/generator/lib/pwscf.py
allow only POSCAR file with same number of element with "type_map" in param.json, and produce AssertionError if not.
sys_data['atom_masses'] = [] pps = [] for iii in sys_data['atom_names']: sys_data['atom_masses'].append(jdata['mass_map'][jdata['type_map'].index(iii)]) pps.append(fp_pp_files[jdata['type_map'].index(iii)]) ret = make_pwscf_input(sys_data, pps, fp_params, user_input = user_input)
I wish this help others.
Please tell me if I did something dumb.
The text was updated successfully, but these errors were encountered:
* fix typo in github actions release to conda
* Get from_poscar_path only when from_poscar is true (#537)
Change-Id: I17774bee345634e4e72bd783e8112eefaaf9f0d3
Co-authored-by: Zhengju Sha <[email protected]>
* Fix QE pwscf AssertionError
details in #683
Co-authored-by: Han Wang <[email protected]>
Co-authored-by: felix5572 <[email protected]>
Co-authored-by: shazj99 <[email protected]>
Co-authored-by: Zhengju Sha <[email protected]>
Co-authored-by: Han Wang <[email protected]>
As discussed in deepmodeling/deepmd-kit#1518 , deepmd-kit accept initial systems (DFT results) with less elements type.
However, when try to input similarly to "sys_configs" in param.json when using qe pwscf, it is stuck at step 02.fp, because file dpgen/generator/lib/pwscf.py
allow only POSCAR file with same number of element with "type_map" in param.json, and produce AssertionError if not.
(line 83-86)
ntypes = len(atom_names)
assert(ntypes == len(atom_names))
assert(ntypes == len(atom_masses))
assert(ntypes == len(pps))
This can be solved by modify line 2096 - 2097 of dpgen/generator/run.py
sys_data['atom_masses'] = jdata['mass_map']
ret = make_pwscf_input(sys_data, fp_pp_files, fp_params, user_input = user_input)
to
sys_data['atom_masses'] = []
pps = []
for iii in sys_data['atom_names']:
sys_data['atom_masses'].append(jdata['mass_map'][jdata['type_map'].index(iii)])
pps.append(fp_pp_files[jdata['type_map'].index(iii)])
ret = make_pwscf_input(sys_data, pps, fp_params, user_input = user_input)
I wish this help others.
Please tell me if I did something dumb.
The text was updated successfully, but these errors were encountered: