Skip to content

Commit

Permalink
Don't crush if T1/D1 isn't in the Molpro log file
Browse files Browse the repository at this point in the history
MRCI runs don't report the T1 diagnostic coefficient. Turn the Errors into warnings.
  • Loading branch information
alongd committed Sep 8, 2024
1 parent 9970c1f commit 0e87b39
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions arkane/ess/molpro.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,10 +435,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):
"""
Expand All @@ -458,7 +458,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):
"""
Expand All @@ -472,7 +473,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"""
Expand Down

0 comments on commit 0e87b39

Please sign in to comment.