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

Haddock3 restraints #732

Merged
merged 15 commits into from
Oct 26, 2023
Merged

Haddock3 restraints #732

merged 15 commits into from
Oct 26, 2023

Conversation

mgiulini
Copy link
Contributor

@mgiulini mgiulini commented Oct 24, 2023

You are about to submit a new Pull Request. Before continuing make sure you read the contributing guidelines and that you comply with the following criteria:

  • You have sticked to Python. Please talk to us before adding other programming languages to HADDOCK3
  • Your PR is about CNS
  • Your code is well documented: proper docstrings and explanatory comments for those tricky parts
  • You structured the code into small functions as much as possible. You can use classes if there is a (state) purpose
  • Your code follows our coding style
  • You wrote tests for the new code
  • tox tests pass. Run tox command inside the repository folder
  • -test.cfg examples execute without errors. Inside examples/ run python run_tests.py -b
  • PR does not add any dependencies, unless permission granted by the HADDOCK team
  • PR does not break licensing
  • Your PR is about writing documentation for already existing code 🔥
  • Your PR is about writing tests for already existing code :godmode:

Closes #734 by adding a new CLI, haddock3-restraints, with four subcommands (validate_tbl, restrain_bodies, passive_from_active, active_passive_to_ambig) that can be used to generate, validate, and handle restraints.

this adds the freesasa dependency (necessary for passive_from_active).

For the sake of time I didn't rewrite these scripts completely, but at least now they are properly tested.

@mgiulini mgiulini self-assigned this Oct 24, 2023
@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Attention: 89 lines in your changes are missing coverage. Please review.

Comparison is base (1e307a0) 75.48% compared to head (d260fc6) 75.92%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #732      +/-   ##
==========================================
+ Coverage   75.48%   75.92%   +0.43%     
==========================================
  Files         115      121       +6     
  Lines        8204     8723     +519     
==========================================
+ Hits         6193     6623     +430     
- Misses       2011     2100      +89     
Files Coverage Δ
tests/test_cli_restraints.py 98.66% <98.66%> (ø)
src/haddock/restraints/active_passive_to_ambig.py 58.33% <58.33%> (ø)
src/haddock/restraints/restrain_bodies.py 70.00% <70.00%> (ø)
src/haddock/restraints/validate_tbl.py 68.42% <68.42%> (ø)
src/haddock/restraints/passive_from_active.py 60.37% <60.37%> (ø)
src/haddock/libs/librestraints.py 85.29% <85.29%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mgiulini mgiulini marked this pull request as ready for review October 25, 2023 12:09
rvhonorato
rvhonorato previously approved these changes Oct 25, 2023
Copy link
Member

@rvhonorato rvhonorato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see quite a lot of minor issues but those are related to the legacy script rather than this port. I'd suggest you add a disclaimer/warning/big comment somewhere that this was ported from old code and there is room for improvment.

requirements.txt Show resolved Hide resolved
src/haddock/libs/librestraints.py Show resolved Hide resolved
@mgiulini
Copy link
Contributor Author

I see quite a lot of minor issues but those are related to the legacy script rather than this port. I'd suggest you add a disclaimer/warning/big comment somewhere that this was ported from old code and there is room for improvment.

makes sense, I will add it in the main CLI. I won't print the disclaimer though, as the output of these scripts is typically redirected

@mgiulini mgiulini added enhancement Enhancing an existing feature of adding a new one enhance user experience labels Oct 26, 2023
@rvhonorato rvhonorato added feature New feature request and removed enhancement Enhancing an existing feature of adding a new one enhance user experience labels Oct 26, 2023
Copy link
Member

@rvhonorato rvhonorato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely ported!

@mgiulini mgiulini merged commit c77f949 into main Oct 26, 2023
6 checks passed
@mgiulini mgiulini deleted the haddock3_restraints branch October 26, 2023 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

incorporate old restraints scripts in haddock3
2 participants