Skip to content
Closed
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: 8 additions & 1 deletion arc/job/trsh.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def determine_ess_status(output_path: str,
if 'l9999.exe' in line or 'link 9999' in line:
cycle_issue = False
neg_eigenvalues = False
polarization_error = False
for j in range(i, len_reversed_lines):
if 'Number of steps exceeded' in reverse_lines[j]:
keywords = ['MaxOptCycles', 'GL9999']
Expand All @@ -107,7 +108,13 @@ def determine_ess_status(output_path: str,
neg_eigenvalues = True
line = 'Wrong number of Negative eigenvalues'
break
if not cycle_issue and not neg_eigenvalues:
elif 'Error on total polarization charges' in reverse_lines[j]:
keywords = ['Unconverged', 'GL9999', 'NoSymm']
error = 'Error on total polarization charges (SCRF/SMD convergence failure)'
polarization_error = True
line = 'Error on total polarization charges'
break
if not cycle_issue and not neg_eigenvalues and not polarization_error:
keywords = ['Unconverged', 'GL9999'] # GL stand for Gaussian Link
error = 'Unconverged'
elif 'l101.exe' in line:
Expand Down
11 changes: 10 additions & 1 deletion arc/job/trsh_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,16 @@ def test_determine_ess_status(self):
self.assertEqual(keywords, ["MaxOptCycles", "GL9999",])
self.assertEqual(error, "Maximum optimization cycles reached.")
self.assertIn("Number of steps exceeded", line)


path = os.path.join(self.base_path["gaussian"], "polarization_charges.out")
status, keywords, error, line = trsh.determine_ess_status(
output_path=path, species_label="pr2", job_type="opt"
)
self.assertEqual(status, "errored")
self.assertEqual(keywords, ["Unconverged", "GL9999", "NoSymm"])
self.assertEqual(error, "Error on total polarization charges (SCRF/SMD convergence failure)")
self.assertIn("Error on total polarization charges", line)

path = os.path.join(self.base_path["gaussian"], "inaccurate_quadrature.out")
status, keywords, error, line = trsh.determine_ess_status(
output_path=path, species_label="Zr2O4H", job_type="opt"
Expand Down
22 changes: 22 additions & 0 deletions arc/testing/trsh/gaussian/polarization_charges.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Entering Gaussian System, Link 0=g16
Initial command:
/usr/local/g16/l1.exe "/scratch/g16/Gau-12345.inp" -scrdir="/scratch/g16/"
Entering Link 1 = /usr/local/g16/l1.exe PID= 12345.

Copyright (c) 1988-2019, Gaussian, Inc. All Rights Reserved.

#P opt=(cartesian,calcfc,maxcycle=200,tight) SCRF=(smd,Solvent=dimethylsulfoxide) wb97xd/jul-cc-pvtz

pr2

0 1
C 0.000000 0.000000 0.000000

Error on total polarization charges = 0.04304
(Enter /usr/local/g16/l9999.exe)

Error termination request processed by link 9999.
Error termination via Lnk1e in /usr/local/g16/l9999.exe at Tue Jun 16 12:39:18 2026.
Job cpu time: 1 days 22 hours 50 minutes 16.4 seconds.
Elapsed time: 0 days 2 hours 57 minutes 47.6 seconds.
File lengths (MBytes): RWF= 101 Int= 0 D2E= 0 Chk= 11 Scr= 1