Skip to content

Commit

Permalink
Incl. geuss=INDO logic and tests
Browse files Browse the repository at this point in the history
Fix attempted trsh methods
  • Loading branch information
calvinp0 committed Nov 27, 2023
1 parent e7e2f09 commit 405c6c9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
11 changes: 9 additions & 2 deletions arc/job/adapters/gaussian.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,15 @@ def write_input_file(self) -> None:
input_dict['job_type_1'] += f' SCRF=({self.level.solvation_method}, Solvent={self.level.solvent})'

if self.species[0].number_of_atoms > 1:
input_dict['job_type_1'] += ' guess=read' if self.checkfile is not None and os.path.isfile(self.checkfile) \
else ' guess=mix'
if input_dict['job_type_1']:
input_dict['job_type_1'] += ' '
if 'guess=INDO' in input_dict['trsh']:
input_dict['job_type_1'] += 'guess=INDO'
# Remove guess=INDO from trsh
input_dict['trsh'] = input_dict['trsh'].replace('guess=INDO', '')
else:
input_dict['job_type_1'] += ' guess=read' if self.checkfile is not None and os.path.isfile(self.checkfile) \
else ' guess=mix'

# Fix OPT
terms_opt = [r'opt=\((.*?)\)', r'opt=(\w+)']
Expand Down
14 changes: 7 additions & 7 deletions arc/job/adapters/gaussian_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def setUpClass(cls):
)

# Gaussian: Additional SCF error
# Second SCF error - Includes previous SCF error and NDump=30
# Second SCF error - Includes previous SCF error and NDamp=30
job_status = {'keywords': ['SCF']}
output_errors, ess_trsh_methods, remove_checkfile, level_of_theory, software, job_type, fine, trsh_keyword, \
memory, shift, cpu_cores, couldnt_trsh = trsh.trsh_ess_job(label, level_of_theory, server, job_status,
Expand Down Expand Up @@ -518,7 +518,7 @@ def test_trsh_write_input_file(self):
%mem=14336mb
%NProcShared=8
#P opt=(calcfc,maxstep=5,tight) guess=mix wb97xd integral=(grid=ultrafine, Acc2E=14) IOp(2/9=2000) scf=(direct,tight)
#P opt=(calcfc,maxstep=5,tight) guess=mix wb97xd integral=(grid=ultrafine, Acc2E=14) IOp(2/9=2000) scf=(direct,tight)
ethanol
Expand All @@ -544,7 +544,7 @@ def test_trsh_write_input_file(self):
%mem=14336mb
%NProcShared=8
#P opt=(calcfc,maxstep=5,tight) guess=mix wb97xd integral=(grid=ultrafine, Acc2E=14) IOp(2/9=2000) nosymm scf=(direct,tight,xqc)
#P opt=(calcfc,maxstep=5,tight) guess=mix wb97xd integral=(grid=ultrafine, Acc2E=14) IOp(2/9=2000) nosymm scf=(direct,tight,xqc)
ethanol
Expand All @@ -570,7 +570,7 @@ def test_trsh_write_input_file(self):
%mem=14336mb
%NProcShared=8
#P opt=(calcfc,maxstep=5,tight) guess=mix wb97xd integral=(grid=ultrafine, Acc2E=14) IOp(2/9=2000) nosymm scf=(NDump=30,direct,tight,xqc)
#P opt=(calcfc,maxstep=5,tight) guess=mix wb97xd integral=(grid=ultrafine, Acc2E=14) IOp(2/9=2000) nosymm scf=(NDamp=30,direct,tight,xqc)
ethanol
Expand All @@ -596,7 +596,7 @@ def test_trsh_write_input_file(self):
%mem=14336mb
%NProcShared=8
#P opt=(calcfc,maxstep=5,tight) guess=mix wb97xd integral=(grid=ultrafine, Acc2E=14) IOp(2/9=2000) nosymm scf=(NDump=30,NoDIIS,direct,tight,xqc)
#P opt=(calcfc,maxstep=5,tight) guess=mix wb97xd integral=(grid=ultrafine, Acc2E=14) IOp(2/9=2000) nosymm scf=(NDamp=30,NoDIIS,direct,tight,xqc)
ethanol
Expand All @@ -622,7 +622,7 @@ def test_trsh_write_input_file(self):
%mem=14336mb
%NProcShared=8
#P opt=(calcfc,cartesian,maxstep=5,tight) guess=mix wb97xd integral=(grid=ultrafine, Acc2E=14) IOp(2/9=2000) nosymm scf=(NDump=30,NoDIIS,direct,tight,xqc)
#P opt=(calcfc,cartesian,maxstep=5,tight) guess=mix wb97xd integral=(grid=ultrafine, Acc2E=14) IOp(2/9=2000) nosymm scf=(NDamp=30,NoDIIS,direct,tight,xqc)
ethanol
Expand All @@ -649,7 +649,7 @@ def test_trsh_write_input_file(self):
%mem=14336mb
%NProcShared=8
#P opt=(cartesian) integral=(grid=ultrafine, Acc2E=14) guess=mix wb97xd IOp(2/9=2000) nosymm scf=(NDump=30,NoDIIS,direct,tight,xqc)
#P opt=(cartesian) integral=(grid=ultrafine, Acc2E=14) guess=INDO wb97xd IOp(2/9=2000) nosymm scf=(NDamp=30,NoDIIS,direct,tight,xqc)
ethanol
Expand Down
3 changes: 1 addition & 2 deletions arc/job/trsh.py
Original file line number Diff line number Diff line change
Expand Up @@ -858,8 +858,7 @@ def trsh_ess_job(label: str,
logger_info = []
couldnt_trsh = True
fine = False
if ess_trsh_methods:
attempted_ess_trsh_methods = ess_trsh_methods.copy()
attempted_ess_trsh_methods = ess_trsh_methods.copy() if ess_trsh_methods else None
# Check if Checkfile removal is in the keywords. Removal occurs when:
# - Basis Set Mismatch
# - Corrupt or Incomplete Data
Expand Down

0 comments on commit 405c6c9

Please sign in to comment.