From bd90fccd375209e283af3d6779baeeaa0fca5cbf Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Thu, 23 Nov 2023 15:54:26 +0000 Subject: [PATCH] Remove padded MM forces. --- emle/emle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emle/emle.py b/emle/emle.py index 583f18d..c51647a 100644 --- a/emle/emle.py +++ b/emle/emle.py @@ -1576,7 +1576,7 @@ def _sire_callback(self, atomic_numbers, charges_mm, xyz_qm, xyz_mm): # Return the energy and forces in OpenMM units. return ( E_tot.item() * HARTREE_TO_KJ_MOL, - (-grad_qm * HARTREE_TO_KJ_MOL * NANOMETER_TO_BOHR).tolist(), + (-grad_qm[:num_mm_atoms] * HARTREE_TO_KJ_MOL * NANOMETER_TO_BOHR).tolist(), (-grad_mm * HARTREE_TO_KJ_MOL * NANOMETER_TO_BOHR).tolist(), )