From 527786992d8e92b06032875d6b4d7a29f006be87 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Mon, 10 Jul 2023 02:24:53 -0400 Subject: [PATCH] sort aparam in the Python API Signed-off-by: Jinzhe Zeng (cherry picked from commit a2aa14e79ee6bbaaa759e0754676fbf43428c35b) --- deepmd/infer/deep_pot.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deepmd/infer/deep_pot.py b/deepmd/infer/deep_pot.py index 10240ceb56..122dfd7442 100644 --- a/deepmd/infer/deep_pot.py +++ b/deepmd/infer/deep_pot.py @@ -466,6 +466,10 @@ def _prepare_feed_dict( efield = np.reshape(efield, [nframes, natoms, 3]) efield = efield[:, imap, :] efield = np.reshape(efield, [nframes, natoms * 3]) + if self.has_aparam: + aparam = np.reshape(aparam, [nframes, natoms, fdim]) + aparam = aparam[:, imap, :] + aparam = np.reshape(aparam, [nframes, natoms * fdim]) # make natoms_vec and default_mesh natoms_vec = self.make_natoms_vec(atom_types, mixed_type=mixed_type)