From 062c2c26cb94c64ec6d6e62ed3676e5f64899cdd Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Wed, 11 Dec 2024 10:15:37 +0000 Subject: [PATCH] Pass empty tensors for MM charges and positions. --- emle/_analyzer.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/emle/_analyzer.py b/emle/_analyzer.py index 78d2ac2..f8dec62 100644 --- a/emle/_analyzer.py +++ b/emle/_analyzer.py @@ -100,7 +100,12 @@ def __init__( backend = backend.to(device).to(dtype) atomic_numbers = _torch.tensor(atomic_numbers, device=device) qm_xyz = _torch.tensor(qm_xyz, dtype=dtype, device=device) - self.e_backend = backend(atomic_numbers, qm_xyz) * _HARTREE_TO_KCAL_MOL + charges_mm = _torch.empty((len(qm_xyz), 0), dtype=dtype, device=device) + mm_xyz = _torch.empty((len(qm_xyz), 0, 3), dtype=dtype, device=device) + self.e_backend = ( + backend(atomic_numbers, charges_mm, qm_xyz, mm_xyz) + * _HARTREE_TO_KCAL_MOL + ) self.atomic_numbers = _torch.tensor( atomic_numbers, dtype=_torch.int, device=device