Skip to content

Commit

Permalink
Tests: MRCI procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
alongd committed Aug 1, 2024
1 parent 6406019 commit 08b186a
Showing 1 changed file with 82 additions and 21 deletions.
103 changes: 82 additions & 21 deletions arc/job/adapters/molpro_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,25 @@ def setUpClass(cls):
testing=True,
)
cls.job_4 = MolproAdapter(execution_type='queue',
job_type='sp',
level=Level(method='MRCI-F12', basis='aug-cc-pvtz-f12'),
project='test',
project_directory=os.path.join(ARC_PATH, 'arc', 'testing', 'test_MolproAdapter_4'),
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,
)
job_type='sp',
level=Level(method='MRCI-F12', basis='aug-cc-pvtz-f12'),
project='test',
project_directory=os.path.join(ARC_PATH, 'arc', 'testing', 'test_MolproAdapter_4'),
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,
)
cls.job_5 = MolproAdapter(execution_type='queue',
job_type='sp',
level=Level(method='MP2_RS3_MRCI-F12', basis='aug-cc-pVTZ-F12'),
project='test',
project_directory=os.path.join(ARC_PATH, 'arc', 'testing', 'test_MolproAdapter_4'),
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"""
Expand Down Expand Up @@ -107,8 +117,8 @@ def test_write_input_file(self):
int;
{hf;
maxit,1000;
wf,spin=2,charge=0;}
maxit,1000;
wf,spin=2,charge=0;}
uccsd(t)-f12;
Expand Down Expand Up @@ -136,8 +146,8 @@ def test_write_input_file(self):
int;
{hf;
maxit,1000;
wf,spin=2,charge=0;}
maxit,1000;
wf,spin=2,charge=0;}
uccsd(t);
Expand Down Expand Up @@ -171,15 +181,15 @@ def test_write_mrci_input_file(self):
int;
{hf;
maxit,1000;
wf,spin=0,charge=0;}
maxit,1000;
wf,spin=0,charge=0;}
{casscf;
maxit,999;
maxit,1000;
wf,spin=0,charge=0;}
{mrci;
maxit,999;
maxit,1000;
wf,spin=0,charge=0;};
Expand Down Expand Up @@ -215,15 +225,15 @@ def test_write_mrci_input_file(self):
int;
{hf;
maxit,1000;
wf,spin=0,charge=0;}
maxit,1000;
wf,spin=0,charge=0;}
{casscf;
maxit,999;
maxit,1000;
wf,spin=0,charge=0;}
{mrci-f12;
maxit,999;
maxit,1000;
wf,spin=0,charge=0;};
Expand All @@ -238,6 +248,57 @@ def test_write_mrci_input_file(self):
"""
self.assertEqual(content_4, job_4_expected_input_file)

self.job_5.cpu_cores = 48
self.job_5.set_input_file_memory()
self.job_5.write_input_file()
with open(os.path.join(self.job_5.local_path, input_filenames[self.job_5.job_adapter]), 'r') as f:
content_5 = f.read()
job_5_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-f12
int;
{hf;
maxit,1000;
wf,spin=0,charge=0;}
{mp2;
wf,spin=0,charge=0;}
{rs3;
maxit,1000;
wf,spin=0,charge=0;}
{mrci-f12;
maxit,1000;
wf,spin=0,charge=0;};
E_mrci=energy;
E_mrci_Davidson=energd;
table,E_mrci,E_mrci_Davidson;
---;
"""
print('*****')
print(content_5)
self.assertEqual(content_5, job_5_expected_input_file)

def test_set_files(self):
"""Test setting files"""
job_1_files_to_upload = [{'file_name': 'submit.sub',
Expand Down

0 comments on commit 08b186a

Please sign in to comment.