Fix ORCA CABS/F12 input generation and keyword duplication#872
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves ORCA job handling in ARC by addressing F12/CABS input generation, avoiding duplicated ORCA keywords, and refining DLPNO handling for single-electron monoatomic species.
Changes:
- Update ORCA input template to support a dedicated CABS basis field and add validation for F12 levels.
- Add ORCA troubleshooting support for UHF + F12-CC by retrying with
/RI. - Refine DLPNO monoatomic handling so only H/D/T fall back to HF (instead of all monoatomics).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
arc/scheduler.py |
Adjust DLPNO monoatomic fallback logic to target single-electron atoms only. |
arc/job/trsh.py |
Detect ORCA UHF F12-CC failure mode and retry with /ri; update DLPNO monoatomic trsh guard accordingly. |
arc/job/adapters/orca.py |
Add CABS support in ORCA input generation and reduce keyword duplication via setdefault. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -264,6 +271,7 @@ def write_input_file(self) -> None: | |||
| input_dict[key] = '' | |||
| input_dict['auxiliary_basis'] = _format_orca_basis(self.level.auxiliary_basis or '') | |||
| input_dict['basis'] = _format_orca_basis(self.level.basis or '') | |||
| input_dict['cabs'] = f' {_format_orca_basis(self.level.cabs)}' if self.level.cabs else '' | |||
7d8da9e to
1ec22f3
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #872 +/- ##
==========================================
- Coverage 60.48% 60.39% -0.10%
==========================================
Files 102 102
Lines 31102 31099 -3
Branches 8104 8103 -1
==========================================
- Hits 18813 18781 -32
- Misses 9952 9972 +20
- Partials 2337 2346 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Introduces the `cabs` argument as the single source of truth for the Complementary Auxiliary Basis Set in ORCA. Previously, users had to pack CABS into the `auxiliary_basis` string. This change adds a dedicated field and implements a validation guard: if an F12 method is specified without a CABS basis, the adapter now raises a ValueError. This prevents ORCA from silently falling back to non-F12 energies (DimCABS = 0). Also refactors the ORCA adapter to use `setdefault` for handling keyword defaults and updates documentation to reflect the new level specification format.
231f086 to
c99d254
Compare
Restricts the HF fallback for DLPNO methods to single-electron atoms (H, D, T) only. Heavier monoatomic species like O or N can be handled by DLPNO in ORCA and no longer have the "dlpno-" prefix stripped. Additionally, the HF fallback now preserves Level attributes like CABS and auxiliary basis sets by using the `as_dict()` representation, ensuring consistency with recent ORCA F12 enhancements.
Restricts the DLPNO incompatibility check in ORCA to single-electron species only, as heavier monoatomic species are supported. Additionally, updates the test suite to reflect the transition of the CABS basis from the auxiliary basis string to its own dedicated attribute.
This pull request improves the handling of complementary auxiliary basis sets (CABS) for F12 calculations in ORCA jobs. It introduces a dedicated
cabsfield for specifying the CABS basis, ensures that F12 methods require a CABS basis, and updates documentation and tests to reflect these changes. The logic for handling monoatomic species with DLPNO methods is also clarified and tested.Improvements to ORCA F12/CABS handling:
cabsfield to the level specification for F12 calculations, ensuring that CABS is not packed intoauxiliary_basisand is correctly included in the ORCA input template. [1] [2]Test and documentation updates:
cabsfield. [1] [2] [3] [4]DLPNO/monoatomic handling: