Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 given user specified properties, adds them to the property vector to count. I still need to add a way to check the sanity res_type_set, the residue type set of the input structure 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 (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 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::ResidueProperty
res_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

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

Member Function Documentation

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

add proeprties to peroperty vector given user specified properties, adds them to the property vector to count. I still need to add a way to check the sanity res_type_set, the residue type set of the input structure 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().

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_ 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. res_type_set, the residue type set of the input structure 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_.

bool protocols::simple_filters::ResidueCountFilter::apply ( core::pose::Pose const &  pose) const
overridevirtual
std::string protocols::simple_filters::ResidueCountFilter::class_name ( )
static
filters::FilterOP protocols::simple_filters::ResidueCountFilter::clone ( ) const
overridevirtual
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().

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

References enable_max_residue_count_.

Referenced by apply(), and parse_my_tag().

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

References enable_min_residue_count_.

Referenced by apply(), and parse_my_tag().

void protocols::simple_filters::ResidueCountFilter::enable_min_residue_count ( bool  value)
filters::FilterOP protocols::simple_filters::ResidueCountFilter::fresh_instance ( ) const
overridevirtual
core::Size protocols::simple_filters::ResidueCountFilter::max_residue_count ( ) const

References max_residue_count_.

Referenced by apply(), and parse_my_tag().

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

References max_residue_count_.

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

References min_residue_count_.

Referenced by apply(), and parse_my_tag().

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

References min_residue_count_.

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

Reimplemented from protocols::filters::Filter.

References class_name().

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

References packable_.

Referenced by parse_my_tag().

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

References packable_.

void protocols::simple_filters::ResidueCountFilter::parse_my_tag ( utility::tag::TagCOP  ,
basic::datacache::DataMap &   
)
overridevirtual
void protocols::simple_filters::ResidueCountFilter::provide_xml_schema ( utility::tag::XMLSchemaDefinition &  xsd)
static
void protocols::simple_filters::ResidueCountFilter::report ( std::ostream &  out,
core::pose::Pose const &  pose 
) const
overridevirtual

Reimplemented from protocols::filters::Filter.

References compute().

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

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

References res_props_.

Referenced by res_props().

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

References res_props(), and res_props_.

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

References res_types_.

Referenced by parse_my_tag(), and res_types().

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

References res_types(), and res_types_.

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

References selector_.

Referenced by parse_my_tag().

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

Referenced by compute().

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

References task_factory_.

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

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

References task_factory(), and task_factory_.

Member Data Documentation

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

Referenced by compute(), and parse_my_tag().

bool protocols::simple_filters::ResidueCountFilter::enable_max_residue_count_
private
bool protocols::simple_filters::ResidueCountFilter::enable_min_residue_count_
private
core::Size protocols::simple_filters::ResidueCountFilter::max_residue_count_
private

Referenced by max_residue_count().

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

Referenced by min_residue_count().

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

Referenced by compute(), and packable().

utility::vector1< core::chemical::ResidueProperty > protocols::simple_filters::ResidueCountFilter::res_props_
private
utility::vector1< std::string > protocols::simple_filters::ResidueCountFilter::res_types_
private
core::select::residue_selector::ResidueSelectorCOP protocols::simple_filters::ResidueCountFilter::selector_
private

Referenced by compute(), and residue_selector().

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: