Skip to content

Commit

Permalink
Fix MACE model (#99)
Browse files Browse the repository at this point in the history
* Fix default model so more useful error is displayed

* Fix comment

---------

Co-authored-by: ElliottKasoar <ElliottKasoar@users.noreply.github.com>
  • Loading branch information
ElliottKasoar and ElliottKasoar authored Apr 4, 2024
1 parent 236c021 commit 29a557a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions janus_core/mlip_calculators.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ def choose_calculator(
from mace.calculators import MACECalculator

# `model_paths` is keyword for path to model, so take from kwargs if specified
# Otherwise, take `model` if specified, then default to `None`, which will
# Otherwise, take `model` if specified, then default to `""`, which will
# raise a ValueError
kwargs.setdefault("model_paths", kwargs.pop("model", None))
kwargs.setdefault("model_paths", kwargs.pop("model", ""))
kwargs.setdefault("default_dtype", "float64")
calculator = MACECalculator(device=device, **kwargs)

Expand Down

0 comments on commit 29a557a

Please sign in to comment.