Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OperatorFilter.hh
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file protocols/simple_filters/OperatorFilter.hh
11 
12 #ifndef INCLUDED_protocols_simple_filters_OperatorFilter_hh
13 #define INCLUDED_protocols_simple_filters_OperatorFilter_hh
14 
15 //unit headers
17 
18 // Project Headers
19 #include <core/types.hh>
21 #include <core/pose/Pose.fwd.hh>
24 
25 namespace protocols {
26 namespace simple_filters {
27 
29 ///@brief simply take a list of filters and combine them using the operation above
30 class Operator : public filters::Filter
31 {
32  public:
33  Operator();
34  virtual ~Operator();
36  return new Operator( *this );
37  }
39  return new Operator();
40  }
41 
42  virtual bool apply( core::pose::Pose const & pose ) const;
43  virtual void report( std::ostream & out, core::pose::Pose const & pose ) const;
44  virtual core::Real report_sm( core::pose::Pose const & pose ) const;
46  core::Real compute( core::pose::Pose const & pose ) const;
49  void reset_baseline( core::pose::Pose const & pose, bool const attempt_read_from_checkpoint/* see Sigmoid for details*/ ); /// goes over Sigmoid filters and resets them. Note that this is nonconst, and cannot be called from apply
50  core::Real threshold() const{ return threshold_; }
51  void threshold( core::Real const t ){ threshold_ = t; }
52  Operation operation() const{ return operation_; }
53  void operation( Operation const o ){ operation_ = o; }
54  void negate( bool const b ){ negate_ = b; }
55  bool negate() const{ return negate_; }
58  bool multi_relative() const { return multi_relative_; }
59  void multi_relative( bool const m ){ multi_relative_ = m; }
61  private:
63  Operation operation_; // dflt PRODUCT
65  bool negate_; // dflt false; in optimization, useful to get values between -1 - 0 rather than 0-1
67  bool multi_relative_; //dflt false; if true, searches all of the filters for RelativePoseFilters, replicates them to as many different file names as are listed in relative_pose_names_. Useful in case there are many different states that are all taken into consideration using the same operator
68 };
69 }
70 }
71 
72 #endif