Skip to content

Fix switch_ts resetting rotors convergence flag and stale rotors_dict#870

Merged
calvinp0 merged 1 commit intomainfrom
switch_ts_rotors_reset
Apr 16, 2026
Merged

Fix switch_ts resetting rotors convergence flag and stale rotors_dict#870
calvinp0 merged 1 commit intomainfrom
switch_ts_rotors_reset

Conversation

@calvinp0
Copy link
Copy Markdown
Member

delete_all_species_jobs blanket-set all output job_types to False, including rotors and bde which are initialised to True by initialize_output_dict. For species with no torsional modes (e.g. cyclic TS from THF), no scan jobs are ever spawned, so rotors stays False and check_all_done incorrectly marks the TS as unconverged — even when opt, freq, sp, and IRC all passed.

Additionally, switch_ts did not reset rotors_dict, so determine_rotors was never re-called for the new TS geometry and stale scan results from the previous guess carried over.

Changes:

  • Preserve the True default for rotors/bde in delete_all_species_jobs, matching initialize_output_dict.
  • Reset rotors_dict and number_of_rotors in switch_ts when job_types['rotors'] is enabled, so the new geometry gets fresh rotor detection.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes TS convergence and rotor re-determination behavior in ARC’s Scheduler when switching TS guesses, ensuring TSs without torsions aren’t incorrectly marked unconverged and preventing stale rotor scan state from carrying across TS guesses.

Changes:

  • In switch_ts(), reset rotors_dict / number_of_rotors so rotors are re-determined for the new TS geometry.
  • In delete_all_species_jobs(), preserve the True defaults for rotors and bde in output[label]['job_types'] to avoid false “unconverged” status when no scans/BDE targets exist.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread arc/scheduler.py Outdated
Comment thread arc/scheduler.py Outdated
Comment thread arc/scheduler.py
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.42%. Comparing base (05099fc) to head (0942b37).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #870      +/-   ##
==========================================
- Coverage   60.46%   60.42%   -0.05%     
==========================================
  Files         102      102              
  Lines       31097    31102       +5     
  Branches     8102     8104       +2     
==========================================
- Hits        18804    18792      -12     
- Misses       9955     9967      +12     
- Partials     2338     2343       +5     
Flag Coverage Δ
functionaltests 60.42% <ø> (-0.05%) ⬇️
unittests 60.42% <ø> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@calvinp0 calvinp0 force-pushed the switch_ts_rotors_reset branch from 8fd4f32 to 0942b37 Compare April 15, 2026 08:53
delete_all_species_jobs blanket-set all output job_types to False,
including rotors and bde which are initialised to True by
initialize_output_dict.  For species with no torsional modes (e.g.
cyclic TS from THF), no scan jobs are ever spawned, so rotors stays
False and check_all_done incorrectly marks the TS as unconverged —
even when opt, freq, sp, and IRC all passed.

Additionally, switch_ts did not reset rotors_dict, so
determine_rotors was never re-called for the new TS geometry and
stale scan results from the previous guess carried over.

Changes:
- Preserve the True default for rotors/bde in delete_all_species_jobs,
  matching initialize_output_dict.
- Reset rotors_dict and number_of_rotors in switch_ts when
  job_types['rotors'] is enabled, so the new geometry gets fresh
  rotor detection.
Copy link
Copy Markdown
Contributor

@Lilachn91 Lilachn91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks :)

@calvinp0 calvinp0 merged commit 70dab25 into main Apr 16, 2026
8 checks passed
@calvinp0 calvinp0 deleted the switch_ts_rotors_reset branch April 16, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants