Skip to content

Commit

Permalink
Place atomic numbers on same device.
Browse files Browse the repository at this point in the history
  • Loading branch information
lohedges committed Nov 29, 2024
1 parent 1268c7f commit 10e90d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion emle/models/_ani.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ def __init__(
# Optimise the ANI2x model if atomic_numbers are specified.
if _has_nnpops and atomic_numbers is not None:
try:
atomic_numbers = atomic_numbers.reshape(1, *atomic_numbers.shape)
atomic_numbers = atomic_numbers.reshape(
1, *atomic_numbers.shape
).to(self._device)
self._ani2x = _NNPOps.OptimizedTorchANI(
self._ani2x, atomic_numbers
).to(device)
Expand Down

0 comments on commit 10e90d6

Please sign in to comment.