Rosetta
|
This filter computes the longest continuous stretch of polar residues within a pose or selection. More...
#include <LongestContinuousPolarSegmentFilter.hh>
Public Member Functions | |
LongestContinuousPolarSegmentFilter () | |
Constructor. More... | |
LongestContinuousPolarSegmentFilter (std::string const &filter_name) | |
Constructor. More... | |
~LongestContinuousPolarSegmentFilter () override | |
destructor (important for properly forward-declaring smart-pointer members) More... | |
bool | apply (core::pose::Pose const &pose) const override |
returns true if the structure passes the filter, false otherwise More... | |
core::Real | report_sm (core::pose::Pose const &pose) const override |
required for reporting score values More... | |
void | report (std::ostream &os, core::pose::Pose const &pose) const override |
allows printing data to a stream More... | |
void | set_exclude_chain_termini (bool const setting) |
Set whether I should exclude stretches of polars are the N- and C-termini of chains. More... | |
bool | exclude_chain_termini () const |
Get whether I should exclude stretches of polars are the N- and C-termini of chains. More... | |
void | set_count_gly_as_polar (bool const setting) |
Set whether glycine is counted as a polar residue type. More... | |
bool | count_gly_as_polar () const |
Get whether glycine is counted as a polar residue type. More... | |
void | set_filter_out_high (bool const setting) |
Set whether I should filter out high (true) or low (false) poses. More... | |
bool | filter_out_high () const |
Get whether I should filter out high (true) or low (false) poses. More... | |
void | set_cutoff (core::Size const cutoff) |
Set the max (or min) tolerated number of polars. More... | |
core::Size | cutoff () const |
Get the max (or min) tolerated number of polars. More... | |
void | set_residue_selector (core::select::residue_selector::ResidueSelectorCOP selector_in) |
Set the residue selector. More... | |
core::select::residue_selector::ResidueSelectorCOP | residue_selector () const |
Get the residue selector. More... | |
std::string | name () const override |
void | parse_my_tag (utility::tag::TagCOP tag, basic::datacache::DataMap &data) override |
parse XML tag (to use this Filter in Rosetta Scripts) More... | |
protocols::filters::FilterOP | fresh_instance () const override |
required in the context of the parser/scripting scheme More... | |
protocols::filters::FilterOP | clone () const override |
required in the context of the parser/scripting scheme More... | |
virtual bool | is_counted (core::chemical::ResidueType const &restype) const |
Given a residue type, determine whether it's one of the types that this filter should count. More... | |
virtual std::string | counted_residue_description () const |
returns type of counted residues (polar) More... | |
![]() | |
Filter () | |
Filter (std::string const &) | |
~Filter () override | |
virtual std::string | get_type () const |
std::string | get_user_defined_name () const |
void | set_user_defined_name (std::string const &name) |
virtual void | clear () |
used to clear internal variables if needed. Using fresh_instance is preferred since it's a pure virtual More... | |
virtual core::Real | score (core::pose::Pose &pose) |
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 std::string | class_name () |
static void | provide_xml_schema (utility::tag::XMLSchemaDefinition &xsd) |
Private Member Functions | |
void | compute (core::pose::Pose const &pose, core::select::residue_selector::ResidueSelectorCOP selector, bool const ignore_termini, core::Size &longest_stretch_res_count, core::Size &longest_stretch_start, core::Size &longest_stretch_end) const |
Given a pose, actually compute the number of residues in the longest stretch, and return this value, along with the start and end indices (in Rosetta numbering). More... | |
Private Attributes | |
bool | exclude_chain_termini_ |
Should I exclude stretches of polars are the N- and C-termini of chains? More... | |
bool | count_gly_as_polar_ |
If true, glycine will be considered "polar". True by default. More... | |
bool | filter_out_high_ |
Should I filter out designs with too many or too few polars in a stretch? More... | |
core::Size | cutoff_ |
The cutoff value for filtering. More... | |
core::select::residue_selector::ResidueSelectorCOP | residue_selector_ |
An optional residue selector to select a subset of a pose. More... | |
Additional Inherited Members | |
![]() | |
std::string | scorename_ |
This filter computes the longest continuous stretch of polar residues within a pose or selection.
protocols::simple_filters::LongestContinuousPolarSegmentFilter::LongestContinuousPolarSegmentFilter | ( | ) |
Constructor.
this constructor sets count_gly_as_polar to true
protocols::simple_filters::LongestContinuousPolarSegmentFilter::LongestContinuousPolarSegmentFilter | ( | std::string const & | filter_name | ) |
Constructor.
constructor for derived classes to call
this constructor sets count_gly_as_polar to false
|
overridedefault |
destructor (important for properly forward-declaring smart-pointer members)
Destructor.
|
overridevirtual |
returns true if the structure passes the filter, false otherwise
Returns true if the structure passes the filter, false otherwise.
Implements protocols::filters::Filter.
References compute(), counted_residue_description(), cutoff_, exclude_chain_termini_, filter_out_high_, core::conformation::Residue::name3(), core::pose::Pose::residue(), residue_selector_, and protocols::simple_filters::TR().
|
static |
|
overridevirtual |
required in the context of the parser/scripting scheme
Implements protocols::filters::Filter.
|
private |
Given a pose, actually compute the number of residues in the longest stretch, and return this value, along with the start and end indices (in Rosetta numbering).
Returns 0, 0, 0 if no polar stretch could be found.
[in] | pose | The pose to analyse. |
[in] | selector | An optional const-owning pointer to a ResidueSelector. If provided, only those stretches that have at least one residue selected by the ResidueSelector will be counted. |
[in] | ignore_termini | If true, stretches at the N- and C-termini of chains are ignored. If false, they're counted. |
[out] | longest_stretch_res_count | The number of polar residues in the longest polar stretch. Set to 0 if no polar stretch is found. |
[out] | longest_stretch_start | The index, in Rosetta numbering, of the first residue of the longest polar stretch. Set to 0 if no polar stretch is found. |
[out] | longest_stretch_end | The index, in Rosetta numbering, of the last residue of the longest polar stretch. Set to 0 if no polar stretch is found. |
References core::conformation::Residue::connected_residue_at_lower(), core::conformation::Residue::connected_residue_at_upper(), counted_residue_description(), core::sequence::end, is_counted(), core::chemical::ResidueTypeBase::is_protein(), core::pose::Pose::residue(), core::pose::Pose::residue_type(), protocols::loops::start, core::pose::Pose::total_residue(), and protocols::simple_filters::TR().
Referenced by apply(), report(), and report_sm().
|
inline |
Get whether glycine is counted as a polar residue type.
References count_gly_as_polar_.
Referenced by is_counted(), and parse_my_tag().
|
virtual |
returns type of counted residues (polar)
Reimplemented in protocols::simple_filters::LongestContinuousApolarSegmentFilter.
|
inline |
Get the max (or min) tolerated number of polars.
References cutoff_.
Referenced by parse_my_tag(), and set_cutoff().
|
inline |
Get whether I should exclude stretches of polars are the N- and C-termini of chains.
References exclude_chain_termini_.
Referenced by parse_my_tag().
|
inline |
Get whether I should filter out high (true) or low (false) poses.
References filter_out_high_.
Referenced by parse_my_tag().
|
overridevirtual |
required in the context of the parser/scripting scheme
Implements protocols::filters::Filter.
|
virtual |
Given a residue type, determine whether it's one of the types that this filter should count.
Based on whether the residue type has the POLAR property. Special-case exception is made for glycine, depending on whether count_gly_as_polar_ is true.
Reimplemented in protocols::simple_filters::LongestContinuousApolarSegmentFilter.
References core::chemical::ResidueTypeBase::aa(), core::chemical::aa_gly, count_gly_as_polar(), and core::chemical::ResidueType::is_polar().
Referenced by compute().
|
overridevirtual |
|
overridevirtual |
parse XML tag (to use this Filter in Rosetta Scripts)
Parse tag to allow RosettaScripts XML to call this mover.
Reimplemented from protocols::filters::Filter.
References count_gly_as_polar(), cutoff(), exclude_chain_termini(), filter_out_high(), core::select::residue_selector::parse_residue_selector(), set_count_gly_as_polar(), set_cutoff(), set_exclude_chain_termini(), set_filter_out_high(), and set_residue_selector().
|
static |
|
overridevirtual |
allows printing data to a stream
Allows printing data to a stream.
Reimplemented from protocols::filters::Filter.
References compute(), counted_residue_description(), exclude_chain_termini_, name(), core::conformation::Residue::name3(), core::pose::Pose::residue(), and residue_selector_.
|
overridevirtual |
required for reporting score values
Required for reporting score values.
Reimplemented from protocols::filters::Filter.
References compute(), exclude_chain_termini_, and residue_selector_.
|
inline |
Get the residue selector.
Can be shared, or modified later – this is a true owning pointer to the stored selector, not to a clone.
References residue_selector_.
|
inline |
Set whether glycine is counted as a polar residue type.
References count_gly_as_polar_.
Referenced by parse_my_tag().
|
inline |
Set the max (or min) tolerated number of polars.
References cutoff(), and cutoff_.
Referenced by parse_my_tag().
|
inline |
Set whether I should exclude stretches of polars are the N- and C-termini of chains.
References exclude_chain_termini_.
Referenced by parse_my_tag().
|
inline |
Set whether I should filter out high (true) or low (false) poses.
References filter_out_high_.
Referenced by parse_my_tag().
void protocols::simple_filters::LongestContinuousPolarSegmentFilter::set_residue_selector | ( | core::select::residue_selector::ResidueSelectorCOP | selector_in | ) |
Set the residue selector.
Does not clone the input; uses it directly. (Can be shared, or modified later).
References residue_selector_.
Referenced by parse_my_tag().
|
private |
If true, glycine will be considered "polar". True by default.
Referenced by count_gly_as_polar(), and set_count_gly_as_polar().
|
private |
The cutoff value for filtering.
Above (or below, if filtering out low) this value, designs are rejected. If the number of polars is equal to or below this value (or equal to or above, if filtering out low), designs are accepted.
Referenced by apply(), cutoff(), and set_cutoff().
|
private |
Should I exclude stretches of polars are the N- and C-termini of chains?
Default true.
Referenced by apply(), exclude_chain_termini(), report(), report_sm(), and set_exclude_chain_termini().
|
private |
Should I filter out designs with too many or too few polars in a stretch?
Default is true (filter out designs with too many).
Referenced by apply(), filter_out_high(), and set_filter_out_high().
|
private |
An optional residue selector to select a subset of a pose.
Will be nullptr if not specified.
Referenced by apply(), report(), report_sm(), residue_selector(), and set_residue_selector().