feat: added bad_res_radius feature, allowing to specify cutoff distance#474
Conversation
…ce that deletes bad res
|
could you also make this work with --box_enveloping and have the radius be the distance from the center of whatever the box is enveloping? |
Yes, that should be working. |
|
oki, I'll fix the help message then. To me the feature would be more intuitive if the --bad_res_radius is passed INSTEAD of --delete_bad_res, not in addition to it. Passing --delete_bad_res makes me feel like all bad residues will be deleted even if they are in my radius which freaks me out |
yes, that makes sense |
|
On a second thought, you are still deleting bad residues, just outside of a given radius, so maybe it makes sense to have both? You can assume that they always are passed together, except that when you don't specify a radius, it defaults to 0. We can even add in the docs that if a radius is not passed, that's equivalent to passing a radius of 0 (also modify the help doc for --delete_bad_radius) Perhaps @diogomart can weigh in. |
…x center Unmatched residues farther than bad_res_radius outside any face of the grid box are deleted; those within that distance (or inside the box) raise an error. --bad_res_radius now implies deletion and cannot be combined with --delete_bad_res. Requires full box definition: --box_center + --box_size, or --box_enveloping + --padding.
|
I had envisioned this feature to allow bad residues outside a radius extending from the search box, nor a radius from the center of mass of the ligand/box. Using a specrical volume from the ligand/box's COM is problematic for irregularly shaped or elongated ligands: a long, skinny ligand produces a box that is much larger in one dimension than another, so a fixed radius from the center is a poor proxy for "is this residue actually outside the docking search spave?" Drafted a version with this implemented, would appreciate feedback |
|
I also changed it so you can't pass --bad_res_radius & --delete_bad_res together. This is more intuitive to me as a user, but I also don't feel strongly and I think that either way is fine as long as it is clearly documented w appropriate warnings. |
|
Made the following changes:
|
|
hmm, not crazy about that name. Too long and too many underscores. |
|
Fair point, |
|
Another perspective is that we are consolidating two commands in one, with more info (from box), and in about the same length |
|
the only thing I can think is --delete_bad_res_outsise_box_radius is slightly more clear. but I agree w @diogomart that this is just a challenging one - its confusing having a box radius and then this additional radius outside the box radius. maybe there was a simpler way to implement this feature, but this is the most useful way I could come up with totally open to your suggestions tho @joanimato otherwise looks great to me. thanks for the thorough review @diogomart |
|
maybe |
|
@allisonbarkdull both sound good to me |
|
Merging, but happy to optimize the choice of option names in future PRs. |
Description
This feature is addresses #473
A new CLI option,
--bad_res_radiusis provided that allows the user to specify a cutoff radius (from the box center) outside of which bad residues will be ignored. If the bad residue falls within the specified cutoff radius, an error will be raised as usual. This is meant to be used in conjunction with--allow_bad_res/--delete_bad_res. A box specification is also necessary (or at the very lost, the box_center).From the API side, the same can be done by passing a
bad_res_radiusinto thePolymer.from_pdb_string()(orfrom_prody, etc...) functions. This requires that the box_center (as an array) is also defined in the MoleculePreparation object:Type of change
Checklist:
Please go through the following checklist before submitting the PR:
Additional Information
Diogo suggested an API change to meeko, so this feature may be temporary and will have to be rewritten.