From 56dbeaf052858a9da520b191c7e33e8a50204d77 Mon Sep 17 00:00:00 2001 From: Alon Grinberg Dana Date: Sun, 23 Jun 2024 14:38:14 +0300 Subject: [PATCH] Don't crush if T1/D1 isn't in the Molpro log file MRCI runs don't report the T1 diagnostic coefficient. Turn the Errors into warnings. --- arkane/ess/molpro.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arkane/ess/molpro.py b/arkane/ess/molpro.py index b7c4adfb47..01be43adac 100644 --- a/arkane/ess/molpro.py +++ b/arkane/ess/molpro.py @@ -438,10 +438,10 @@ def load_negative_frequency(self): if len(freqs) == 1: return -float(freqs[0]) elif len(freqs) > 1: - logging.info('More than one imaginary frequency in Molpro output file {0}.'.format(self.path)) + logging.info(f'More than one imaginary frequency in Molpro output file {self.path}.') return -float(freqs[0]) else: - raise LogError('Unable to find imaginary frequency in Molpro output file {0}'.format(self.path)) + raise LogError(f'Unable to find imaginary frequency in Molpro output file {self.path}') def load_scan_energies(self): """ @@ -461,7 +461,8 @@ def get_T1_diagnostic(self): if 'T1 diagnostic: ' in line: items = line.split() return float(items[-1]) - raise LogError('Unable to find T1 diagnostic in energy file: {0}'.format(self.path)) + logging.warning(f'Unable to find T1 diagnostic in energy file: {self.path}') + return None def get_D1_diagnostic(self): """ @@ -475,7 +476,8 @@ def get_D1_diagnostic(self): if 'D1 diagnostic: ' in line: items = line.split() return float(items[-1]) - raise LogError('Unable to find D1 diagnostic in energy file: {0}'.format(self.path)) + logging.warning(f'Unable to find D1 diagnostic in energy file: {self.path}') + return None def load_scan_pivot_atoms(self): """Not implemented for Molpro"""