Repository navigation
Conversation
alongd
commented
Apr 1, 2026
- New module arc/species/nd_scan.py: Extracts ND scan logic from scheduler.py into a dedicated subsystem with clean interfaces for grid generation, continuous scan state, adaptive sparse 2D sampling, surface validation, coupling metrics, and rotor classification
- Adaptive sparse 2D scans: For eligible brute_force_sp/brute_force_opt 2D rotors, ARC can now run batched adaptive sampling instead of the full Cartesian grid, controlled by a sampling_policy field on the rotor — no new directed_scan_type values are introduced
- Surface validation: Neighbor-edge continuity checks, periodic boundary consistency, and branch-jump detection diagnose PES discontinuities without blocking finalization
- Coupling analysis and classification: Separable-fit residual analysis classifies each adaptive 2D rotor as separable, coupled, or unreliable with an explicit recommended action
- Sparse-aware 2D plotting: plot_2d_rotor_scan dispatches to an interpolation-based sparse contour path for adaptive scans, with sampled/failed/invalid point overlays
- xTB directed_scan fix: The xTB adapter now correctly runs --opt for brute_force_opt directed scan jobs (was silently running SP)
- Bug fix: Corrected parse_e_elect(path=...) → parse_e_elect(log_file_path=...) kwarg in check_directed_scan_job
There was a problem hiding this comment.
Pull request overview
Refactors ARC’s N-dimensional (ND) directed-rotor scan logic into a dedicated arc/species/nd_scan.py subsystem, adds an adaptive sparse 2D sampling path with surface validation + coupling classification, and updates the scheduler/plotter/xTB adapter to support the new flow.
Changes:
- Extracted ND scan utilities from
scheduler.pyintoarc/species/nd_scan.pyand updated scheduler call sites accordingly. - Added adaptive sparse 2D scan execution (batch selection, bookkeeping, surface validation, coupling metrics, and rotor classification) with new unit/functional tests.
- Updated 2D plotting to support sparse/adaptive scans via interpolation-based contours with overlays; fixed xTB directed-scan opt behavior.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
arc/species/nd_scan.py |
New ND scan subsystem incl. adaptive sparse 2D sampling, validation, coupling metrics, and classification. |
arc/species/nd_scan_test.py |
Unit tests covering dense/continuous helpers and the new adaptive/validation/classification logic. |
arc/scheduler.py |
Integrates nd_scan helpers; adds adaptive batch spawning and refactors directed-scan finalization/recording. |
arc/scheduler_test.py |
Functional xTB-backed tests for dense + adaptive 2D directed scans. |
arc/plotter.py |
Adds sparse/adaptive 2D plotting path (interpolation + overlays) and dispatch logic. |
arc/plotter_test.py |
Tests for sparse plotting helpers and interpolation behavior. |
arc/job/adapters/xtb_adapter.py |
Ensures --opt is used for directed_scan jobs whose directed-scan type implies optimization. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #855 +/- ##
==========================================
+ Coverage 67.19% 67.70% +0.50%
==========================================
Files 123 124 +1
Lines 43674 44511 +837
Branches 11153 11307 +154
==========================================
+ Hits 29348 30135 +787
+ Misses 11189 11149 -40
- Partials 3137 3227 +90
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7848a8e to
e8f8a8f
Compare
|
I rebased this branch onto current Conflict resolution note (for the author)At
The resolution in Two latent bugs on
|
Contains pure scan-surface helpers
Scheduler.__init__ calls run_scan_jobs() from its per-species restart loop,
and run_scan_jobs dereferences self.pipe_planner via try_pipe_rotor_scans_1d().
The planner was constructed after that loop, so restarting a project with
pending 1D rotor scans raised:
AttributeError: 'Scheduler' object has no attribute 'pipe_planner'
Construction now happens before the restart loop. Both PipeCoordinator and
PipePlanner only store references in __init__, so early construction is safe.
This is a latent bug on main (main:464/487/511 call run_scan_jobs; main:521
assigns pipe_planner); it was surfaced by the ND scan functional tests, which
are the first tests to exercise that construction path.