uw-ipd / tmol

TMol
Apache License 2.0
31 stars 3 forks source link

Fix score function factory behavior for hbonds #265

Closed aleaverfay closed 1 year ago

aleaverfay commented 1 year ago

Just an absolutely egregious copy-and-paste error: the logic for activating a score did not previously check to make sure that the EnergyTerm that gets activated is the one actually responsible for calculating energies for the score-type whose weight is being set. So I am adding that assertion statement as well.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (a43aa2f) 95.18% compared to head (3d2107b) 95.19%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #265 +/- ## ======================================= Coverage 95.18% 95.19% ======================================= Files 331 331 Lines 20500 20508 +8 ======================================= + Hits 19513 19522 +9 + Misses 987 986 -1 ``` | Flag | Coverage Δ | | |---|---|---| | _shrug_Testing_CPU | `89.79% <100.00%> (+<0.01%)` | :arrow_up: | | _shrug_Testing_CPU_w_o_jit | `91.72% <100.00%> (+<0.01%)` | :arrow_up: | | _shrug_Testing_CUDA | `92.40% <100.00%> (+<0.01%)` | :arrow_up: | 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=uw-ipd#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files Changed](https://app.codecov.io/gh/uw-ipd/tmol/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uw-ipd) | Coverage Δ | | |---|---|---| | [tmol/score/score\_function.py](https://app.codecov.io/gh/uw-ipd/tmol/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uw-ipd#diff-dG1vbC9zY29yZS9zY29yZV9mdW5jdGlvbi5weQ==) | `81.25% <100.00%> (+0.14%)` | :arrow_up: | | [tmol/score/terms/hbond\_creator.py](https://app.codecov.io/gh/uw-ipd/tmol/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uw-ipd#diff-dG1vbC9zY29yZS90ZXJtcy9oYm9uZF9jcmVhdG9yLnB5) | `100.00% <100.00%> (ø)` | | | [tmol/tests/score/hbond/test\_hbond\_energy\_term.py](https://app.codecov.io/gh/uw-ipd/tmol/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uw-ipd#diff-dG1vbC90ZXN0cy9zY29yZS9oYm9uZC90ZXN0X2hib25kX2VuZXJneV90ZXJtLnB5) | `100.00% <100.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/uw-ipd/tmol/pull/265/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uw-ipd)

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