Run CCS/VTZ for [H] instead of more complex WF methods#790
Conversation
b7372ed to
982dffc
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR implements automatic fallback to CCSD/VTZ for hydrogen atoms when DLPNO methods are requested. The motivation is that DLPNO-CCSD(T) methods, while efficient for larger molecules, cannot handle the hydrogen radical [H] which has only one electron and lacks the electron pairs required for DLPNO correlation spaces.
- Adds logic to detect hydrogen atoms and automatically use CCSD/VTZ instead of DLPNO methods
- Improves error messages and code robustness with minor fixes
- Removes unreachable code in SSH job status checking
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| arc/scheduler.py | Implements hydrogen detection logic and DLPNO method fallback to CCSD/VTZ |
| arc/species/species.py | Adds atom count check in isomorphism comparison and improves error message |
| arc/main.py | Improves error message clarity for invalid reaction inputs |
| arc/job/ssh.py | Removes unreachable code after return statement |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| i = 5 | ||
| while i and not os.path.isfile(job.local_path_to_output_file): | ||
| i -= 1 | ||
| time.sleep(10) |
There was a problem hiding this comment.
The retry logic uses a magic number (5 retries, 10 second sleep). Consider extracting these as named constants or configuration parameters to improve maintainability.
| i = 5 | |
| while i and not os.path.isfile(job.local_path_to_output_file): | |
| i -= 1 | |
| time.sleep(10) | |
| i = RETRY_COUNT | |
| while i and not os.path.isfile(job.local_path_to_output_file): | |
| i -= 1 | |
| time.sleep(RETRY_SLEEP_SECONDS) |
There was a problem hiding this comment.
Pull Request Overview
This PR implements a fallback mechanism for computing hydrogen radical ([H]) energies when DLPNO-based methods are requested. DLPNO-CCSD(T) methods cannot be applied to single-electron systems like hydrogen radicals, so the code now automatically switches to a simpler CCSD/VTZ method for these cases.
- Adds hydrogen radical detection and method switching in single-point energy calculations
- Includes minor code quality improvements (error message clarification, defensive programming)
- Removes unreachable code in SSH job status checking
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| arc/scheduler.py | Implements H radical detection and automatic method switching from DLPNO to CCSD/VTZ, adds retry logic for output file checking |
| arc/species/species.py | Adds atom count check for isomorphism comparison optimization |
| arc/main.py | Improves error message clarity for invalid reaction input |
| arc/job/ssh.py | Removes unreachable code after return statement |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Methods such as
DLPNO-CCSD(T)which is frequenctly used for kinetics due to it's efficiency and relatively good accuracy cannot be applied for[H]. This method relies on electron pairs for defining correlation spaces, and the H radical has only one electron.Therefore, reactions such as
RH + H <=> R + H2cannot be computed using this method. However, since the energy of H is relatively simple, it is "known" percisely or can be computed using another Coupled-Cluster method without the DLPNO (Domain-based Local Pair Natural Orbital) assumption. This PR runs a simple and quick CC job for H if a DLPNO method was requested for it.