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::filters::IfThenFilter Class Reference

Evaluate to a value contingent on the evaluation of another filter. More...

#include <BasicFilters.hh>

Inheritance diagram for protocols::filters::IfThenFilter:
Inheritance graph
[legend]

Public Member Functions

 IfThenFilter ()
 Evaluate to a value contingent on the evaluation of another filter. More...
 
 ~IfThenFilter () override
 
bool apply (core::pose::Pose const &) const override
 Returns true if the given pose passes the filter, false otherwise. More...
 
FilterOP clone () const override
 
FilterOP fresh_instance () const override
 
void report (std::ostream &, core::pose::Pose const &) const override
 
core::Real report_sm (core::pose::Pose const &) const override
 used to report filter internals through a score or silent file More...
 
core::Real compute (core::pose::Pose const &) const
 
void threshold (core::Real threshold)
 
void set_lower_threshold (bool floor=false)
 Set if threshold is an upper (false/default) or lower (true) limit. More...
 
void add_condition (FilterCOP testfilter, FilterCOP valuefilter, core::Real value=0, bool invert=false, core::Real weight=1)
 Add a condition to the test. If testfilter evaluates true, then this filter evaluates to valuefilter. If valuefilter is NULL, then return value instead. Conditions are evaluated in the order they were added. More...
 
void set_else (FilterCOP elsefilter, core::Real value=0, core::Real elseweight=1)
 Add evaluation if no conditions trigger If elsefilter is Null, use absolute value value instead. More...
 
void parse_my_tag (utility::tag::TagCOP, basic::datacache::DataMap &) override
 Called by FilterFactory when constructing new Filter. Takes care of the specific mover's parsing. 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

utility::vector1< FilterCOPiffilters_
 
utility::vector1< FilterCOPthenfilters_
 
utility::vector1< core::Realvalues_
 
utility::vector1< core::Realweights_
 
utility::vector1< boolinvert_
 If true, invert the sense of the iffilter test. More...
 
FilterCOP elsefilter_
 
core::Real elsevalue_
 
core::Real elseweight_
 
core::Real threshold_
 
bool floor_
 If true, threshold_ is a lower limit, rather than upper limit. More...
 

Additional Inherited Members

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

Detailed Description

Evaluate to a value contingent on the evaluation of another filter.

Constructor & Destructor Documentation

protocols::filters::IfThenFilter::IfThenFilter ( )

Evaluate to a value contingent on the evaluation of another filter.

protocols::filters::IfThenFilter::~IfThenFilter ( )
overridedefault

Member Function Documentation

void protocols::filters::IfThenFilter::add_condition ( FilterCOP  testfilter,
FilterCOP  valuefilter,
core::Real  value = 0,
bool  invert = false,
core::Real  weight = 1 
)

Add a condition to the test. If testfilter evaluates true, then this filter evaluates to valuefilter. If valuefilter is NULL, then return value instead. Conditions are evaluated in the order they were added.

References iffilters_, invert_, thenfilters_, values_, and weights_.

Referenced by parse_my_tag().

bool protocols::filters::IfThenFilter::apply ( core::pose::Pose const &  pose) const
overridevirtual

Returns true if the given pose passes the filter, false otherwise.

Implements protocols::filters::Filter.

References compute(), floor_, threshold_, and protocols::filters::TR().

Referenced by compute().

std::string protocols::filters::IfThenFilter::class_name ( )
static
FilterOP protocols::filters::IfThenFilter::clone ( ) const
overridevirtual
core::Real protocols::filters::IfThenFilter::compute ( core::pose::Pose const &  pose) const
FilterOP protocols::filters::IfThenFilter::fresh_instance ( ) const
overridevirtual
std::string protocols::filters::IfThenFilter::name ( ) const
overridevirtual
void protocols::filters::IfThenFilter::parse_my_tag ( utility::tag::TagCOP  ,
basic::datacache::DataMap &   
)
overridevirtual
void protocols::filters::IfThenFilter::provide_xml_schema ( utility::tag::XMLSchemaDefinition &  xsd)
static
void protocols::filters::IfThenFilter::report ( std::ostream &  out,
core::pose::Pose const &  pose 
) const
overridevirtual

Reimplemented from protocols::filters::Filter.

References compute().

core::Real protocols::filters::IfThenFilter::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().

void protocols::filters::IfThenFilter::set_else ( FilterCOP  elsefilter,
core::Real  value = 0,
core::Real  elseweight = 1 
)

Add evaluation if no conditions trigger If elsefilter is Null, use absolute value value instead.

References elsefilter_, elsevalue_, and elseweight_.

Referenced by parse_my_tag().

void protocols::filters::IfThenFilter::set_lower_threshold ( bool  floor = false)
inline

Set if threshold is an upper (false/default) or lower (true) limit.

References floor_.

Referenced by parse_my_tag().

void protocols::filters::IfThenFilter::threshold ( core::Real  threshold)
inline

References threshold(), and threshold_.

Referenced by parse_my_tag(), and threshold().

Member Data Documentation

FilterCOP protocols::filters::IfThenFilter::elsefilter_
private

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

core::Real protocols::filters::IfThenFilter::elsevalue_
private

Referenced by compute(), and set_else().

core::Real protocols::filters::IfThenFilter::elseweight_
private

Referenced by compute(), and set_else().

bool protocols::filters::IfThenFilter::floor_
private

If true, threshold_ is a lower limit, rather than upper limit.

Referenced by apply(), parse_my_tag(), and set_lower_threshold().

utility::vector1< FilterCOP > protocols::filters::IfThenFilter::iffilters_
private
utility::vector1< bool > protocols::filters::IfThenFilter::invert_
private

If true, invert the sense of the iffilter test.

Referenced by add_condition(), and compute().

utility::vector1< FilterCOP > protocols::filters::IfThenFilter::thenfilters_
private

Referenced by add_condition(), and compute().

core::Real protocols::filters::IfThenFilter::threshold_
private

Referenced by apply(), parse_my_tag(), and threshold().

utility::vector1< core::Real > protocols::filters::IfThenFilter::values_
private

Referenced by add_condition(), and compute().

utility::vector1< core::Real > protocols::filters::IfThenFilter::weights_
private

Referenced by add_condition(), and compute().


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