From 03b75e5ef7a67e8b0c95b61d7f5c4a3926bbf500 Mon Sep 17 00:00:00 2001 From: Alon Grinberg Dana Date: Tue, 3 Sep 2024 07:46:35 +0300 Subject: [PATCH] Tests: CASPT2 (RS2C) --- arc/job/adapters/molpro_test.py | 60 +++++++++++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 3 deletions(-) diff --git a/arc/job/adapters/molpro_test.py b/arc/job/adapters/molpro_test.py index bd4659c9a2..ddcff0903d 100644 --- a/arc/job/adapters/molpro_test.py +++ b/arc/job/adapters/molpro_test.py @@ -72,6 +72,16 @@ def setUpClass(cls): H -0.93116 -0.20169 0.00000"""])], testing=True, ) + cls.job_6 = MolproAdapter(execution_type='queue', + job_type='sp', + level=Level(method='MP2_CASSCF_RS2C', basis='aug-cc-pVTZ'), # CASPT2 + project='test', + project_directory=os.path.join(ARC_PATH, 'arc', 'testing', 'test_MolproAdapter_6'), + species=[ARCSpecies(label='HNO_t', xyz=["""N -0.08142 0.37454 0.00000 + O 1.01258 -0.17285 0.00000 + H -0.93116 -0.20169 0.00000"""])], + testing=True, + ) def test_set_cpu_and_mem(self): """Test assigning number of cpu's and memory""" @@ -294,10 +304,54 @@ def test_write_mrci_input_file(self): ---; """ - print('*****') - print(content_5) self.assertEqual(content_5, job_5_expected_input_file) + self.job_6.cpu_cores = 48 + self.job_6.set_input_file_memory() + self.job_6.write_input_file() + with open(os.path.join(self.job_6.local_path, input_filenames[self.job_6.job_adapter]), 'r') as f: + content_6 = f.read() + job_6_expected_input_file = """***,HNO_t +memory,Total=438,m; + +geometry={angstrom; +N -0.08142000 0.37454000 0.00000000 +O 1.01258000 -0.17285000 0.00000000 +H -0.93116000 -0.20169000 0.00000000} + +gprint,orbitals; + +basis=aug-cc-pvtz + + + +int; +{hf; + maxit,999; + wf,spin=0,charge=0;} + + + +{mp2; + wf,spin=0,charge=0;} + +{casscf; + maxit,999; + wf,spin=0,charge=0;} + +{rs2c; + maxit,999; + wf,spin=0,charge=0;}; + + + +---; + +""" + print('*****') + print(content_6) + self.assertEqual(content_6, job_6_expected_input_file) + def test_set_files(self): """Test setting files""" job_1_files_to_upload = [{'file_name': 'submit.sub', @@ -326,7 +380,7 @@ def tearDownClass(cls): Delete all project directories created during these unit tests """ for folder in ['test_MolproAdapter_1', 'test_MolproAdapter_2', 'test_MolproAdapter_3', 'test_MolproAdapter_4', - 'test_MolproAdapter_5']: + 'test_MolproAdapter_5', 'test_MolproAdapter_6']: shutil.rmtree(os.path.join(ARC_PATH, 'arc', 'testing', folder), ignore_errors=True)