Skip to content

Commit ef8f1e4

Browse files
authored
Merge pull request #231 from inseonglee/gamess_ssr
Gamess SSR interface
2 parents 24a9b82 + d925a19 commit ef8f1e4

File tree

4 files changed

+588
-0
lines changed

4 files changed

+588
-0
lines changed

src/qm/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from qm import dftbplus
22
from qm import terachem
33
from qm import molpro
4+
from qm import gamess
45
from qm import gaussian09
56
from qm import turbomole
67
from qm import columbus

src/qm/gamess/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .ssr import SSR

src/qm/gamess/gamess.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
from __future__ import division
2+
from qm.qm_calculator import QM_calculator
3+
from misc import call_name
4+
import os
5+
6+
class GAMESS(QM_calculator):
7+
""" Class for common parts of GAMESS
8+
9+
:param string basis_set: Basis set information
10+
:param string memory: Allocatable memory in the calculations
11+
:param string qm_path: Path for QM binary
12+
:param integer nthreads: Number of threads in the calculations
13+
:param string version: Version of GAMESS, check $VERNO
14+
"""
15+
def __init__(self, basis_set, memory, qm_path, nthreads, version):
16+
# Save name of QM calculator and its method
17+
super().__init__()
18+
19+
# Initialize GAMESS common variables
20+
self.basis_set = basis_set
21+
22+
self.memory = memory
23+
self.qm_path = qm_path
24+
if (not os.path.isdir(self.qm_path)):
25+
error_message = "Directory for GAMESS binary not found!"
26+
error_vars = f"qm_path = {self.qm_path}"
27+
raise FileNotFoundError (f"( {self.qm_method}.{call_name()} ) {error_message} ( {error_vars} )")
28+
29+
self.nthreads = nthreads
30+
self.version = version
31+
32+
if (isinstance(self.version, str)):
33+
if not (self.version in ["00"]):
34+
error_message = "Other versions not implemented!"
35+
error_vars = f"version = {self.version}"
36+
raise ValueError (f"( {self.qm_method}.{call_name()} ) {error_message} ( {error_vars} )")
37+
else:
38+
error_message = "Type of version must be string!"
39+
error_vars = f"version = {self.version}"
40+
raise TypeError (f"( {self.qm_method}.{call_name()} ) {error_message} ( {error_vars} )")
41+
42+

0 commit comments

Comments
 (0)