Rosetta
|
Define a shell based on potential sidechain clashes with a set of residues being repacked or designed. More...
#include <ClashBasedShellSelector.hh>
Public Member Functions | |
ClashBasedShellSelector ()=default | |
Default constructor. More... | |
ClashBasedShellSelector (ClashBasedShellSelector const &)=default | |
Default copy constructor. More... | |
~ClashBasedShellSelector () override=default | |
Default destructor. More... | |
ClashBasedShellSelector (std::string resnums) | |
ClashBasedShellSelector (core::select::residue_selector::ResidueSelectorCOP selector) | |
Initialize from a residue selector. More... | |
ClashBasedShellSelector (core::pack::task::TaskFactoryCOP task_factory, bool focus_on_designable=true) | |
Initialize from a task factory. More... | |
ClashBasedShellSelector (core::pack::task::PackerTaskCOP task, bool focus_on_designable=true) | |
Initialize from a packer task. More... | |
ClashBasedShellSelector (std::set< core::Size > resnums) | |
Initialize from a set of residue indices. More... | |
ClashBasedShellSelector (utility::vector1< bool > mask) | |
Initialize from a boolean vector. More... | |
core::select::residue_selector::ResidueSelectorOP | clone () const override |
Copy this object and return an owning pointer to the result. More... | |
core::select::residue_selector::ResidueSubset | apply (core::pose::Pose const &pose) const override |
Select the residues that are clashing with any rotamer of the previously specified focus residues. More... | |
void | parse_my_tag (utility::tag::TagCOP tag, basic::datacache::DataMap &datamap) override |
Initialize from a RosettaScripts tag. More... | |
std::string | get_name () const override |
Return "ClashBasedShell". More... | |
void | invert (bool inverted=true) |
Select the residues that aren't part of the clash-based shell. More... | |
void | clear_focus () |
Reset the focus residues. More... | |
void | set_focus (std::string resnums) |
Specify the residues to build the shell around from a string containing a list of indices, e.g. "34-46,199-202". More... | |
void | set_focus (core::select::residue_selector::ResidueSelectorCOP selector) |
Specify the residues to build the shell around from a residue selector. More... | |
void | set_focus (core::pack::task::TaskFactoryCOP task_factory, bool focus_on_designable=DEFAULT_FOCUS_ON_DESIGNABLE) |
Specify the residues to build the shell around from a task factory. More... | |
void | set_focus (core::pack::task::PackerTaskCOP task, bool focus_on_designable=DEFAULT_FOCUS_ON_DESIGNABLE) |
Specify the residues to build the shell around from a packer task. More... | |
void | set_focus (std::set< core::Size > resnums) |
Specify the residues to build the shell around from a set of residue indices. More... | |
void | set_focus (utility::vector1< bool > bool_mask) |
Specify the residues to build the shell around from a boolean vector. More... | |
void | set_scorefxn (core::scoring::ScoreFunctionOP scorefxn) |
Set the score function to use when generating rotamers. More... | |
void | set_include_focus (bool include_focus) |
If true, include the focus residues in the ultimate selection. More... | |
void | set_num_shells (core::Size num_shells) |
Specify the number of shells to calculate. More... | |
void | set_bump_overlap_factor (core::Real set_bump_overlap_factor) |
Control how close two atoms can be before they are considered to be clashing. More... | |
core::scoring::ScoreFunctionOP | get_scorefxn () const |
Get the score function to use when generating rotamers. More... | |
core::Size | get_num_shells () const |
Get the number of shells to calculate. More... | |
core::Real | get_bump_overlap_factor () const |
Get how close two atoms can be before they are considered to be clashing. More... | |
bool | get_include_focus () const |
Return whether the focus residues will be included in the ultimate selection. More... | |
bool | is_inverted () const |
Return whether to selection will be inverted. More... | |
![]() | |
ResidueSelector () | |
Constructor. More... | |
~ResidueSelector () override | |
Destructor. More... | |
utility::vector1< core::Size > | selection_positions (core::pose::Pose const &pose) const |
Calls apply and returns the Rosetta numbering corresponding to the selected residues. More... | |
virtual void | provide_citation_info (basic::citation_manager::CitationCollectionList &) const |
Provide citations to the passed CitationCollectionList Subclasses should add the info for themselves and any other classes they use. More... | |
Static Public Member Functions | |
static void | provide_xml_schema (utility::tag::XMLSchemaDefinition &xsd) |
Define the expected RosettaScripts options. More... | |
static void | provide_xml_schema_attributes (utility::tag::AttributeList &attributes) |
Define the attributes understood by this RosettaScripts tag. More... | |
static std::string | class_name () |
Return "ClashBasedShell". More... | |
Static Public Attributes | |
static core::Size const | DEFAULT_NUM_SHELLS = 1 |
static core::Real const | DEFAULT_BUMP_FACTOR = 0.5 |
static bool const | DEFAULT_INVERT = false |
static bool const | DEFAULT_INCLUDE_FOCUS = true |
static bool const | DEFAULT_FOCUS_ON_DESIGNABLE = true |
Private Attributes | |
std::string | focus_str_ |
std::set< core::Size > | focus_set_ |
utility::vector1< bool > | focus_mask_ |
core::select::residue_selector::ResidueSelectorCOP | focus_selector_ = nullptr |
core::pack::task::PackerTaskCOP | focus_task_ = nullptr |
core::pack::task::TaskFactoryCOP | focus_task_factory_ = nullptr |
core::scoring::ScoreFunctionOP | scorefxn_ = nullptr |
core::Size | num_shells_ = DEFAULT_NUM_SHELLS |
core::Real | bump_overlap_factor_ = DEFAULT_BUMP_FACTOR |
bool | is_inverted_ = DEFAULT_INVERT |
bool | include_focus_ = DEFAULT_INCLUDE_FOCUS |
bool | focus_on_designable_ = DEFAULT_FOCUS_ON_DESIGNABLE |
Define a shell based on potential sidechain clashes with a set of residues being repacked or designed.
The most common reason to use a clash-based shell is to pick a minimal set of residues to repack around some positions you want to design. For most simple cases, the ClashBasedRepackShell task operation is the best way to do this. Use ClashBasedShellSelector if you want to combine the repack shell with other selections (e.g. repack everything that's in the first two repack shells but not more than 6Å from a certain residue), or do something else entirely.
The best way to specify which residues to build the shell around (called the "focus" residues, see set_focus()) is to use a TaskFactory. This is because task factories know which rotamers go in each position, so each one can be checked for clashes. You can also specify focus residues using a ResidueSelector. In this case rotamers will be generated for only the native amino acid (i.e. assuming the positions are being repacked) and checked for clashes as usual.
If you ask for more than one shell (see set_num_shells()), the shell calculation will be iterated, with the residues found at each step included as inputs for the next. The residues added in this manner are treated as repackable for the purpose of making shells (i.e. only rotamers of the native amino acid are considered).
This class mainly exists to provide a RosettaScripts interface for selecting clash-based shells. If you want to select such a shell from C++, the find_clashing_shells() function will be simpler and easier to use.
In order for a residue the be included in the clash-based shell, its sidechain must have a steric clash with one of the rotamers allowed for one of the focus residues. Furthermore, that rotamer must not have any backbone clashes with any other residue. Backbone clashes can't be resolved by the packer, so there's no point considering rotamers that clash with the backbone. Clashes are defined entirely by inter-atomic distance and do not depend on any particular score terms.
Think twice before using ClashBasedShellSelector or ClashBasedRepackShell if you're running many simulations with different backbones, because you may end up picking different shells in different simulations. Repacking different sets of residues can make scores hard to compare, especially if your input structure isn't relaxed.
If you want to understand exactly why ClashBasedShellSelector either included or excluded a particular residue, run rosetta with the -out:levels core.pack.task.residue_selector.ClashBasedShellSelector:trace
flag.
|
default |
Default constructor.
|
default |
Default copy constructor.
|
overridedefault |
Default destructor.
core::pack::task::residue_selector::ClashBasedShellSelector::ClashBasedShellSelector | ( | std::string | resnums | ) |
Initialize from a string containing a list of indices, e.g. "34-46,199-202".
core::pack::task::residue_selector::ClashBasedShellSelector::ClashBasedShellSelector | ( | core::select::residue_selector::ResidueSelectorCOP | selector | ) |
Initialize from a residue selector.
core::pack::task::residue_selector::ClashBasedShellSelector::ClashBasedShellSelector | ( | core::pack::task::TaskFactoryCOP | task_factory, |
bool | focus_on_designable = true |
||
) |
Initialize from a task factory.
core::pack::task::residue_selector::ClashBasedShellSelector::ClashBasedShellSelector | ( | core::pack::task::PackerTaskCOP | task, |
bool | focus_on_designable = true |
||
) |
Initialize from a packer task.
It's usually a bad idea to use a packer task instead of a task factory, because you'll get bugs if the pose used to create the packer task is different than the one passed to this selector's apply() method.
core::pack::task::residue_selector::ClashBasedShellSelector::ClashBasedShellSelector | ( | std::set< core::Size > | resnums | ) |
Initialize from a set of residue indices.
core::pack::task::residue_selector::ClashBasedShellSelector::ClashBasedShellSelector | ( | utility::vector1< bool > | mask | ) |
Initialize from a boolean vector.
The vector should have the same number of indices as the pose ultimately passed to apply().
|
overridevirtual |
Select the residues that are clashing with any rotamer of the previously specified focus residues.
Rotamers that are clashing with the backbone are ignored, since the idea is to identify residues that might need to be repacked, and backbone clashes can't be solved by repacking.
Implements core::select::residue_selector::ResidueSelector.
References core::pack::task::residue_selector::bool_mask_from_resnums(), core::pack::task::residue_selector::find_clashing_shells(), core::pack::task::residue_selector::freeze_repack_positions(), core::pose::get_resnum_list(), core::scoring::get_score_function(), core::pose::Pose::size(), core::pack::task::residue_selector::task_from_bool_mask(), and core::pack::task::residue_selector::task_from_resnums().
|
static |
Return "ClashBasedShell".
Referenced by get_name(), and core::pack::task::residue_selector::ClashBasedShellSelectorCreator::keyname().
void core::pack::task::residue_selector::ClashBasedShellSelector::clear_focus | ( | ) |
Reset the focus residues.
|
overridevirtual |
Copy this object and return an owning pointer to the result.
Clone operator.
Copy this object and return an owning pointer to the new object.
Implements core::select::residue_selector::ResidueSelector.
Real core::pack::task::residue_selector::ClashBasedShellSelector::get_bump_overlap_factor | ( | ) | const |
Get how close two atoms can be before they are considered to be clashing.
bool core::pack::task::residue_selector::ClashBasedShellSelector::get_include_focus | ( | ) | const |
Return whether the focus residues will be included in the ultimate selection.
|
overridevirtual |
Return "ClashBasedShell".
Implements core::select::residue_selector::ResidueSelector.
References class_name().
Size core::pack::task::residue_selector::ClashBasedShellSelector::get_num_shells | ( | ) | const |
Get the number of shells to calculate.
ScoreFunctionOP core::pack::task::residue_selector::ClashBasedShellSelector::get_scorefxn | ( | ) | const |
Get the score function to use when generating rotamers.
void core::pack::task::residue_selector::ClashBasedShellSelector::invert | ( | bool | inverted = true | ) |
Select the residues that aren't part of the clash-based shell.
This is useful for creating a repack shell, because you typically start with everything being repackable and your goal is to freeze the residues that aren't in a clash-based shell.
bool core::pack::task::residue_selector::ClashBasedShellSelector::is_inverted | ( | ) | const |
Return whether to selection will be inverted.
|
overridevirtual |
Initialize from a RosettaScripts tag.
Reimplemented from core::select::residue_selector::ResidueSelector.
References core::select::residue_selector::get_embedded_residue_selector(), core::select::residue_selector::parse_residue_selector(), core::scoring::parse_score_function(), core::pack::task::parse_task_operations(), and core::pack::task::residue_selector::TR().
|
static |
Define the expected RosettaScripts options.
References core::select::jump_selector::xsd_type_definition_w_attributes_and_optional_subselector().
Referenced by core::pack::task::residue_selector::ClashBasedShellSelectorCreator::provide_xml_schema().
|
static |
Define the attributes understood by this RosettaScripts tag.
This is provided separately from provide_xml_schema() so other entities (namely ClashBasedRepackShell) can easily support all the same attributes.
References core::select::residue_selector::attributes_for_parse_residue_selector(), core::scoring::attributes_for_parse_score_function(), and core::pack::task::attributes_for_parse_task_operations().
void core::pack::task::residue_selector::ClashBasedShellSelector::set_bump_overlap_factor | ( | core::Real | set_bump_overlap_factor | ) |
Control how close two atoms can be before they are considered to be clashing.
Two atoms are considered to clash when the squared distance between them is less than: bump_overlap_factor * {sum of Lennard-Jones radii}^2.
void core::pack::task::residue_selector::ClashBasedShellSelector::set_focus | ( | core::pack::task::PackerTaskCOP | task, |
bool | focus_on_designable = DEFAULT_FOCUS_ON_DESIGNABLE |
||
) |
Specify the residues to build the shell around from a packer task.
It's usually a bad idea to use a packer task instead of a task factory, because you'll get bugs if the pose used to create the packer task is different than the one passed to this selector's apply() method.
The shell will be built considering all rotamers allowed by the given packer task. By default, only positions that can design are considered (because usually you want to build a repack around a set of designable positions), but you can also include repack positions by setting focus_on_designable to false.
void core::pack::task::residue_selector::ClashBasedShellSelector::set_focus | ( | core::pack::task::TaskFactoryCOP | task_factory, |
bool | focus_on_designable = DEFAULT_FOCUS_ON_DESIGNABLE |
||
) |
Specify the residues to build the shell around from a task factory.
The shell will be built considering all rotamers allowed by the given task factory. By default, only positions that can design are considered (because usually you want to build a repack around a set of designable positions), but you can also include repack positions by setting focus_on_designable to false.
void core::pack::task::residue_selector::ClashBasedShellSelector::set_focus | ( | core::select::residue_selector::ResidueSelectorCOP | selector | ) |
Specify the residues to build the shell around from a residue selector.
The shell will be built considering all rotamers of the native amino acids of the specified residues. Specify a TaskFactory if you want to account for design.
void core::pack::task::residue_selector::ClashBasedShellSelector::set_focus | ( | std::set< core::Size > | resnums | ) |
Specify the residues to build the shell around from a set of residue indices.
The shell will be built considering all rotamers of the native amino acids of the specified residues. Specify a TaskFactory if you want to account for design.
void core::pack::task::residue_selector::ClashBasedShellSelector::set_focus | ( | std::string | resnums | ) |
Specify the residues to build the shell around from a string containing a list of indices, e.g. "34-46,199-202".
The shell will be built considering all rotamers of the native amino acids of the specified residues. Specify a TaskFactory if you want to account for design.
void core::pack::task::residue_selector::ClashBasedShellSelector::set_focus | ( | utility::vector1< bool > | bool_mask | ) |
Specify the residues to build the shell around from a boolean vector.
The vector should have the same number of indices as the pose ultimately passed to apply(). The shell will be built considering all rotamers of the native amino acids of the specified residues. Specify a TaskFactory if you want to account for design.
void core::pack::task::residue_selector::ClashBasedShellSelector::set_include_focus | ( | bool | include_focus | ) |
If true, include the focus residues in the ultimate selection.
void core::pack::task::residue_selector::ClashBasedShellSelector::set_num_shells | ( | core::Size | num_shells | ) |
Specify the number of shells to calculate.
For example, if you asked for two shells, the first shell would include all the residues that could clash with the focus, and the second shell would contain all the residues that could clash with anything in the first shell. The ultimate selection would be the union of the two shells.
void core::pack::task::residue_selector::ClashBasedShellSelector::set_scorefxn | ( | core::scoring::ScoreFunctionOP | scorefxn | ) |
Set the score function to use when generating rotamers.
I'm a little skeptical that we couldn't just use a default-constructed score function for this. -KBK
|
private |
|
static |
Referenced by core::pack::task::residue_selector::add_clashes_to_shell().
|
static |
|
static |
|
static |
|
static |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |