Skip to content

Avoid parsing active space when wavefunctions are used without proceeding to MRCI in molpro#830

Open
Lilachn91 wants to merge 2 commits intomainfrom
wf_wo_mrci
Open

Avoid parsing active space when wavefunctions are used without proceeding to MRCI in molpro#830
Lilachn91 wants to merge 2 commits intomainfrom
wf_wo_mrci

Conversation

@Lilachn91
Copy link
Contributor

Parsing active space is needed before running an MRCI job in molpro. For a method type labeled as wavefunction (CC), ARC tries to run parse_active_space, but stops the whole job if SP was not in molpro.
Fixed to allow using wavefunctions without MRCI.

@Lilachn91 Lilachn91 requested review from alongd and calvinp0 and removed request for alongd and calvinp0 February 4, 2026 15:10
@Lilachn91 Lilachn91 marked this pull request as ready for review February 4, 2026 15:16
@Lilachn91 Lilachn91 requested review from alongd and calvinp0 February 4, 2026 15:22
@calvinp0 calvinp0 requested a review from Copilot February 4, 2026 15:35
Copy link

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 fixes an issue where ARC would crash when running wavefunction methods (e.g., CCSD) using software other than Molpro. Active space parsing is only needed for MRCI jobs in Molpro, but the code was attempting to parse it for all wavefunction methods, causing failures when the output file wasn't from Molpro.

Changes:

  • Modified parse_active_space to return None instead of raising an exception when the output file is not from Molpro
  • Added a condition in post_sp_actions to only attempt active space parsing when it hasn't been set yet

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
arc/scheduler.py Added condition to check if active space is None before parsing, avoiding redundant parsing and preventing errors
arc/parser/parser.py Changed error handling to return None for non-Molpro files instead of raising InputError, allowing graceful handling of unsupported formats

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

Copy link
Member

@calvinp0 calvinp0 left a comment

Choose a reason for hiding this comment

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

Looks great, just remove the commented out input Error code and then it's good to go

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.

2 participants