diff --git a/dpgen/generator/run.py b/dpgen/generator/run.py index 6d9f1c4e4..7e8bfdce6 100644 --- a/dpgen/generator/run.py +++ b/dpgen/generator/run.py @@ -4437,20 +4437,18 @@ def post_fp_cp2k(iter_index, jdata, rfailed=None): sys_output = glob.glob(os.path.join(work_path, "task.%s.*/output" % ss)) sys_output.sort() tcount += len(sys_output) - all_sys = None + all_sys = dpdata.MultiSystems(type_map=jdata["type_map"]) for oo in sys_output: - _sys = dpdata.LabeledSystem(oo, fmt="cp2k/output") - # _sys.check_type_map(type_map = jdata['type_map']) - if all_sys is None: - all_sys = _sys - else: - all_sys.append(_sys) + _sys = dpdata.LabeledSystem( + oo, fmt="cp2kdata/e_f", type_map=jdata["type_map"] + ) + all_sys.append(_sys) + icount += 1 - icount += len(all_sys) if (all_sys is not None) and (len(all_sys) > 0): sys_data_path = os.path.join(work_path, "data.%s" % ss) all_sys.to_deepmd_raw(sys_data_path) - all_sys.to_deepmd_npy(sys_data_path, set_size=len(sys_output)) + all_sys.to_deepmd_npy(sys_data_path) if tcount == 0: rfail = 0.0 diff --git a/pyproject.toml b/pyproject.toml index 4832355af..301a7d373 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,8 @@ classifiers = [ ] dependencies = [ 'numpy>=1.14.3', - 'dpdata>=0.2.16', + 'dpdata>=0.2.17', + 'cp2kdata>=0.6.6', 'pymatgen>=2022.11.1', 'ase', 'monty>2.0.0', diff --git a/tests/generator/test_post_fp.py b/tests/generator/test_post_fp.py index a4f6adc5f..72251328d 100644 --- a/tests/generator/test_post_fp.py +++ b/tests/generator/test_post_fp.py @@ -281,7 +281,7 @@ def setUp(self): post_fp(0, jdata) self.system_1 = dpdata.LabeledSystem("iter.000000/orig", fmt="deepmd/raw") self.system_2 = dpdata.LabeledSystem( - "iter.000000/02.fp/data.000", fmt="deepmd/raw" + "iter.000000/02.fp/data.000/C2H2N2", fmt="deepmd/raw" )