Skip to content

Commit

Permalink
Pass empty tensors for MM charges and positions.
Browse files Browse the repository at this point in the history
  • Loading branch information
lohedges committed Dec 11, 2024
1 parent db76f82 commit 062c2c2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion emle/_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 062c2c2

Please sign in to comment.