uw-ipd / tmol

TMol
Apache License 2.0
30 stars 3 forks source link

Aleaverfay/fix dun score termini #268

Closed aleaverfay closed 11 months ago

aleaverfay commented 1 year ago

There were two problems previously that kept the dunbrack scoring machinery from properly evaluating the energies for terminal residues:

  1. The code was using the sentinel value "-1" to represent too many things: in one step, that an atom defining a certain chi dihedral was not resolvable because, e.g., that atom would need to live inside residue i-1 for the very first residue or inside residue i+1 for the last residue; in another step, -1 represented that a residue did not exist or was not described by the dunbrack library (e.g. ALA or a ligand). The code was written to intercept the first case to define phi as the neutral -60 and psi as the neutral +60, but it never got the chance because the second case caused the residues to be skipped over entirely.
  2. The code was trying to decide how to handle residue types based on their full names as opposed to their base names, so MET:nterm was being treaded as if it was not a residue type that Dunbrack had anything to say about (akin to ALA or a ligand)

The code now evaluates properly for the n-term of 1ubq

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 97.56% and no project coverage change.

Comparison is base (8e07030) 95.18% compared to head (1851b07) 95.18%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #268 +/- ## ======================================= Coverage 95.18% 95.18% ======================================= Files 336 336 Lines 21102 21132 +30 ======================================= + Hits 20086 20115 +29 - Misses 1016 1017 +1 ``` | [Flag](https://app.codecov.io/gh/uw-ipd/tmol/pull/268/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uw-ipd) | Coverage Δ | | |---|---|---| | [_shrug_Testing_CPU](https://app.codecov.io/gh/uw-ipd/tmol/pull/268/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uw-ipd) | `89.95% <97.56%> (+<0.01%)` | :arrow_up: | | [_shrug_Testing_CPU_w_o_jit](https://app.codecov.io/gh/uw-ipd/tmol/pull/268/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uw-ipd) | `91.81% <97.56%> (+<0.01%)` | :arrow_up: | | [_shrug_Testing_CUDA](https://app.codecov.io/gh/uw-ipd/tmol/pull/268/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uw-ipd) | `92.47% <97.56%> (+<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/268?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uw-ipd) | Coverage Δ | | |---|---|---| | [tmol/tests/score/dunbrack/test\_baseline.py](https://app.codecov.io/gh/uw-ipd/tmol/pull/268?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uw-ipd#diff-dG1vbC90ZXN0cy9zY29yZS9kdW5icmFjay90ZXN0X2Jhc2VsaW5lLnB5) | `100.00% <ø> (ø)` | | | [tmol/score/modules/dunbrack.py](https://app.codecov.io/gh/uw-ipd/tmol/pull/268?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uw-ipd#diff-dG1vbC9zY29yZS9tb2R1bGVzL2R1bmJyYWNrLnB5) | `99.19% <95.23%> (-0.81%)` | :arrow_down: | | [tmol/score/dunbrack/params.py](https://app.codecov.io/gh/uw-ipd/tmol/pull/268?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uw-ipd#diff-dG1vbC9zY29yZS9kdW5icmFjay9wYXJhbXMucHk=) | `100.00% <100.00%> (ø)` | | | [tmol/tests/score/modules/test\_dunbrack.py](https://app.codecov.io/gh/uw-ipd/tmol/pull/268?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uw-ipd#diff-dG1vbC90ZXN0cy9zY29yZS9tb2R1bGVzL3Rlc3RfZHVuYnJhY2sucHk=) | `100.00% <100.00%> (ø)` | |

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

aleaverfay commented 11 months ago

There's no need to fix the version we are about to axe