Skip to content

Commit

Permalink
Re-add support for xTB
Browse files Browse the repository at this point in the history
  • Loading branch information
WardLT committed Dec 4, 2023
1 parent 938be43 commit 3a0bf53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jitterbug/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@ def make_calculator(method: str, basis: Optional[str], **kwargs) -> Calculator:
if not (basis is None or basis == "None"):
raise ValueError(f'Basis must be none for method: {method}')
return MOPAC(method=method, command='mopac PREFIX.mop > /dev/null')
elif method == 'xtb':
from xtb.ase.calculator import XTB
return XTB()
else:
return Psi4(method=method, basis=basis, **kwargs)
2 changes: 2 additions & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ def test_make_calculator():

with raises(ValueError):
make_calculator('pm7', 'wrong')

assert make_calculator('xtb', None).name == 'xtb'

0 comments on commit 3a0bf53

Please sign in to comment.