Rosetta
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 () 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

- 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

◆ LongestContinuousPolarSegmentFilter() [1/2]

protocols::simple_filters::LongestContinuousPolarSegmentFilter::LongestContinuousPolarSegmentFilter ( )

Constructor.

this constructor sets count_gly_as_polar to true

◆ LongestContinuousPolarSegmentFilter() [2/2]

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

◆ ~LongestContinuousPolarSegmentFilter()

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

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

Destructor.

Member Function Documentation

◆ apply()

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().

◆ class_name()

std::string protocols::simple_filters::LongestContinuousPolarSegmentFilter::class_name ( )
static

◆ clone()

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

required in the context of the parser/scripting scheme

Implements protocols::filters::Filter.

◆ compute()

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().

◆ count_gly_as_polar()

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().

◆ counted_residue_description()

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().

◆ cutoff()

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().

◆ exclude_chain_termini()

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().

◆ filter_out_high()

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().

◆ fresh_instance()

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

required in the context of the parser/scripting scheme

Implements protocols::filters::Filter.

◆ is_counted()

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().

◆ name()

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

Reimplemented from protocols::filters::Filter.

References class_name().

Referenced by report().

◆ parse_my_tag()

void protocols::simple_filters::LongestContinuousPolarSegmentFilter::parse_my_tag ( utility::tag::TagCOP  tag,
basic::datacache::DataMap data 
)
overridevirtual

◆ provide_xml_schema()

void protocols::simple_filters::LongestContinuousPolarSegmentFilter::provide_xml_schema ( utility::tag::XMLSchemaDefinition &  xsd)
static

◆ report()

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_.

◆ report_sm()

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_.

◆ 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_.

◆ set_count_gly_as_polar()

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().

◆ set_cutoff()

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().

◆ set_exclude_chain_termini()

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().

◆ set_filter_out_high()

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().

◆ set_residue_selector()

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

◆ count_gly_as_polar_

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().

◆ cutoff_

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().

◆ exclude_chain_termini_

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().

◆ filter_out_high_

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().

◆ residue_selector_

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: