Skip to content

Commit

Permalink
added calculator support
Browse files Browse the repository at this point in the history
  • Loading branch information
MFSJMenger committed Jan 31, 2024
1 parent 06d72b6 commit f774405
Showing 1 changed file with 29 additions and 6 deletions.
35 changes: 29 additions & 6 deletions qforce/qm/qm.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,24 @@
from colt import Colt
from calkeeper import check, CalculationIncompleteError

from .gaussian import Gaussian
from .qchem import QChem
from .gaussian import Gaussian, GaussianCalculator
from .qchem import QChem, QChemCalculator
from .orca import Orca
from .xtb import xTB, XTBGaussian
from .qm_base import scriptify, HessianOutput, ScanOutput
from .xtb import xTB, XTBGaussian, xTBCalculator
from .qm_base import scriptify, HessianOutput, ScanOutput, Calculator


class TorsiondriveCalculator(Calculator):

name = 'torsiondrive'
_user_input = ""

@classmethod
def from_config(cls, config):
return cls()

def _commands(self, filename, basename, ncores):
return [f'bash {filename}']


implemented_qm_software = {'gaussian': Gaussian,
Expand All @@ -21,6 +34,15 @@
}


calculators = {
'gaussian': GaussianCalculator,
'torsiondrive': TorsiondriveCalculator,
'xtb': xTBCalculator,
'qchem': QChemCalculator,
'torsiondrive': TorsiondriveCalculator,
}


class QM(Colt):

_user_input = """
Expand Down Expand Up @@ -152,8 +174,9 @@ def get_hessian(self):
#
point_charges = charge_software.read.charges(self.config, **charge_files)
#
output.point_charges = output.check_type_and_shape(point_charges, 'point_charges', float,
(output.n_atoms,))
output.point_charges = output.check_type_and_shape(
point_charges[charge_software.config.charge_method], 'point_charges', float,
(output.n_atoms,))
#
return output

Expand Down

0 comments on commit f774405

Please sign in to comment.