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

Catch divide-by-zero error in energy_ratio.py #29

Merged
merged 3 commits into from
Mar 15, 2024

Conversation

amorehead
Copy link
Contributor

  • Catches a rare "divide-by-zero" error in energy_ratio.py.

@maabuu
Copy link
Owner

maabuu commented Mar 14, 2024

Thank you for the PR. Could you add a unit test for when this used to fail? Alternatively if you share examples for molecules where this was a problem, I'll add it. I am curious if there are examples other than single atom molecules.

@amorehead
Copy link
Contributor Author

amorehead commented Mar 14, 2024

Hi, @maabuu. Attached is the batch of input complexes I tried providing to PoseBusters using the redock config. I have been trying to evaluate all 106 of these inputs for around 24 hours, and the bust_table pipeline still seems to be running.

Code for running PoseBusters on these inputs:

buster = PoseBusters(
    config="redock", top_n=None
)
bust_results = buster.bust_table(mol_table, full_report=True)

PoseBusters_Frozen_Bug_Inputs.zip

@maabuu maabuu changed the base branch from main to energy_ratio_bug March 15, 2024 09:57
@maabuu maabuu merged commit 7dce482 into maabuu:energy_ratio_bug Mar 15, 2024
16 checks passed
@maabuu maabuu mentioned this pull request Mar 15, 2024
maabuu added a commit that referenced this pull request Mar 15, 2024
* Catch divide-by-zero error in `energy_ratio.py` (#29)
* Update version

---------

Co-authored-by: Alex Morehead <[email protected]>
@maabuu
Copy link
Owner

maabuu commented Mar 15, 2024

Release v0.2.11 now includes this fix. This handles molecules where the UFF returns 0 for the energy. This was a problem for molecules that only contains atoms and no bonds.

@amorehead amorehead deleted the patch-1 branch March 15, 2024 15:34
@amorehead
Copy link
Contributor Author

Update: the ZIP archive of input examples I previously uploaded was erroneously not segmented into individual molecular fragments. I have attached below the corrected version of these inputs as a new ZIP archive.
PoseBusters_Large_Examples.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants