Skip to content

Add grepper fallback for output get_final_energy, get_gradient, and get_structure#237

Merged
haneug merged 9 commits into
faccts:mainfrom
haneug:feature.output_fallback
Jun 1, 2026
Merged

Add grepper fallback for output get_final_energy, get_gradient, and get_structure#237
haneug merged 9 commits into
faccts:mainfrom
haneug:feature.output_fallback

Conversation

@haneug

@haneug haneug commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Closes Issues

Closes None

Description

  • get_final_energy, get_structure, get_gradient, get_charge, and get_mult now fall back to parsing the plain-text .out file when no property JSON is available. The fallback is on by default and can be disabled with the keyword argument fallback=False.

  • This covers external methods like GFN-FF that write a property JSON with no geometry entries. A new example demonstrates the pattern with a GFN-FF geometry optimization.

  • A new nox session out_gen regenerates the committed .out fixture from a real ORCA run, stripping all system-specific content.


Release Notes

Added

haneug added 2 commits April 28, 2026 16:35
get_final_energy, get_structure, get_gradient, get_charge, and get_mult
now fall back to parsing the plain-text .out file when no property JSON
is available. The fallback is on by default and can be disabled with
fallback=False.

This covers external methods like GFN-FF that write a property JSON
with no geometry entries. A new example (exmp054) demonstrates the
pattern with a GFN-FF geometry optimisation.

A new nox session out_gen regenerates the committed .out fixture from
a real ORCA run, stripping all system-specific content.
@haneug haneug self-assigned this Apr 30, 2026
@haneug haneug requested a review from a team as a code owner April 30, 2026 10:29
@haneug haneug added enhancement New feature or request side output Concerning parsing ORCA output labels Apr 30, 2026

@timmyte timmyte left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Solid work.
And thanks for adding extensive tests.

Just make sure to put code in the PR description into mono-space font.

Comment thread src/opi/output/core.py
Comment thread src/opi/output/core.py
Comment thread tests/conftest.py Outdated
Comment thread tests/conftest.py Outdated
Comment thread tests/conftest.py Outdated
Comment thread tests/README.md Outdated
Comment thread tests/README.md Outdated
Comment thread examples/exmp054_gfnff_fallback/job.py Outdated
Comment thread examples/exmp054_gfnff_fallback/job.py Outdated
Comment thread tests/conftest.py
@haneug haneug requested a review from timmyte May 26, 2026 10:07
@haneug haneug merged commit c548b26 into faccts:main Jun 1, 2026
6 checks passed
@haneug haneug deleted the feature.output_fallback branch June 1, 2026 11:25
@haneug haneug mentioned this pull request Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request side output Concerning parsing ORCA output

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants