Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid crushing when can't trsh scan #763

Merged
merged 2 commits into from
Aug 19, 2024
Merged

Conversation

alongd
Copy link
Member

@alongd alongd commented Aug 18, 2024

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.

@alongd alongd requested a review from NellyMitnik August 18, 2024 07:16
@github-actions github-actions bot added the Module: trsh Troubleshooting label Aug 18, 2024
Copy link

codecov bot commented Aug 18, 2024

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 ⚠️
Additional details and impacted files
@@            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 Coverage Δ
unittests 73.96% <83.33%> (-0.01%) ⬇️

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

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

Copy link
Contributor

@NellyMitnik NellyMitnik left a comment

Choose a reason for hiding this comment

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

I ran a species that caused ARC to crush for the corresponding error. With this fix, it converged successfully.

    multiplicity 2
    1  O u0 p2 c0 {5,S} {12,S}
    2  O u1 p2 c0 {6,S}
    3  C u0 p0 c0 {4,S} {6,D} {8,S}
    4  C u0 p0 c0 {3,S} {7,D} {9,S}
    5  C u0 p0 c0 {1,S} {7,D} {10,S}
    6  C u0 p0 c0 {2,S} {3,D} {11,S}
    7  C u0 p0 c0 {4,D} {5,D}
    8  H u0 p0 c0 {3,S}
    9  H u0 p0 c0 {4,S}
    10 H u0 p0 c0 {5,S}
    11 H u0 p0 c0 {6,S}
    12 H u0 p0 c0 {1,S}
  label: C5H5O2(505)

@NellyMitnik NellyMitnik merged commit 8ba45be into main Aug 19, 2024
8 checks passed
@NellyMitnik NellyMitnik deleted the fix_crush_in_trsh_quality_scan branch August 19, 2024 08:29
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