Skip to content

Commit 270777f

Browse files
committed
TrshQCHEM: Added Minimization Error
'Error within run_minimization with minimization method' - Not certain what this error requires, and also if we should troubleshoot it if the job type is a 'conformer'. For now, we will re-run the job under the same conditions and if it fails again, we will declare it not possible to troubleshoot remove 'break'
1 parent 659ad74 commit 270777f

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

arc/job/trsh.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,11 @@ def determine_ess_status(output_path: str,
207207
# ARC cannot run QChem without a valid license. Therefore, we raise an error.
208208
# The user should check that the license server is active and that the license file is valid.
209209
raise ValueError('QChem license error. Check the license file.')
210+
elif 'Error within run_minimization with minimization method' in line:
211+
# This error is unknown currently, so will try to run the job again.
212+
keywords = ['Minimization']
213+
error = 'Error within run_minimization with minimization method'
214+
break
210215
if 'MAXIMUM OPTIMIZATION CYCLES REACHED' in line or 'Maximum optimization cycles reached' in line:
211216
# ' Maximum number of iterations reached during minimization algorithm.'
212217
# ' Try to increase the number of max iterations or lower threshold for convergence criteria.'
@@ -992,6 +997,27 @@ def trsh_ess_job(label: str,
992997
log_message += ' and SYM_IGNORE'
993998
trsh_keyword += '\n SYM_IGNORE True'
994999
logger.info(log_message)
1000+
elif 'Minimization' in job_status['keywords']:
1001+
# Uncertain what this error is, but assuming it's just an error that means we need to re-run the job under the same conditions
1002+
# However, if this error persists, we will determine that the job is not converging and so we will
1003+
# determine it cannot be run and will not try again
1004+
if 'Minimization' in job_status['error']:
1005+
logger.warning(f'Could not troubleshoot {job_type} job in {software} for {label} with same conditions - Minimization error persists')
1006+
couldnt_trsh = True
1007+
else:
1008+
log_message = f'Troubleshooting {job_type} job in {software} for {label} with same conditions'
1009+
if 'maxiter' in ess_trsh_methods:
1010+
log_message += ' and maxiter'
1011+
trsh_keyword = '\n MAX_SCF_CYCLES 1000'
1012+
if 'max_cycles' in ess_trsh_methods:
1013+
log_message += ' and max_cycles'
1014+
trsh_keyword = '\n GEOM_OPT_MAX_CYCLES 250'
1015+
if 'DIIS_GDM' in ess_trsh_methods:
1016+
log_message += ' and DIIS_GDM'
1017+
trsh_keyword = '\n SCF_ALGORITHM DIIS_GDM'
1018+
if 'SYM_IGNORE' in ess_trsh_methods:
1019+
log_message += ' and SYM_IGNORE'
1020+
trsh_keyword = '\n SYM_IGNORE True'
9951021
elif 'SYM_IGNORE' not in ess_trsh_methods: # symmetry - look in manual, no symm if fails
9961022
# change the SCF algorithm and increase max SCF cycles
9971023
log_message = f'Troubleshooting {job_type} job in {software} for {label} using SYM_IGNORE'

0 commit comments

Comments
 (0)