diff --git a/arc/job/adapters/gaussian_test.py b/arc/job/adapters/gaussian_test.py index ee05f823a3..4c5f181870 100644 --- a/arc/job/adapters/gaussian_test.py +++ b/arc/job/adapters/gaussian_test.py @@ -218,7 +218,7 @@ def setUpClass(cls): ) # Gaussian: Checkfile error and SCF error - # First SCF error - qc,nosymm + # First SCF error - maxcycle=128,nosymm job_status = {'keywords': ['SCF', 'NoSymm']} 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, @@ -240,7 +240,7 @@ def setUpClass(cls): ) # Gaussian: Additional SCF error - # Second SCF error - Includes previous SCF error and NDamp=30 + # Second SCF error - Includes previous SCF error and xqc 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, @@ -262,7 +262,7 @@ def setUpClass(cls): ) # Gaussian: Additional SCF error - # Third SCF error - Includes previous SCF errors and NoDIIS + # Third SCF error - Includes previous SCF errors 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, @@ -327,6 +327,118 @@ def setUpClass(cls): testing=True, args=args ) + + # Gaussian: L9999 error, including MaxOptCycles and SCF error + # Occures when max steps have exceeded during optimization + job_status = {'keywords': ['L9999', 'MaxOptCycles', 'SCF']} + ess_trsh_methods = [''] + 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, + job_type, software, fine, memory_gb, + num_heavy_atoms, cpu_cores, ess_trsh_methods) + args = {'keyword': {}, 'block': {}} + if trsh_keyword: + args['trsh'] = {'trsh': trsh_keyword} + cls.job_17 = GaussianAdapter(execution_type='local', + job_type='opt', + level=Level(method='wb97xd'), + fine=True, + ess_trsh_methods=ess_trsh_methods, + project='test', + project_directory=os.path.join(ARC_PATH, 'arc', 'testing', 'test_GaussianAdapter'), + species=[spc_11], + testing=True, + args=args + ) + + # Gaussian L502 error, including InaccurateQuadrature + job_status = {'keywords': ['L502', 'InaccurateQuadrature']} + ess_trsh_methods = [''] + 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, + job_type, software, fine, memory_gb, + num_heavy_atoms, cpu_cores, ess_trsh_methods) + args = {'keyword': {}, 'block': {}} + if trsh_keyword: + args['trsh'] = {'trsh': trsh_keyword} + cls.job_18 = GaussianAdapter(execution_type='local', + job_type='opt', + level=Level(method='wb97xd'), + fine=True, + ess_trsh_methods=ess_trsh_methods, + project='test', + project_directory=os.path.join(ARC_PATH, 'arc', 'testing', 'test_GaussianAdapter'), + species=[spc_11], + testing=True, + args=args + ) + + # Gaussian L502 Error (already troubleshooted with L502 error), excluding InaccurateQuadrature + job_status = {'keywords': ['SCF', 'GL502', 'NoSymm']} + ess_trsh_methods = ['scf=(maxcycle=128)', 'scf=(qc)', 'scf=(NDamp=30)', 'scf=(NoDIIS)', 'guess=INDO', 'nosymm'] + 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, + job_type, software, fine, memory_gb, + num_heavy_atoms, cpu_cores, ess_trsh_methods) + args = {'keyword': {}, 'block': {}} + if trsh_keyword: + args['trsh'] = {'trsh': trsh_keyword} + cls.job_19 = GaussianAdapter(execution_type='local', + job_type='opt', + level=Level(method='wb97xd'), + fine=True, + ess_trsh_methods=ess_trsh_methods, + project='test', + project_directory=os.path.join(ARC_PATH, 'arc', 'testing', 'test_GaussianAdapter'), + species=[spc_11], + testing=True, + args=args + ) + + # Gaussian L502 Error (already troubleshooted with L502 error), including InaccurateQuadrature + job_status = {'keywords': ['GL502', 'InaccurateQuadrature']} + ess_trsh_methods = ['scf=(maxcycle=128)', 'scf=(qc)', 'scf=(NDamp=30)', 'scf=(NoDIIS)', 'guess=INDO', 'nosymm', 'int=grid=300590'] + 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, + job_type, software, fine, memory_gb, + num_heavy_atoms, cpu_cores, ess_trsh_methods) + args = {'keyword': {}, 'block': {}} + if trsh_keyword: + args['trsh'] = {'trsh': trsh_keyword} + cls.job_20 = GaussianAdapter(execution_type='local', + job_type='opt', + level=Level(method='wb97xd'), + fine=True, + ess_trsh_methods=ess_trsh_methods, + project='test', + project_directory=os.path.join(ARC_PATH, 'arc', 'testing', 'test_GaussianAdapter'), + species=[spc_11], + testing=True, + args=args + ) + + # Gaussian L502 Error (already troubleshooted with L502 error), including InaccurateQuadrature + job_status = {'keywords': ['GL502', 'InaccurateQuadrature']} + ess_trsh_methods = ['scf=(maxcycle=128)', 'scf=(qc)', 'scf=(NDamp=30)', 'scf=(NoDIIS)', 'guess=INDO', 'nosymm', 'int=grid=300590', 'scf=(NoVarAcc)'] + 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, + job_type, software, fine, memory_gb, + num_heavy_atoms, cpu_cores, ess_trsh_methods) + args = {'keyword': {}, 'block': {}} + if trsh_keyword: + args['trsh'] = {'trsh': trsh_keyword} + cls.job_21 = GaussianAdapter(execution_type='local', + job_type='opt', + level=Level(method='wb97xd'), + fine=True, + ess_trsh_methods=ess_trsh_methods, + project='test', + project_directory=os.path.join(ARC_PATH, 'arc', 'testing', 'test_GaussianAdapter'), + species=[spc_11], + testing=True, + args=args + ) + def test_set_cpu_and_mem(self): """Test assigning number of cpu's and memory""" @@ -651,7 +763,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,maxcycle=128,tight) ethanol @@ -677,7 +789,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=(NDamp=30,direct,tight,xqc) +#P opt=(calcfc,maxstep=5,tight) guess=mix wb97xd integral=(grid=ultrafine, Acc2E=14) IOp(2/9=2000) nosymm scf=(direct,maxcycle=128,tight,xqc) ethanol @@ -703,7 +815,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=(NDamp=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,direct,maxcycle=128,tight,xqc) ethanol @@ -729,7 +841,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=(NDamp=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,direct,maxcycle=128,tight,xqc) ethanol @@ -756,7 +868,7 @@ def test_trsh_write_input_file(self): %mem=14336mb %NProcShared=8 -#P opt=(cartesian) integral=(grid=ultrafine, Acc2E=14) guess=INDO wb97xd IOp(2/9=2000) nosymm scf=(NDamp=30,NoDIIS,direct,tight,xqc) +#P opt=(cartesian) integral=(grid=ultrafine, Acc2E=14) guess=mix wb97xd IOp(2/9=2000) nosymm scf=(NDamp=30,NoDIIS,direct,maxcycle=128,tight,xqc) ethanol @@ -776,6 +888,139 @@ def test_trsh_write_input_file(self): self.assertEqual(content_16, job_16_expected_input_file) + self.job_17.write_input_file() + with open(os.path.join(self.job_17.local_path, input_filenames[self.job_17.job_adapter]), 'r') as f: + content_17 = f.read() + job_17_expected_input_file = """%chk=check.chk +%mem=14336mb +%NProcShared=8 + +#P opt=(calcfc,maxcycle=200,maxstep=5,tight) guess=mix wb97xd integral=(grid=ultrafine, Acc2E=14) IOp(2/9=2000) scf=(direct,maxcycle=128,tight) + +ethanol + +0 1 +C 1.16582100 -0.40435500 0.00000000 +C 0.00000000 0.55180500 0.00000000 +O -1.18946000 -0.21419400 0.00000000 +H -1.94125800 0.37518500 0.00000000 +H 2.10540200 0.14511600 0.00000000 +H 1.13062400 -1.03878500 0.88303200 +H 1.13062400 -1.03878500 -0.88303200 +H 0.04768200 1.19305700 0.88359100 +H 0.04768200 1.19305700 -0.88359100 + + +""" + self.assertEqual(content_17, job_17_expected_input_file) + + self.job_18.write_input_file() + with open(os.path.join(self.job_18.local_path, input_filenames[self.job_18.job_adapter]), 'r') as f: + content_18 = f.read() + job_18_expected_input_file = """%chk=check.chk +%mem=14336mb +%NProcShared=8 + +#P opt=(calcfc,maxstep=5,tight) guess=mix wb97xd integral=(grid=ultrafine, Acc2E=14) IOp(2/9=2000) int=grid=300590 scf=(direct,tight) + +ethanol + +0 1 +C 1.16582100 -0.40435500 0.00000000 +C 0.00000000 0.55180500 0.00000000 +O -1.18946000 -0.21419400 0.00000000 +H -1.94125800 0.37518500 0.00000000 +H 2.10540200 0.14511600 0.00000000 +H 1.13062400 -1.03878500 0.88303200 +H 1.13062400 -1.03878500 -0.88303200 +H 0.04768200 1.19305700 0.88359100 +H 0.04768200 1.19305700 -0.88359100 + + +""" + self.assertEqual(content_18, job_18_expected_input_file) + + self.job_19.write_input_file() + with open(os.path.join(self.job_19.local_path, input_filenames[self.job_19.job_adapter]), 'r') as f: + content_19 = f.read() + job_19_expected_input_file = """%chk=check.chk +%mem=14336mb +%NProcShared=8 + +#P opt=(calcfc,maxstep=5,tight) guess=mix wb97xd integral=(grid=ultrafine, Acc2E=14) IOp(2/9=2000) nosymm scf=(Fermi,NDamp=30,NoDIIS,NoVarAcc,Noincfock,direct,maxcycle=128,tight,xqc) + +ethanol + +0 1 +C 1.16582100 -0.40435500 0.00000000 +C 0.00000000 0.55180500 0.00000000 +O -1.18946000 -0.21419400 0.00000000 +H -1.94125800 0.37518500 0.00000000 +H 2.10540200 0.14511600 0.00000000 +H 1.13062400 -1.03878500 0.88303200 +H 1.13062400 -1.03878500 -0.88303200 +H 0.04768200 1.19305700 0.88359100 +H 0.04768200 1.19305700 -0.88359100 + + +""" + self.assertEqual(content_19, job_19_expected_input_file) + + self.job_20.write_input_file() + with open(os.path.join(self.job_20.local_path, input_filenames[self.job_20.job_adapter]), 'r') as f: + content_20 = f.read() + job_20_expected_input_file = """%chk=check.chk +%mem=14336mb +%NProcShared=8 + +#P opt=(calcfc,maxstep=5,tight) guess=mix wb97xd integral=(grid=ultrafine, Acc2E=14) IOp(2/9=2000) scf=(NDamp=30,NoDIIS,NoVarAcc,direct,maxcycle=128,tight,xqc) + +ethanol + +0 1 +C 1.16582100 -0.40435500 0.00000000 +C 0.00000000 0.55180500 0.00000000 +O -1.18946000 -0.21419400 0.00000000 +H -1.94125800 0.37518500 0.00000000 +H 2.10540200 0.14511600 0.00000000 +H 1.13062400 -1.03878500 0.88303200 +H 1.13062400 -1.03878500 -0.88303200 +H 0.04768200 1.19305700 0.88359100 +H 0.04768200 1.19305700 -0.88359100 + + +""" + + self.assertEqual(content_20, job_20_expected_input_file) + + self.job_21.write_input_file() + with open(os.path.join(self.job_21.local_path, input_filenames[self.job_21.job_adapter]), 'r') as f: + content_21 = f.read() + job_21_expected_input_file = """%chk=check.chk +%mem=14336mb +%NProcShared=8 + +#P opt=(calcfc,maxstep=5,tight) guess=INDO wb97xd integral=(grid=ultrafine, Acc2E=14) IOp(2/9=2000) int=gird=300590 scf=(NDamp=30,NoDIIS,NoVarAcc,direct,maxcycle=128,tight,xqc) + +ethanol + +0 1 +C 1.16582100 -0.40435500 0.00000000 +C 0.00000000 0.55180500 0.00000000 +O -1.18946000 -0.21419400 0.00000000 +H -1.94125800 0.37518500 0.00000000 +H 2.10540200 0.14511600 0.00000000 +H 1.13062400 -1.03878500 0.88303200 +H 1.13062400 -1.03878500 -0.88303200 +H 0.04768200 1.19305700 0.88359100 +H 0.04768200 1.19305700 -0.88359100 + + +""" + + self.assertEqual(content_21, job_21_expected_input_file) + + @classmethod def tearDownClass(cls): """