Skip to content

Commit

Permalink
Pass all kwargs to ANI2xEMLE in optimised Sire callback.
Browse files Browse the repository at this point in the history
  • Loading branch information
lohedges committed Oct 17, 2024
1 parent 3f8a6b7 commit afc02b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions emle/calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,7 @@ def __init__(
self._species = self._emle._species
self._method = self._emle._method
self._alpha_mode = self._emle._alpha_mode
self._atomic_numbers = self._emle._atomic_numbers

if isinstance(atomic_numbers, _np.ndarray):
atomic_numbers = atomic_numbers.tolist()
Expand Down Expand Up @@ -1754,7 +1755,12 @@ def _sire_callback_optimised(
# Create the model.
ani2x_emle = _ANI2xEMLE(
emle_model=self._model,
emle_species=self._species,
alpha_mode=self._alpha_mode,
mm_charges=self._mm_charges,
model_index=self._ani2x_model_index,
ani2x_model=self._torchani_model,
atomic_numbers=atomic_numbers,
device=self._device,
)

Expand Down
1 change: 1 addition & 0 deletions emle/models/_emle.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def __init__(
raise ValueError(
"All elements of 'atomic_numbers' must be greater than zero"
)
self._atomic_numbers = atomic_numbers

if method == "mm":
if mm_charges is None:
Expand Down

0 comments on commit afc02b9

Please sign in to comment.