Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check job pre-run function #230

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/tcutility/job/adf.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,12 @@ def symmetry(self, group: str):
'''
self.settings.input.adf.Symmetry = group

def _check_job(self):
# if we have spinpolarization we do not want to use DFTB to calculate the initial hessian
if self.settings.input.adf.SpinPolarization != 0 and self.settings.input.ams.GeometryOptimization.InitialHessian.Type == 'CalculateWithFastEngine':
# we simply remove it from the geometryoptimization block
self.settings.input.ams.GeometryOptimization.pop('InitialHessian', None)


class ADFFragmentJob(ADFJob):
def __init__(self, *args, **kwargs):
Expand Down
7 changes: 7 additions & 0 deletions src/tcutility/job/ams.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ def _setup_job(self):
if not self._molecule:
self.settings.input.ams.system.GeometryFile = self._molecule_path

# sometimes we have to check if a job is able to run or requires some special consideration
# those types of checks should be defined in _check_job
self._check_job()

# we will use plams to write the input and runscript
sett = self.settings.as_plams_settings()
job = plams.AMSJob(name=self.name, molecule=self._molecule, settings=sett)
Expand All @@ -212,6 +216,9 @@ def _setup_job(self):

return True

def _check_job(self):
...

@property
def output_mol_path(self):
'''
Expand Down
Loading