Skip to content

Commit

Permalink
fix: sort aparam in the Python API (#2666)
Browse files Browse the repository at this point in the history
  • Loading branch information
njzjz authored Jul 11, 2023
1 parent 4744fc8 commit 3a5f7cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions deepmd/infer/deep_pot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3a5f7cf

Please sign in to comment.