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

make sure hbond restraints are read under a separate class #1015

Merged
merged 13 commits into from
Sep 12, 2024
Merged

Conversation

amjjbonvin
Copy link
Member

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
  • purest tests pass. Run pytest 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:

hbond restraints provide a separate class of restraints that can be used as various stages with their own force constants. In the current code these were read under the dist class if unambiguous restraints were read and otherwise in the ambig class, meaning they would be subjected to random removal.

This pull request corrects this behaviour by changing the relevant CNS scripts to make sure hbond restraints are read under a separate hbon class.

As hbonds restraints can be used for any type of distance restraints in principle, their contribution is now also added to the distance restraint energy of HADDOCK.

An integration test was added in which the three types of restraints are read in the rigidbody module and the resulting output checked for the presence of those classes.

@amjjbonvin amjjbonvin added bug Something isn't working m|emref emref module m|flexref flexref module m|mdref mdref module m|rigidbody rigidbody sampling labels Sep 11, 2024
@amjjbonvin amjjbonvin requested a review from a team September 11, 2024 08:38
@amjjbonvin amjjbonvin self-assigned this Sep 11, 2024
@rvhonorato rvhonorato changed the title Solves issue #1008 about the hbond restraint class make sure hbond restraints are read under a separate class Sep 11, 2024
@rvhonorato rvhonorato linked an issue Sep 11, 2024 that may be closed by this pull request
@amjjbonvin
Copy link
Member Author

Also added golden data (restraints) for the integration test

VGPReys
VGPReys previously approved these changes Sep 11, 2024
Copy link
Contributor

@VGPReys VGPReys left a comment

Choose a reason for hiding this comment

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

Nice ! With additional integration tests on top of it !

rvhonorato
rvhonorato previously approved these changes Sep 11, 2024
integration_tests/test_restraints.py Outdated Show resolved Hide resolved
integration_tests/test_restraints.py Outdated Show resolved Hide resolved
integration_tests/test_restraints.py Outdated Show resolved Hide resolved
integration_tests/test_restraints.py Outdated Show resolved Hide resolved
integration_tests/test_restraints.py Outdated Show resolved Hide resolved
integration_tests/test_restraints.py Outdated Show resolved Hide resolved
integration_tests/test_restraints.py Outdated Show resolved Hide resolved
integration_tests/test_restraints.py Outdated Show resolved Hide resolved
@amjjbonvin amjjbonvin dismissed stale reviews from rvhonorato and VGPReys via 18de6c7 September 12, 2024 06:23
amjjbonvin and others added 9 commits September 12, 2024 08:23
Co-authored-by: Rodrigo Vargas Honorato <rvhonorato@gmail.com>
Co-authored-by: Rodrigo Vargas Honorato <rvhonorato@gmail.com>
Co-authored-by: Rodrigo Vargas Honorato <rvhonorato@gmail.com>
Co-authored-by: Rodrigo Vargas Honorato <rvhonorato@gmail.com>
Co-authored-by: Rodrigo Vargas Honorato <rvhonorato@gmail.com>
Co-authored-by: Rodrigo Vargas Honorato <rvhonorato@gmail.com>
Co-authored-by: Rodrigo Vargas Honorato <rvhonorato@gmail.com>
Co-authored-by: Rodrigo Vargas Honorato <rvhonorato@gmail.com>
@amjjbonvin amjjbonvin merged commit 79baea1 into main Sep 12, 2024
4 checks passed
@amjjbonvin amjjbonvin deleted the hbonds branch September 12, 2024 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working m|emref emref module m|flexref flexref module m|mdref mdref module m|rigidbody rigidbody sampling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hbond restraints should be in the noe hbon class
3 participants