Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
protocols::simple_filters::LongestContinuousPolarSegmentFilter Class Reference

This filter computes the longest continuous stretch of polar residues within a pose or selection. More...

#include <LongestContinuousPolarSegmentFilter.hh>

Inheritance diagram for protocols::simple_filters::LongestContinuousPolarSegmentFilter:
Inheritance graph
[legend]

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...
 
- Public Member Functions inherited from protocols::filters::Filter
 Filter ()
 
 Filter (std::string const &)
 
 Filter (Filter 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 bool filter_provides_citation_info () const
 Does this filter provide information about how to cite it? More...
 
virtual utility::vector1
< basic::citation_manager::CitationCollectionCOP > 
provide_citation_info () const
 Provide the citation. More...
 
virtual bool filter_is_unpublished () const
 Does this filter indicate that it is unpublished (and, by extension, that the author should be included in publications resulting from it)? More...
 
virtual utility::vector1
< basic::citation_manager::UnpublishedModuleInfoCOP > 
provide_authorship_info_for_unpublished () const
 Provide a list of authors and their e-mail addresses, as strings. 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

- Protected Attributes inherited from protocols::filters::Filter
std::string scorename_
 

Detailed Description

This filter computes the longest continuous stretch of polar residues within a pose or selection.

Constructor & Destructor Documentation

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

protocols::simple_filters::LongestContinuousPolarSegmentFilter::~LongestContinuousPolarSegmentFilter ( )
overridedefault

destructor (important for properly forward-declaring smart-pointer members)

Destructor.

Member Function Documentation

bool protocols::simple_filters::LongestContinuousPolarSegmentFilter::apply ( core::pose::Pose const &  pose) const
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().

std::string protocols::simple_filters::LongestContinuousPolarSegmentFilter::class_name ( )
static
protocols::filters::FilterOP protocols::simple_filters::LongestContinuousPolarSegmentFilter::clone ( ) const
overridevirtual

required in the context of the parser/scripting scheme

Implements protocols::filters::Filter.

void protocols::simple_filters::LongestContinuousPolarSegmentFilter::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
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.

Parameters
[in]poseThe pose to analyse.
[in]selectorAn 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_terminiIf true, stretches at the N- and C-termini of chains are ignored. If false, they're counted.
[out]longest_stretch_res_countThe number of polar residues in the longest polar stretch. Set to 0 if no polar stretch is found.
[out]longest_stretch_startThe 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_endThe 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().

bool protocols::simple_filters::LongestContinuousPolarSegmentFilter::count_gly_as_polar ( ) const
inline

Get whether glycine is counted as a polar residue type.

References count_gly_as_polar_.

Referenced by is_counted(), and parse_my_tag().

std::string protocols::simple_filters::LongestContinuousPolarSegmentFilter::counted_residue_description ( ) const
virtual

returns type of counted residues (polar)

Reimplemented in protocols::simple_filters::LongestContinuousApolarSegmentFilter.

Referenced by apply(), compute(), and report().

core::Size protocols::simple_filters::LongestContinuousPolarSegmentFilter::cutoff ( ) const
inline

Get the max (or min) tolerated number of polars.

References cutoff_.

Referenced by parse_my_tag(), and set_cutoff().

bool protocols::simple_filters::LongestContinuousPolarSegmentFilter::exclude_chain_termini ( ) const
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().

bool protocols::simple_filters::LongestContinuousPolarSegmentFilter::filter_out_high ( ) const
inline

Get whether I should filter out high (true) or low (false) poses.

References filter_out_high_.

Referenced by parse_my_tag().

protocols::filters::FilterOP protocols::simple_filters::LongestContinuousPolarSegmentFilter::fresh_instance ( ) const
overridevirtual

required in the context of the parser/scripting scheme

Implements protocols::filters::Filter.

bool protocols::simple_filters::LongestContinuousPolarSegmentFilter::is_counted ( core::chemical::ResidueType const &  restype) const
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().

std::string protocols::simple_filters::LongestContinuousPolarSegmentFilter::name ( ) const
overridevirtual

Reimplemented from protocols::filters::Filter.

References class_name().

Referenced by report().

void protocols::simple_filters::LongestContinuousPolarSegmentFilter::parse_my_tag ( utility::tag::TagCOP  tag,
basic::datacache::DataMap &  data 
)
overridevirtual
void protocols::simple_filters::LongestContinuousPolarSegmentFilter::provide_xml_schema ( utility::tag::XMLSchemaDefinition &  xsd)
static
void protocols::simple_filters::LongestContinuousPolarSegmentFilter::report ( std::ostream &  os,
core::pose::Pose const &  pose 
) const
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_.

core::Real protocols::simple_filters::LongestContinuousPolarSegmentFilter::report_sm ( core::pose::Pose const &  pose) const
overridevirtual

required for reporting score values

Required for reporting score values.

Reimplemented from protocols::filters::Filter.

References compute(), exclude_chain_termini_, and residue_selector_.

core::select::residue_selector::ResidueSelectorCOP protocols::simple_filters::LongestContinuousPolarSegmentFilter::residue_selector ( ) const
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_.

void protocols::simple_filters::LongestContinuousPolarSegmentFilter::set_count_gly_as_polar ( bool const  setting)
inline

Set whether glycine is counted as a polar residue type.

References count_gly_as_polar_.

Referenced by parse_my_tag().

void protocols::simple_filters::LongestContinuousPolarSegmentFilter::set_cutoff ( core::Size const  cutoff)
inline

Set the max (or min) tolerated number of polars.

References cutoff(), and cutoff_.

Referenced by parse_my_tag().

void protocols::simple_filters::LongestContinuousPolarSegmentFilter::set_exclude_chain_termini ( bool const  setting)
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().

void protocols::simple_filters::LongestContinuousPolarSegmentFilter::set_filter_out_high ( bool const  setting)
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().

Member Data Documentation

bool protocols::simple_filters::LongestContinuousPolarSegmentFilter::count_gly_as_polar_
private

If true, glycine will be considered "polar". True by default.

Referenced by count_gly_as_polar(), and set_count_gly_as_polar().

core::Size protocols::simple_filters::LongestContinuousPolarSegmentFilter::cutoff_
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().

bool protocols::simple_filters::LongestContinuousPolarSegmentFilter::exclude_chain_termini_
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().

bool protocols::simple_filters::LongestContinuousPolarSegmentFilter::filter_out_high_
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().

core::select::residue_selector::ResidueSelectorCOP protocols::simple_filters::LongestContinuousPolarSegmentFilter::residue_selector_
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().


The documentation for this class was generated from the following files: