-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Shyue Ping Ong
committed
Aug 8, 2023
1 parent
ba771fb
commit 9dfce04
Showing
3 changed files
with
10 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import pytest | ||
|
||
from matcalc.util import get_calculator | ||
from matcalc.util import get_universal_calculator | ||
from ase.calculators.calculator import Calculator | ||
|
||
|
||
def test_get_calculator(): | ||
for name in ("M3GNet", "M3GNet-MP-2021.2.8-PES", "CHGNet"): | ||
calc = get_calculator(name) | ||
calc = get_universal_calculator(name) | ||
assert isinstance(calc, Calculator) | ||
with pytest.raises(ValueError, match="Unsupported model name"): | ||
get_calculator("whatever") | ||
get_universal_calculator("whatever") |