Skip to content

Run CCS/VTZ for [H] instead of more complex WF methods#790

Merged
OfirSimhi1612 merged 5 commits into
mainfrom
H_wf
Aug 26, 2025
Merged

Run CCS/VTZ for [H] instead of more complex WF methods#790
OfirSimhi1612 merged 5 commits into
mainfrom
H_wf

Conversation

@alongd
Copy link
Copy Markdown
Member

@alongd alongd commented May 24, 2025

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 + H2 cannot 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.

OfirSimhi1612
OfirSimhi1612 previously approved these changes Aug 25, 2025
Copy link
Copy Markdown
Contributor

@OfirSimhi1612 OfirSimhi1612 left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment thread arc/job/ssh.py Outdated

This comment was marked as outdated.

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

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.

Comment thread arc/scheduler.py Outdated
Comment on lines +992 to +995
i = 5
while i and not os.path.isfile(job.local_path_to_output_file):
i -= 1
time.sleep(10)
Copy link

Copilot AI Aug 25, 2025

Choose a reason for hiding this comment

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

The retry logic uses a magic number (5 retries, 10 second sleep). Consider extracting these as named constants or configuration parameters to improve maintainability.

Suggested change
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)

Copilot uses AI. Check for mistakes.

This comment was marked as outdated.

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

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.

Comment thread arc/scheduler.py
Comment thread arc/scheduler.py
Copy link
Copy Markdown
Contributor

@OfirSimhi1612 OfirSimhi1612 left a comment

Choose a reason for hiding this comment

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

LGTM

@OfirSimhi1612 OfirSimhi1612 merged commit 112c267 into main Aug 26, 2025
6 checks passed
@OfirSimhi1612 OfirSimhi1612 deleted the H_wf branch August 26, 2025 17:42
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