Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Critical restart-handling defects leave invalid kinetics available on disk and orphaned job entries that can cause crashes or infinite scheduling loops.
3 open issues
What changed in this PR
This PR prevents ARC from exporting rate coefficients derived from near-zero vibrational frequencies and improves restart, cluster submission, and AutoTST reliability.
Changes:
- Reject suspect Arkane kinetics and derive TS rotor notes from rotor data.
- Handle incomplete restart state and retry queue-limit submission failures once.
- Isolate AutoTST’s Python environment, report subprocess failures, and register its installation through a
.pthfile.
| File | Description |
|---|---|
docs/source/TS_search.rst |
Document AutoTST registration and environment isolation. |
devtools/install_autotst.sh |
Register AutoTST through .pth; retain optional activation hooks. |
arc/statmech/arkane.py |
Reject kinetics involving near-zero conformer frequencies. |
arc/statmech/arkane_test.py |
Test frequency rejection and valid-frequency controls. |
arc/scheduler.py |
Improve restart scans and stale-job handling. |
arc/scheduler_test.py |
Add restart and job-tracking regression tests. |
arc/plotter.py |
Determine TS rotor notes from successful rotor data. |
arc/plotter_test.py |
Test rotor descriptions in generated libraries. |
arc/job/ssh.py |
Bound queue-limit retries and handle unrecognized submission replies. |
arc/job/ssh_test.py |
Test submission failures and retry results. |
arc/job/adapters/ts/autotst_ts.py |
Strip caller PYTHONPATH from AutoTST subprocesses. |
arc/job/adapters/ts/autotst_test.py |
Verify AutoTST environment-isolation requests. |
arc/job/adapters/scripts/autotst_script.py |
Report initialization failures with a traceback and nonzero exit. |
arc/job/adapters/scripts/autotst_script_test.py |
Test subprocess failure reporting with an AutoTST stub. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1069 +/- ##
==========================================
+ Coverage 67.15% 67.26% +0.10%
==========================================
Files 123 123
Lines 43675 43768 +93
Branches 11153 11170 +17
==========================================
+ Hits 29332 29442 +110
+ Misses 11203 11169 -34
- Partials 3140 3157 +17
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
A harmonic oscillator at ~0 cm^-1 has a divergent partition function, so a rate coefficient computed from a conformer carrying one can be off by many orders of magnitude, even above the collision limit, while the geometry, the imaginary-frequency check and the Arrhenius fit all look sound. Arkane's rotor projection keeps the n_vib largest Hessian eigenvalues without checking that they are vibrations, so a TS with a second, small imaginary mode (which LOWEST_MAJOR_TS_FREQ tolerates) retains a residual ~0 eigenvalue. After parsing each reaction's kinetics, scan the Arkane conformer blocks of its reactants, products and TS for frequencies below MIN_PHYSICAL_FREQ (5 cm^-1). On a hit, log the offenders, set the reaction's kinetics to None, and note the discard in the TS's long_thermo_description. Co-Authored-By: Claude <noreply@anthropic.com>
9390306 to
efd6f26
Compare
save_kinetics_lib appended "No rotors considered for this TS." whenever the word "rotors" was absent from the TS's long_thermo_description. A TS that Arkane modelled with a hindered rotor was therefore described as having none, and a description that merely mentioned rotors suppressed the note for a TS that had none. Decide it from rotors_dict instead, using the same success-is-truthy filter the Arkane adapter applies when it builds the model. Co-Authored-By: Claude <noreply@anthropic.com>
IRC endpoint species are diagnostic, not thermo/kinetics targets, and the normal flow never scans their rotors. They still carry a populated rotors_dict without a scan_path, so the restart loop spawned a scan per IRC rotor. Exclude them both as the restarted species and in the scan over all species. Co-Authored-By: Claude <noreply@anthropic.com>
efd6f26 to
fd69d1e
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The restart logic can misclassify queued or running pipe rotors as unstarted and submit duplicate standalone scans before existing pipe runs are restored and reconciled.
1 open issue
2 resolved since last review
Review effort: Balanced
On restart only rotors with success=False were respawned. A rotor with no result and no scan_path, such as one added to restart.yml by hand or determined after the previous session died, was silently never run and the species was reported as converged while missing a mode. A rotor queued or running in a pipe run carries that same state, and pipe runs are not restored on restart: the coordinator starts with no active pipes and is constructed after the restart loop, so has_pending_pipe_work() cannot see one. Such a rotor is therefore skipped unless its staged pipe task has reached a terminal state, which keeps the restart from submitting a standalone scan that duplicates a job still in the queue. Co-Authored-By: Claude <noreply@anthropic.com>
The restart loop in __init__ calls run_scan_jobs(), but the pipe planner is only constructed after that loop, so a restart with a rotor to spawn died with AttributeError. Pipe batching is an optimization; without a planner, scan each rotor individually. Co-Authored-By: Claude <noreply@anthropic.com>
run_ts_conformer_jobs() wipes job_dict['conf_opt'], which orphans any conf_opt name restored into running_jobs from a previous session. save_restart_dict() maps each such name back through job_dict and raised KeyError on the first one that was gone. The jobs are superseded by the conformers spawned right there, so stop tracking them. Co-Authored-By: Claude <noreply@anthropic.com>
A restored job may reference a species that no longer exists in the session, for example a TS adapter job carrying an auto-generated '<rxn>_TS' label. Restoring it raised KeyError and killed the run over one stale job; warn and skip it instead. Co-Authored-By: Claude <noreply@anthropic.com>
save_restart_dict() looked up every conf_opt, conf_sp and tsg name in running_jobs directly in job_dict and raised KeyError for a name with no entry, killing the run over one untracked job. Warn and leave it out of the restart file instead. Co-Authored-By: Claude <noreply@anthropic.com>
… job
When a recognized scheduler (OGE/SGE, Slurm, PBS, HTCondor) answered a
submission with nothing parsable on stdout, submit_job fell through to
ValueError('Unrecognized cluster software: ...'). That killed the whole ARC
process over one rejected job, and blamed the scheduler name rather than the
submission. Log stdout and stderr and return an errored job instead, so the
scheduler's troubleshooting decides whether to resubmit. A cluster software
ARC has no parser for still raises.
Co-Authored-By: Claude <noreply@anthropic.com>
…ts result PBS refuses qsub with "Maximum number of jobs already in queue" when a user is over the queue cap. Treat it like Slurm's AssocMaxSubmitJobLimit: wait five minutes and resubmit. Two defects in that retry path are fixed with it: the resubmission's result was discarded (the outer call parsed its own empty stdout), and a resubmission that was refused again could sleep and recurse again while the whole scheduler waited. Return the retry's (status, job ID), and give up as an errored job after the single retry. Co-Authored-By: Claude <noreply@anthropic.com>
autotst_script.py swallowed any exception from building or labeling the AutoTST reaction with a bare `return None`. The process exited 0 and wrote no output file, so ARC logged nothing and treated the adapter as having found no TS guess: a broken AutoTST setup looked like a chemical failure. Print the traceback to stderr and exit 1, so run_in_conda_env logs it and the adapter's return-code warning fires. Co-Authored-By: Claude <noreply@anthropic.com>
An RMG-Py source checkout on ARC's PYTHONPATH, compiled for arc_env's Python, shadows tst_env's installed rmgpy inside the AutoTST subprocess and breaks it. Pass strip_pythonpath=True to run_in_conda_env, as the KinBot adapter already does. AutoTST must then be importable from tst_env itself, via a .pth file or the activation hook that install_autotst.sh --conda writes; a clone that is only on PYTHONPATH through ~/.bashrc is no longer seen. Co-Authored-By: Claude <noreply@anthropic.com>
…ad of ~/.bashrc The AutoTST subprocess now runs without the caller's PYTHONPATH, so the bashrc PYTHONPATH line written by the default install mode no longer made AutoTST importable. Write autotst.pth into tst_env's site-packages after the environment exists, leave ~/.bashrc alone and note a leftover line. Co-Authored-By: Claude <noreply@anthropic.com>
fd69d1e to
5e760aa
Compare


Summary
Fixes found while running two reactions end to end (n-C3H7OO 1,5-H shift; CH3 + C2H6 H-abstraction) for the ARC methods paper. One commit per fix:
The Arkane fix in one line: a TS whose 21 cm⁻¹ imaginary torsion reached Arkane as 0.0 cm⁻¹ produced a harmonic partition function of ~1e9 and a rate coefficient 18× above the collision limit, which ARC wrote to the library as converged. The check reads Arkane's output, not ARC's input, because Arkane re-derives frequencies from the Hessian when rotors are present.
The PYTHONPATH strip keeps a source RMG-Py checkout on the caller's PYTHONPATH from shadowing tst_env's rmgpy. With it, the installer's default mode (a PYTHONPATH line appended to
~/.bashrc) would leave AutoTST unimportable, so the installer now writesautotst.pthinto tst_env's site-packages after the env is created, in both modes.--condahooks still survive:conda runfires activate.d after the strip (arc/job/env_run.py).Evidence
Every new test fails on
official/mainand passes here.official/main)HarmonicOscillator([0.0, 3.2, …])A = 5e20 s⁻¹rxn.kinetics is None, reason in TS descriptionrotors_dict = {0: {'success': True}}AttributeError: ... no attribute 'pipe_planner'rxn_label_TSKeyErrorKeyError: 5123456.pbs-serverValueError: Unrecognized cluster software: PBS('running', '123456')ValueError('errored', 0)after one sleepLSFValueErrorValueError(unchanged)strip_pythonpath=Truebash -nandshellcheckpass on the installer.write_pth_filewas run against a temporary directory, and the site-packages lookup was run against a real tst_env. The full installer was not run end to end.Under the default xdist run,
arkane_test.pyandplotter_test.pyfail intermittently onofficial/mainas well, because tests share directories. This PR does not address that.Merge Danger
Door: two-way
Each fix is its own commit and can be reverted alone.
Blast Radius: moderate
make install-autotstrerun to getautotst.pth. Until then AutoTST guesses fail loudly rather than silently.--condainstalls are unaffected.