Skip to content

Commit 5503215

Browse files
authored
bug_fix reproduce.py (#1156)
previous natoms only count #atom of the first element, gives wrong results or -inf in multiple-element cases Signed-off-by: Wanrun Jiang <[email protected]>
1 parent 29a1bf8 commit 5503215

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dpgen/auto_test/reproduce.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def post_repro(
139139
else:
140140
nframe = len(init_task_result["energies"])
141141
# idid += nframe
142-
natoms = init_task_result["atom_numbs"][0]
142+
natoms = np.sum(init_task_result["atom_numbs"])
143143
if reprod_last_frame:
144144
init_ener = init_task_result["energies"][-1:]
145145
else:

0 commit comments

Comments
 (0)