Skip to content

adding random removal in haddock3-restraint cli #1232

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

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

Conversation

VGPReys
Copy link
Contributor

@VGPReys VGPReys commented Mar 28, 2025

Checklist

  • Tests added for the new code
  • Documentation added for the code changes
  • Does not break licensing
  • Does not add any dependencies, if it does please add a thorough explanation

Summary of the Pull Request

This pull request adds the random_removal sub-command to the haddock3-restraints CLI.

Given an input ambiguous file (.tbl), this subcommand will generate an archive containing multiple tbl files, each containing a subset of the initial ones.

The subset is tuned by the optional argument --ratio (-r), defining the ratio of restraints to be removed (between 0 and 1), 0 not doing anything and 1 removing everything...
The number of generated files in the archive is tuned by the argument --nb-tbl (-n)
The random seed can be tuned using --seed (-s), for reproducibility issues

Usage:
haddock3-restraints random_removal <tbl_file> [-r <ratio>] [-n <nb-tbl>] [-s <seed>]

options:
  -h, --help            show this help message and exit
  -r RATIO, --ratio RATIO
                        Ratio of restraints to be randomly removed.
  -s SEED, --seed SEED  Pseudo-random seed.
  -n NB_TBL, --nb-tbl NB_TBL
                        Number of ambiguous files to generate in the archive.

Related Issue

Closes #1240

Additional Info

The functions managing the random removal are placed in librestraints.py, allowing for their usage outside of this CLI.
For example, directly in the CNS modules, such as rigidbody, flexref, etc...

@VGPReys VGPReys self-assigned this Mar 28, 2025
@VGPReys VGPReys added the feature Adding something new to the codebase label Mar 28, 2025
@rvhonorato
Copy link
Member

There is no issue associated with this PR - please add one before merging

@VGPReys VGPReys marked this pull request as ready for review April 30, 2025 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding something new to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add random removal of restraints
2 participants