adding random removal in haddock3-restraint cli #1232
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
Summary of the Pull Request
This pull request adds the
random_removal
sub-command to thehaddock3-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>]
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...