Add SAXS scoring module
You are about to submit a new Pull Request. Before continuing make sure you read the contributing guidelines and you comply with the following criteria:
- [x] You have stick to Python. Talk with us before adding other programming languages to HADDOCK3
- [ ] Your PR is about CNS
- [x] Your code is well documented: proper docstrings and explanatory comments for those tricky parts
- [x] You structured the code into small functions as much as possible. You can use classes if there's a (state) purpose
- [x] code follows our coding style
- [ ] You wrote tests for the new code
- [x]
toxtests pass. Runtoxcommand inside the repository folder - [x]
-test.cfgexamples execute without errors. Insideexamples/runpython run_tests.py -b - [x] PR does not add any install dependencies unless permission granted by the HADDOCK team
- [x] PR does not break licensing
- [ ] Your PR is about writing documentation for already existing code :fire:
- [ ] Your PR is about writing tests for already existing code :godmode:
Introducing a new scoring module to calculate a HADDOCK-SAXS score as described by Karaca & Bonvin (2013) in Acta Crystallographica.
TO DO: Use HADDOCK score from models (calculated by the preceding module), rather than calling calc_haddock_score to calculate from scratch. We then no longer need the individual weights for the scoring terms, replace these with one weight for the pre-calculated HADDOCK score (default = 1) and of course keep w_saxs for the SAXS term (default = 50).
As discussed, the saxsscore module is a BaseHaddockModule, rather than a ScoringModule.
This is because the latter is a child class of BaseCNSModule that is designed to use CNS, which we do not need for this module. Instead of calling the output function from the BaseCNSModule class, some of it is copied in the module itself to produce a similar output table...
Codecov Report
Attention: 35 lines in your changes are missing coverage. Please review.
Comparison is base (
30373a2) 70.25% compared to head (2937ea6) 69.96%. Report is 58 commits behind head on main.
| Files | Patch % | Lines |
|---|---|---|
| src/haddock/modules/analysis/saxsscore/__init__.py | 28.57% | 35 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #551 +/- ##
==========================================
- Coverage 70.25% 69.96% -0.30%
==========================================
Files 78 79 +1
Lines 6967 7016 +49
==========================================
+ Hits 4895 4909 +14
- Misses 2072 2107 +35
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.