Rosetta
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
protocols::simple_filters::ResidueCountFilter Class Reference

#include <ResidueCountFilter.hh>

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

Public Member Functions

 ResidueCountFilter ()
 
 ~ResidueCountFilter () override
 
bool apply (core::pose::Pose const &pose) const override
 Returns true if the given pose passes the filter, false otherwise. More...
 
filters::FilterOP clone () const override
 
filters::FilterOP fresh_instance () const override
 
void report (std::ostream &out, core::pose::Pose const &pose) const override
 
core::Real report_sm (core::pose::Pose const &pose) const override
 used to report filter internals through a score or silent file More...
 
core::Real compute (core::pose::Pose const &pose) const
 
core::Real round_to_Real (core::Real x) const
 
void parse_my_tag (utility::tag::TagCOP tag, basic::datacache::DataMap &) override
 Called by FilterFactory when constructing new Filter. Takes care of the specific mover's parsing. More...
 
core::Size max_residue_count () const
 
void max_residue_count (core::Size value)
 
bool enable_max_residue_count () const
 
void enable_max_residue_count (bool value)
 
core::Size min_residue_count () const
 
void min_residue_count (core::Size value)
 
utility::vector1< std::string > res_types () const
 
void res_types (utility::vector1< std::string > const &res_type)
 
utility::vector1< core::chemical::ResidueProperty > const & res_props () const
 
void res_props (utility::vector1< core::chemical::ResidueProperty > const &res_prop)
 
bool enable_min_residue_count () const
 
void enable_min_residue_count (bool value)
 
core::pack::task::TaskFactoryOP task_factory () const
 
void task_factory (core::pack::task::TaskFactoryOP task_factory)
 
void residue_selector (core::select::residue_selector::ResidueSelectorCOP selector)
 
bool packable () const
 
void packable (bool const pack)
 
bool add_residue_type_by_name (core::chemical::ResidueTypeSet const &res_type_set, std::string const &res_type_input)
 Checks whether a residue type is present in the provided residue type set, and if so, adds it to res_types_. More...
 
bool add_residue_property_by_name (std::string const &prop_input)
 add proeprties to peroperty vector @detail given user specified properties, adds them to the property vector to count. I still need to add a way to check the sanity @input res_type_set, the residue type set of the input structure @input res_type_input, the user specified residue type name More...
 
std::string name () const override
 
- 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 Attributes

core::Size max_residue_count_
 
bool enable_max_residue_count_
 
core::Size min_residue_count_
 
bool enable_min_residue_count_
 
bool count_as_percentage_
 
utility::vector1< std::string > res_types_
 
utility::vector1< core::chemical::ResiduePropertyres_props_
 
bool packable_
 
core::pack::task::TaskFactoryOP task_factory_
 
core::select::residue_selector::ResidueSelectorCOP selector_
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ ResidueCountFilter()

protocols::simple_filters::ResidueCountFilter::ResidueCountFilter ( )

◆ ~ResidueCountFilter()

protocols::simple_filters::ResidueCountFilter::~ResidueCountFilter ( )
overridedefault

Member Function Documentation

◆ add_residue_property_by_name()

bool protocols::simple_filters::ResidueCountFilter::add_residue_property_by_name ( std::string const &  prop_input)

add proeprties to peroperty vector @detail given user specified properties, adds them to the property vector to count. I still need to add a way to check the sanity @input res_type_set, the residue type set of the input structure @input res_type_input, the user specified residue type name

Returns
false if res_type_input doesn't match any residue type names, true otherwise
Author
Parisa Hosseinzadeh (paris.nosp@m.ah@u.nosp@m.w.edu), Baker laboratory.

References core::chemical::ResidueProperties::get_property_from_string(), core::chemical::NO_PROPERTY, res_props_, and protocols::simple_filters::TR().

Referenced by parse_my_tag().

◆ add_residue_type_by_name()

bool protocols::simple_filters::ResidueCountFilter::add_residue_type_by_name ( core::chemical::ResidueTypeSet const &  res_type_set,
std::string const &  res_type_input 
)

Checks whether a residue type is present in the provided residue type set, and if so, adds it to res_types_.

Checks whether a residue type is present in the provided residue type set, and if so, adds it to res_types_ @detail given user specified residue type string, look for residue type name and add it to the list of types to count if it is present in the specified ResidueTypeSet. @input res_type_set, the residue type set of the input structure @input res_type_input, the user specified residue type name.

Returns
false if res_type_input doesn't match any residue type names, true otherwise

References core::chemical::ResidueTypeSet::has_name(), and res_types_.

◆ apply()

bool protocols::simple_filters::ResidueCountFilter::apply ( core::pose::Pose const &  pose) const
overridevirtual

◆ class_name()

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

◆ clone()

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

◆ compute()

core::Real protocols::simple_filters::ResidueCountFilter::compute ( core::pose::Pose const &  pose) const

The logic here ensures that any residue that is selected by type OR by properties is counted once and only once. So, for example, if I say, "count THR and beta-branched and polar", each threonine residue is still only counted once.

Author
Original author unknown.
Updated by Parisa Hosseinzadeh (paris.nosp@m.ah@u.nosp@m.w.edu) to add property counting.
Logic updated by Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu) to avoid double-counting if names and multiple properties are specified.

References count_as_percentage_, core::chemical::ResidueTypeBase::has_property(), core::conformation::Residue::name(), core::conformation::Residue::name3(), packable_, res_props_, res_types_, core::pose::Pose::residue(), protocols::rosetta_scripts::residue_packer_states(), core::pose::Pose::residue_type(), core::pose::Pose::residue_type_set_for_pose(), round_to_Real(), selector_, core::pose::Pose::size(), and task_factory().

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

◆ enable_max_residue_count() [1/2]

bool protocols::simple_filters::ResidueCountFilter::enable_max_residue_count ( ) const

References enable_max_residue_count_.

Referenced by apply(), and parse_my_tag().

◆ enable_max_residue_count() [2/2]

void protocols::simple_filters::ResidueCountFilter::enable_max_residue_count ( bool  value)

◆ enable_min_residue_count() [1/2]

bool protocols::simple_filters::ResidueCountFilter::enable_min_residue_count ( ) const

References enable_min_residue_count_.

Referenced by apply(), and parse_my_tag().

◆ enable_min_residue_count() [2/2]

void protocols::simple_filters::ResidueCountFilter::enable_min_residue_count ( bool  value)

◆ fresh_instance()

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

◆ max_residue_count() [1/2]

core::Size protocols::simple_filters::ResidueCountFilter::max_residue_count ( ) const

References max_residue_count_.

Referenced by apply(), and parse_my_tag().

◆ max_residue_count() [2/2]

void protocols::simple_filters::ResidueCountFilter::max_residue_count ( core::Size  value)

References max_residue_count_.

◆ min_residue_count() [1/2]

core::Size protocols::simple_filters::ResidueCountFilter::min_residue_count ( ) const

References min_residue_count_.

Referenced by apply(), and parse_my_tag().

◆ min_residue_count() [2/2]

void protocols::simple_filters::ResidueCountFilter::min_residue_count ( core::Size  value)

References min_residue_count_.

◆ name()

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

Reimplemented from protocols::filters::Filter.

References class_name().

◆ packable() [1/2]

bool protocols::simple_filters::ResidueCountFilter::packable ( ) const

References packable_.

Referenced by parse_my_tag().

◆ packable() [2/2]

void protocols::simple_filters::ResidueCountFilter::packable ( bool const  pack)

References packable_.

◆ parse_my_tag()

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

◆ provide_xml_schema()

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

◆ report()

void protocols::simple_filters::ResidueCountFilter::report ( std::ostream &  out,
core::pose::Pose const &  pose 
) const
overridevirtual

◆ report_sm()

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

used to report filter internals through a score or silent file

Reimplemented from protocols::filters::Filter.

References compute().

◆ res_props() [1/2]

utility::vector1< core::chemical::ResidueProperty > const & protocols::simple_filters::ResidueCountFilter::res_props ( ) const

References res_props_.

Referenced by res_props().

◆ res_props() [2/2]

void protocols::simple_filters::ResidueCountFilter::res_props ( utility::vector1< core::chemical::ResidueProperty > const &  res_prop)

References res_props(), and res_props_.

◆ res_types() [1/2]

utility::vector1< std::string > protocols::simple_filters::ResidueCountFilter::res_types ( ) const

References res_types_.

Referenced by parse_my_tag(), and res_types().

◆ res_types() [2/2]

void protocols::simple_filters::ResidueCountFilter::res_types ( utility::vector1< std::string > const &  res_type)

References res_types(), and res_types_.

◆ residue_selector()

void protocols::simple_filters::ResidueCountFilter::residue_selector ( core::select::residue_selector::ResidueSelectorCOP  selector)

References selector_.

Referenced by parse_my_tag().

◆ round_to_Real()

Real protocols::simple_filters::ResidueCountFilter::round_to_Real ( core::Real  x) const

Referenced by compute().

◆ task_factory() [1/2]

core::pack::task::TaskFactoryOP protocols::simple_filters::ResidueCountFilter::task_factory ( ) const

References task_factory_.

Referenced by compute(), parse_my_tag(), and task_factory().

◆ task_factory() [2/2]

void protocols::simple_filters::ResidueCountFilter::task_factory ( core::pack::task::TaskFactoryOP  task_factory)

References task_factory(), and task_factory_.

Member Data Documentation

◆ count_as_percentage_

bool protocols::simple_filters::ResidueCountFilter::count_as_percentage_
private

Referenced by compute(), and parse_my_tag().

◆ enable_max_residue_count_

bool protocols::simple_filters::ResidueCountFilter::enable_max_residue_count_
private

◆ enable_min_residue_count_

bool protocols::simple_filters::ResidueCountFilter::enable_min_residue_count_
private

◆ max_residue_count_

core::Size protocols::simple_filters::ResidueCountFilter::max_residue_count_
private

Referenced by max_residue_count().

◆ min_residue_count_

core::Size protocols::simple_filters::ResidueCountFilter::min_residue_count_
private

Referenced by min_residue_count().

◆ packable_

bool protocols::simple_filters::ResidueCountFilter::packable_
private

Referenced by compute(), and packable().

◆ res_props_

utility::vector1< core::chemical::ResidueProperty > protocols::simple_filters::ResidueCountFilter::res_props_
private

◆ res_types_

utility::vector1< std::string > protocols::simple_filters::ResidueCountFilter::res_types_
private

◆ selector_

core::select::residue_selector::ResidueSelectorCOP protocols::simple_filters::ResidueCountFilter::selector_
private

Referenced by compute(), and residue_selector().

◆ task_factory_

core::pack::task::TaskFactoryOP protocols::simple_filters::ResidueCountFilter::task_factory_
private

Referenced by task_factory().


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