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

z-surface restraints scripts #839

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open

z-surface restraints scripts #839

wants to merge 28 commits into from

Conversation

VGPReys
Copy link
Contributor

@VGPReys VGPReys commented Mar 27, 2024

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 haddocking/haddock-restraints#13 by adding a new subcommand z-surface-restraints to the haddock3-restraints CLI.

haddock3-restraints z-surface-restraints
  --pdb my_structure.pdb
  --residues 1,2,3 7,8,9
  --spacing 20
  --x-size 200
  --y-size 200
  --z-padding 5
  --output my_Zrestraints

Selected residues sets (in the above example 1,2,3 and 7,8,9), will define two plans with x-dim --x-size and y-dim --y-size placing beads every --spacing angstroms.
Also, corresponding restraints are generated, resulting in the generation of both:

  • a beads.pdb file containing the coordinates of the shape beads
  • a restraints.tbl file containing specific restraints to each plans.

A series of examples are also provided, in examples/docking-protein-surface

TODO LIST

  • Generate bead plans
  • Generate restraints to plans
  • Have proper tests
  • Benchmark

@VGPReys VGPReys self-assigned this Mar 27, 2024
@VGPReys VGPReys added feature New feature request community contributions from people outside the haddock team labels Mar 27, 2024
@VGPReys VGPReys marked this pull request as ready for review April 12, 2024 06:46
@VGPReys VGPReys requested a review from mgiulini April 23, 2024 15:11
Copy link
Contributor

@mgiulini mgiulini left a comment

Choose a reason for hiding this comment

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

added some comment here and there. the code works! I don't know if we need to expose two commands for this..maybe only one (haddock3-restraints z_surface_restraints) is already enough

examples/docking-protein-surface/gen_breads.sh Outdated Show resolved Hide resolved
Comment on lines 1 to 12
run_dir = "run_docking_between_three_surfaces"
molecules = ["data/protein.pdb", "data/three_z_restraints_beads.pdb"]
[topoaa]
[rigidbody]
sampling = 20
# Define restraints to the z-surfaces
ambig_fname = "data/three_z_restraints.tbl"
randremoval = false
# Define the breads as shape molecule
mol_shape_2 = true
# Fix z-surfaces in their initial position
mol_fix_origin_2 = true
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure we need a new example for the three surfaces

src/haddock/clis/restraints/z_surface_restraints.py Outdated Show resolved Hide resolved
src/haddock/clis/restraints/z_surface_restraints.py Outdated Show resolved Hide resolved
src/haddock/clis/restraints/z_surface_restraints.py Outdated Show resolved Hide resolved
src/haddock/clis/restraints/z_surface_restraints.py Outdated Show resolved Hide resolved
VGPReys and others added 8 commits July 3, 2024 15:56
@VGPReys VGPReys requested a review from mgiulini July 4, 2024 10:27
@VGPReys
Copy link
Contributor Author

VGPReys commented Jul 4, 2024

Modifications/suggestions have been addressed.
Also discussed a little bit with @amjjbonvin for some restraints related things.

mgiulini
mgiulini previously approved these changes Aug 1, 2024
Copy link
Contributor

@mgiulini mgiulini left a comment

Choose a reason for hiding this comment

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

looks good! I am not sure whether to add a log call to the CLI execution

@rvhonorato rvhonorato self-requested a review August 1, 2024 09:03
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.

This should be added together with the other restraints at https://github.com/haddocking/haddock-restraints, not here

@VGPReys
Copy link
Contributor Author

VGPReys commented Aug 1, 2024

This should be added together with the other restraints at https://github.com/haddocking/haddock-restraints, not here

I do not agree.
This is haddock3 python version of the restraints, not the rust version

@rvhonorato
Copy link
Member

This should be added together with the other restraints at https://github.com/haddocking/haddock-restraints, not here

I do not agree. This is haddock3 python version of the restraints, not the rust version

There is no such thing, restraints are code agnostic and there is already a program to generate multiple types of restraint. There should be no feature duplication.

This looks very trivial, if you don't have the skills to implement it I can do it

@mgiulini
Copy link
Contributor

mgiulini commented Aug 1, 2024

This should be added together with the other restraints at https://github.com/haddocking/haddock-restraints, not here

I do not agree. This is haddock3 python version of the restraints, not the rust version

There is no such thing, restraints are code agnostic and there is already a program to generate multiple types of restraint. There should be no feature duplication.

This looks very trivial, if you don't have the skills to implement it I can do it

This does not make any sense. The haddock3-restraints has been part of the code since one year. Feel free to reproduce/rewrite this wherever you like, but this feature belongs here.

@amjjbonvin
Copy link
Member

amjjbonvin commented Aug 1, 2024 via email

@rvhonorato
Copy link
Member

rvhonorato commented Aug 1, 2024

Good point, we should also remove the other ones, please see: #959

@amjjbonvin why wait? Lets just do it now and avoid duplicated work and technical debt - this is a beta version :)

I can also update the tutorials; @VGPReys keep this PR open as a draft for now as I see you also have the examples, we can clean it later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community contributions from people outside the haddock team feature New feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Z-surface and restraints definition
4 participants