ReactionMechanismGenerator / ARC

ARC - Automatic Rate Calculator
https://reactionmechanismgenerator.github.io/ARC/index.html
MIT License
43 stars 22 forks source link

Avoid crushing when can't trsh scan #763

Closed alongd closed 3 months ago

alongd commented 3 months ago

In trsh scan_quality_check(), ARC checks broken bond and any lowest conformation, excluding those with broken bonds. Ths is step 1.2 in the function. Here we make a minor fix to a KeyError in the line actions = {'change conformer': conf_xyzs[min_index]}, and now we only call conf_xyzs[min_index] if the length of the list and the index value makes sense.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 73.96%. Comparing base (8665b73) to head (82f6c48). Report is 3 commits behind head on main.

Files Patch % Lines
arc/job/trsh.py 83.33% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #763 +/- ## ========================================== - Coverage 73.96% 73.96% -0.01% ========================================== Files 101 101 Lines 27776 27777 +1 Branches 5816 5817 +1 ========================================== Hits 20544 20544 Misses 5773 5773 - Partials 1459 1460 +1 ``` | [Flag](https://app.codecov.io/gh/ReactionMechanismGenerator/ARC/pull/763/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ReactionMechanismGenerator) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/ReactionMechanismGenerator/ARC/pull/763/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ReactionMechanismGenerator) | `73.96% <83.33%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ReactionMechanismGenerator#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.