haddock3 icon indicating copy to clipboard operation
haddock3 copied to clipboard

Add SAXS scoring module

Open cvnoort opened this issue 3 years ago • 3 comments

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] tox tests pass. Run tox command inside the repository folder
  • [x] -test.cfg examples execute without errors. Inside examples/ run python 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.

cvnoort avatar Sep 09 '22 10:09 cvnoort

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).

cvnoort avatar Sep 16 '22 14:09 cvnoort

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...

cvnoort avatar Sep 16 '22 14:09 cvnoort

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.

codecov-commenter avatar Oct 19 '22 10:10 codecov-commenter