Avoid parsing active space when wavefunctions are used without proceeding to MRCI in molpro#830
Open
Avoid parsing active space when wavefunctions are used without proceeding to MRCI in molpro#830
Conversation
…ding to MRCI in molpro
There was a problem hiding this comment.
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_spaceto returnNoneinstead of raising an exception when the output file is not from Molpro - Added a condition in
post_sp_actionsto 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.
calvinp0
requested changes
Feb 4, 2026
Member
calvinp0
left a comment
There was a problem hiding this comment.
Looks great, just remove the commented out input Error code and then it's good to go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.