diff --git a/arkane/ess/molpro.py b/arkane/ess/molpro.py index a527b1d0240..e94093fcd15 100644 --- a/arkane/ess/molpro.py +++ b/arkane/ess/molpro.py @@ -336,6 +336,7 @@ def load_energy(self, zpe_scale_factor=1.): f12b = True # MRCI could also have a v(4+)z basis, so don't break yet elif 'ccsd' in line.lower() and 'f12' in line.lower(): f12 = True + f12a_section, f12b_section = False, False elif 'mrci' in line.lower(): mrci = True f12a, f12b = False, False @@ -350,11 +351,15 @@ def load_energy(self, zpe_scale_factor=1.): # Search for e_elect for line in lines: if f12 and f12a: - if ('CCSD(T)-F12a' in line or 'CCSD(T)-F12/' in line and '!' not in line) and 'energy' in line: + if 'F12a energy' in line: + f12a_section, f12b_section = True, False + if 'CCSD(T)-F12' in line and 'energy' in line and f12a_section: e_elect = float(line.split()[-1]) break elif f12 and f12b: - if 'CCSD(T)-F12b' in line and 'energy' in line: + if 'F12b energy' in line: + f12a_section, f12b_section = False, True + if 'CCSD(T)-F12' in line and 'energy' in line and f12b_section: e_elect = float(line.split()[-1]) break elif mrci: diff --git a/test/arkane/ess/molproTest.py b/test/arkane/ess/molproTest.py index bf064759b94..36a121f6238 100644 --- a/test/arkane/ess/molproTest.py +++ b/test/arkane/ess/molproTest.py @@ -110,7 +110,7 @@ def test_load_rad_from_molpro_log_f12(self): log = MolproLog(os.path.join(self.data_path, "C5OH5_CCSD(T)_F12.out")) e0 = log.load_energy() - assert round(abs(e0 / constants.Na / constants.E_h - -268.317057640597), 5) == 0 + assert round(abs(e0 / constants.Na / constants.E_h - -268.336320614452), 5) == 0 def test_load_hosi_from_molpro_log(self): """