Skip to content

Commit c04d685

Browse files
committed
fix: add fparam, aparam temp index parse
1 parent 10fca12 commit c04d685

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

dpdata/deepmd/mixed.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ def to_system_data(folder, type_map=None, labels=True):
2727
all_real_atom_types_concat = index_map[all_real_atom_types_concat]
2828
all_cells_concat = data["cells"]
2929
all_coords_concat = data["coords"]
30+
all_fparam_concat = data.get("fparam", None)
31+
all_aparam_concat = data.get("aparam", None)
3032
if labels:
3133
all_eners_concat = data.get("energies")
3234
all_forces_concat = data.get("forces")
@@ -56,6 +58,12 @@ def to_system_data(folder, type_map=None, labels=True):
5658
all_cells_concat = all_cells_concat[rest_idx]
5759
temp_data["coords"] = all_coords_concat[temp_idx]
5860
all_coords_concat = all_coords_concat[rest_idx]
61+
if all_fparam_concat:
62+
temp_data["fparam"] = all_fparam_concat[temp_idx]
63+
all_fparam_concat = all_fparam_concat[rest_idx]
64+
if all_aparam_concat:
65+
temp_data["aparam"] = all_aparam_concat[temp_idx]
66+
all_aparam_concat = all_aparam_concat[rest_idx]
5967
if labels:
6068
if all_eners_concat is not None and all_eners_concat.size > 0:
6169
temp_data["energies"] = all_eners_concat[temp_idx]

0 commit comments

Comments
 (0)