Rosetta Protocols  2014.35
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>

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::TagCOP, basic::datacache::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.

Constructor & Destructor Documentation

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

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

Referenced by clone(), and fresh_instance().

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

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

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

Referenced by compute().

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

Implements protocols::filters::Filter.

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.

References IfThenFilter().

void protocols::filters::IfThenFilter::parse_my_tag ( utility::tag::TagCOP  tag,
basic::datacache::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.

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.

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: