Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions arkane/ess/molpro.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion test/arkane/ess/molproTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
Loading