Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions deepmd/entrypoints/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1277,6 +1277,7 @@ def test_dipole(
high_prec=False,
type_sel=dp.get_sel_type(),
)

test_data = data.get_test()
dipole, numb_test, atype = run_test(dp, test_data, numb_test, data)

Expand Down
4 changes: 3 additions & 1 deletion deepmd/utils/data.py
Copy link
Member

@njzjz njzjz Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have already had an option in this function, output_natoms_for_type_sel. You could set it to true for your case.

Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,9 @@ def _load_data(
data = path.load_numpy().astype(dtype)
try: # YWolfeee: deal with data shape error
if atomic:
if type_sel is not None:
if (
type_sel is not None and natoms_sel != natoms
): # handle PT all atom case
# check the data shape is nsel or natoms
if data.size == nframes * natoms_sel * ndof_:
if output_natoms_for_type_sel:
Expand Down
Loading