Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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]
Collaboration diagram for protocols::filters::IfThenFilter:
Collaboration graph
[legend]

Public Member Functions

 IfThenFilter ()
 Evaluate to a value contingent on the evaluation of another filter. More...
 
virtual ~IfThenFilter ()
 
bool apply (core::pose::Pose const &) const
 Returns true if the given pose passes the filter, false otherwise. More...
 
FilterOP clone () const
 
FilterOP fresh_instance () const
 
void report (std::ostream &, core::pose::Pose const &) const
 
core::Real report_sm (core::pose::Pose const &) const
 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::TagPtr const, moves::DataMap &, Filters_map const &, moves::Movers_map const &, core::pose::Pose const &)
 
- Public Member Functions inherited from protocols::filters::Filter
 Filter ()
 
 Filter (std::string const &)
 
 Filter (Filter const &)
 
virtual ~Filter ()
 
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 void apply (core::io::serialization::PipeMap &pmap)
 
virtual void score (core::io::serialization::PipeMap &pmap)
 
virtual core::Real score (core::pose::Pose &pose)
 
virtual void parse_def (utility::lua::LuaObject const &def, utility::lua::LuaObject const &score_fxns, utility::lua::LuaObject const &tasks)
 
virtual std::string name () const
 

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.

Definition at line 176 of file BasicFilters.hh.

Constructor & Destructor Documentation

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

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

Definition at line 464 of file BasicFilters.cc.

Referenced by clone(), and fresh_instance().

protocols::filters::IfThenFilter::~IfThenFilter ( )
virtual

Definition at line 470 of file BasicFilters.cc.

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.

Definition at line 473 of file BasicFilters.cc.

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

Referenced by parse_my_tag().

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

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

Implements protocols::filters::Filter.

Definition at line 494 of file BasicFilters.cc.

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

Referenced by compute().

FilterOP protocols::filters::IfThenFilter::clone ( ) const
virtual

Implements protocols::filters::Filter.

Definition at line 509 of file BasicFilters.cc.

References IfThenFilter().

core::Real protocols::filters::IfThenFilter::compute ( core::pose::Pose const &  pose) const
FilterOP protocols::filters::IfThenFilter::fresh_instance ( ) const
virtual

Implements protocols::filters::Filter.

Definition at line 515 of file BasicFilters.cc.

References IfThenFilter().

void protocols::filters::IfThenFilter::parse_my_tag ( utility::tag::TagPtr const  tag,
moves::DataMap ,
Filters_map const &  filters,
moves::Movers_map const &  ,
core::pose::Pose const &   
)
virtual
void protocols::filters::IfThenFilter::report ( std::ostream &  out,
core::pose::Pose const &  pose 
) const
virtual

Reimplemented from protocols::filters::Filter.

Definition at line 521 of file BasicFilters.cc.

References compute().

core::Real protocols::filters::IfThenFilter::report_sm ( core::pose::Pose const &  ) const
virtual

used to report filter internals through a score or silent file

Reimplemented from protocols::filters::Filter.

Definition at line 529 of file BasicFilters.cc.

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.

Definition at line 487 of file BasicFilters.cc.

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.

Definition at line 191 of file BasicFilters.hh.

References floor_.

Referenced by parse_my_tag().

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

Definition at line 189 of file BasicFilters.hh.

References threshold(), and threshold_.

Referenced by parse_my_tag(), and threshold().

Member Data Documentation

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

Definition at line 218 of file BasicFilters.hh.

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

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

Definition at line 219 of file BasicFilters.hh.

Referenced by compute(), and set_else().

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

Definition at line 220 of file BasicFilters.hh.

Referenced by compute(), and set_else().

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

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

Definition at line 224 of file BasicFilters.hh.

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

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

Definition at line 211 of file BasicFilters.hh.

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

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

If true, invert the sense of the iffilter test.

Definition at line 216 of file BasicFilters.hh.

Referenced by add_condition(), and compute().

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

Definition at line 212 of file BasicFilters.hh.

Referenced by add_condition(), and compute().

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

Definition at line 222 of file BasicFilters.hh.

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

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

Definition at line 213 of file BasicFilters.hh.

Referenced by add_condition(), and compute().

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

Definition at line 214 of file BasicFilters.hh.

Referenced by add_condition(), and compute().


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