From 550321526d33342197ee1ddda6b6e31ea441eb20 Mon Sep 17 00:00:00 2001 From: Wanrun Jiang <58099845+Vibsteamer@users.noreply.github.com> Date: Sun, 19 Mar 2023 14:29:10 +0800 Subject: [PATCH] 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 <58099845+Vibsteamer@users.noreply.github.com> --- dpgen/auto_test/reproduce.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpgen/auto_test/reproduce.py b/dpgen/auto_test/reproduce.py index 4b6a03941..ce4c7483c 100644 --- a/dpgen/auto_test/reproduce.py +++ b/dpgen/auto_test/reproduce.py @@ -139,7 +139,7 @@ def post_repro( else: nframe = len(init_task_result["energies"]) # idid += nframe - natoms = init_task_result["atom_numbs"][0] + natoms = np.sum(init_task_result["atom_numbs"]) if reprod_last_frame: init_ener = init_task_result["energies"][-1:] else: