Skip to content

Commit

Permalink
added tests for gaussian and xtb
Browse files Browse the repository at this point in the history
  • Loading branch information
MFSJMenger committed Dec 19, 2023
1 parent 91c7aaf commit 842f020
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions qforce/qm/gaussian.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
class Gaussian(QMInterface):

name = 'gaussian'
has_torsiondrive = True

_user_input = """
Expand Down
2 changes: 2 additions & 0 deletions qforce/qm/qm.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ def _get_qm_softwares(self, config):
selection = xTB.generate_user_input().get_answers()
softwares['scan_software'] = implemented_qm_software['xtb'](SimpleNamespace(**selection))

if config.dihedral_scanner == 'torsiondrive' and softwares['scan_software'].has_torsiondrive is False:
raise SystemExit("Error: TorsionDrive not supported for scan_software '{softwares['scan_software'].name}'")
self._print_softwares(softwares)

return softwares
Expand Down
2 changes: 1 addition & 1 deletion qforce/qm/qm_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class QMInterface(Colt):

# Please specify the name of the qm interface
name = None
has_torsiondrive = False

def __init__(self, config, read, write):
self._setup(config, read, write)
Expand Down Expand Up @@ -86,7 +87,6 @@ def opt(self, ):
def sp(self, ):
...

@abstractmethod
def scan_torsiondrive(self, ):
...

Expand Down
1 change: 1 addition & 0 deletions qforce/qm/xtb.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ class xTB(QMInterface):
"""

name = 'xtb'
has_torsiondrive = True

_method = []

Expand Down

0 comments on commit 842f020

Please sign in to comment.