Skip to content

Conversation

VGPReys
Copy link
Contributor

@VGPReys VGPReys commented Jun 12, 2025

Checklist

  • Tests added for the new code
  • Documentation added for the code changes
  • Modifications / enhancements are reflected on the haddock3 user-manual
  • CHANGELOG.md is updated to incorporate new changes
  • Does not break licensing
  • Does not add any dependencies, if it does please add a thorough explanation

Summary of the Pull Request

As proposed by an external user, this PR introduce an additional subcommand restrain-ligand into the haddock3-restraints CLI.
This new sub-command allows to select a residue name from a PDB file and generate unambiguous restraints keeping it in place.
This is an adaptation of the script used in the shape restraint docking set of script (restrain_ligand.py), and also similar to what can be performed by the restrain command from the haddock-restraints package.

Usage:
    haddock3-restraints restrain_ligand <pdb_file> <ligand_name> -r <radius> -d <deviation> -n <max_nb_restraints>

positional arguments:
  pdb_file              Input PDB file.
  ligand_name           Residue name.

options:
  -h, --help            show this help message and exit
  -r RADIUS, --radius RADIUS
                        Radius used for neighbors search around center of mass of ligand.
                        (default: 10.0)
  -n MAX_RESTRAINTS, --max-restraints MAX_RESTRAINTS
                        Maximum number of restraints to return. (default: 200)
  -d DEVIATION, --deviation DEVIATION
                        Allowed deviation from actual distance. (default: 1.0)

Related Issue

Closes #1299
Description in user manual is made in PR13 of haddock3-user-manual

@VGPReys VGPReys self-assigned this Jun 12, 2025
@VGPReys VGPReys added feature Adding something new to the codebase community Feature requests / contribution / issues from users labels Jun 12, 2025
@VGPReys VGPReys requested a review from a team June 13, 2025 11:50
Copy link
Contributor

@AnnaKravchenko AnnaKravchenko left a comment

Choose a reason for hiding this comment

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

Question:
Does unambiguous restraints violation counts towards “Restraints Energy” in report.html?
Because I do not see this happening, and wonder if its normal or if smth wrong with my .cfg

@amjjbonvin
Copy link
Member

It is part of the distance restraint energy term (ambig+unambig+hbond combined, i.e. all distance restraints).

@VGPReys VGPReys merged commit 9f5a65a into main Jun 17, 2025
9 checks passed
@VGPReys VGPReys deleted the restraint-ligand branch June 17, 2025 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Feature requests / contribution / issues from users feature Adding something new to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add restrain_ligand into haddock3 framework.
3 participants