From 8244dbcbfe0ee4a4bd5f7ac33ca8757e5eb2b549 Mon Sep 17 00:00:00 2001 From: zhenyu wang Date: Mon, 25 Mar 2024 19:36:30 +0800 Subject: [PATCH] fix: atype should be an array --- deepmd/infer/model_devi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deepmd/infer/model_devi.py b/deepmd/infer/model_devi.py index c214e39e92..a37dfd34c5 100644 --- a/deepmd/infer/model_devi.py +++ b/deepmd/infer/model_devi.py @@ -303,7 +303,7 @@ def calc_model_devi( energies = [] forces = [] virials = [] - natom = atype.shape[-1] + natom = np.array(atype).shape[-1] for dp in models: ret = dp.eval( coord,