Mutated conformer jobs issue - #817
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where conformer jobs for transition states would fail after TSGuess deduplication. When cluster_tsgs() removes duplicate TS guesses, it can shrink and reorder the ts_guesses list, causing index mismatches when trying to parse conformer job results.
Key changes:
- Uses
tsg.index(a persistent identifier) instead of enumeration indices when spawning conformer jobs - Adds logic to ensure all TSGuess objects have an index assigned before job submission
- Updates
parse_conformerto look up TSGuess objects by theirconformer_indexfield instead of assuming positional correspondence
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #817 +/- ##
==========================================
- Coverage 63.50% 63.48% -0.03%
==========================================
Files 114 114
Lines 38325 38333 +8
Branches 10030 10030
==========================================
- Hits 24340 24334 -6
- Misses 11073 11084 +11
- Partials 2912 2915 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| return False | ||
| tsg.energy = energy | ||
| tsg.opt_xyz = xyz | ||
| tsg.index = i |
There was a problem hiding this comment.
please squash this into the prev commit
f70561e to
f4f285a
Compare
…sition successful_tsgs is the deduplicated (shrunken and reordered) list of guesses, but its enumerate position was also used to index the full ts_guesses list when writing back the optimized energy and geometry. The two lists differ after deduplication, so results were attached to the wrong TSGuess, and reassigning .index overwrote the guess's identity. Look the guess up by conformer_index instead, and warn rather than mis-assign when no match is found.
ARCSpecies.chosen_ts stores a TSGuess.index (an identity assigned when the guess is appended to the species), while TSGuess.conformer_index is the position of the guess among the *successful* guesses (the conformer optimization job index). check_negative_freq() matched the chosen TS guess by conformer_index, and additionally relied on the loop variable leaking out of the for loop, so a no-match left 'tsg' bound to the last guess rather than to None. Since check_imaginary_frequencies(None) returns True by design (a guess whose freqs were not computed yet must not be disqualified during pre-screening), a TS with zero, two or three imaginary frequencies could be accepted as converged while the real frequencies were never recorded. Match by TSGuess.index via a new get_chosen_tsg() helper, and treat a no-match as an unverified frequency check: log a warning naming the label, chosen_ts and the available indices, and look for a different TS conformer instead of silently accepting the geometry. Also drop the same identity clobber in the pipe ts_opt ingestion, which overwrote TSGuess.index with the conformer index. (cherry picked from commit 56d2c03)
It appears when there are many conf opts for a TS and then deduplicated due to similarity, the successful_tsgs was nto made aware of the deduplicaiton (which collapses duplicates and shirnks/reorders). So when ARC finishes conf_opt and tries to write results using hte old integers, it would report out of range and fail.