Skip to content

fix(orca): implement NMD parsing, guard trsh against None - #1026

Merged
Mia1Gohary merged 4 commits into
mainfrom
orca-nmd-fix
Sep 1, 2026
Merged

fix(orca): implement NMD parsing, guard trsh against None#1026
Mia1Gohary merged 4 commits into
mainfrom
orca-nmd-fix

Conversation

@Mia1Gohary

Copy link
Copy Markdown
Contributor

Orca's parse_normal_mode_displacement() was a stub returning (None, None). trsh_negative_freq() then called len(None) on any species with a genuine imaginary frequency, crashing the whole ARC process instead of nudging the geometry and re-optimizing.

Implement real parsing of Orca's VIBRATIONAL FREQUENCIES / NORMAL MODES blocks, and add a defensive None check in trsh.py so any adapter lacking this capability degrades gracefully instead of crashing.

Validated against CR_1's r1 freq job on zeus: correctly identified and parsed the -33.01 cm^-1 imaginary mode; live run confirmed freq troubleshooting completes (freq: True) where it previously crashed.

@Mia1Gohary
Mia1Gohary requested a review from alongd August 26, 2026 10:07
@github-actions github-actions Bot added the Module: trsh Troubleshooting label Aug 26, 2026
@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.55%. Comparing base (c5e700b) to head (2aad076).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1026      +/-   ##
==========================================
- Coverage   65.55%   65.55%   -0.01%     
==========================================
  Files         120      120              
  Lines       40468    40516      +48     
  Branches    10430    10441      +11     
==========================================
+ Hits        26529    26559      +30     
- Misses      10934    10952      +18     
  Partials     3005     3005              
Flag Coverage Δ
functionaltests 65.55% <ø> (-0.01%) ⬇️
unittests 65.55% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Mia1Gohary
Mia1Gohary force-pushed the orca-nmd-fix branch 3 times, most recently from a77d920 to 14dca8a Compare August 26, 2026 15:25
Comment thread arc/parser/adapters/orca.py Outdated
Comment thread arc/parser/parser_test.py
@calvinp0

Copy link
Copy Markdown
Member

It's looking good @Mia1Gohary , just two comments for fixing!

Orca's parse_normal_mode_displacement() was a stub returning (None, None).
trsh_negative_freq() then called len(None) on any species with a genuine
imaginary frequency, crashing the whole ARC process instead of nudging the
geometry and re-optimizing.

Implement real parsing of Orca's VIBRATIONAL FREQUENCIES / NORMAL MODES
blocks, and add a defensive None check in trsh.py so any adapter lacking
this capability degrades gracefully instead of crashing.

Validated against CR_1's r1 freq job on zeus: correctly identified and
parsed the -33.01 cm^-1 imaginary mode; live run confirmed freq
troubleshooting completes (freq: True) where it previously crashed.
  Reuse the Orca frequency parser when reading normal mode
  displacements, while retaining zero.
  Move the n-cetane checks into a dedicated test and verify that
  frequencies remain aligned with Cartesian displacement vectors.
Comment thread arc/parser/adapters/orca.py
@Mia1Gohary
Mia1Gohary requested a review from calvinp0 September 1, 2026 12:21
calvinp0
calvinp0 previously approved these changes Sep 1, 2026

@calvinp0 calvinp0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm! thanks @Mia1Gohary

Comment thread arc/parser/parser_test.py
Comment thread arc/job/trsh_test.py
Comment thread arc/checks/nmd_test.py
Return no normal modes when an Orca output ends inside the normal-mode matrix or contains an incomplete row. Add regression coverage for truncation, successful Orca parsing and troubleshooting, and supported Orca outputs without a normal-mode block.
@Mia1Gohary
Mia1Gohary merged commit 54d7e8e into main Sep 1, 2026
8 checks passed
@Mia1Gohary
Mia1Gohary deleted the orca-nmd-fix branch September 1, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module: trsh Troubleshooting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants