Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ScoreCutoffFilter.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 src/protocols/simple_filters/ScoreCutoffFilter.hh
11 /// @brief header file for ScoreCutoffFitler class.
12 /// @detailed
13 /// @author Florian Richter floric@u.washington.edu
14 
15 
16 #ifndef INCLUDED_protocols_simple_filters_ScoreCutoffFilter_hh
17 #define INCLUDED_protocols_simple_filters_ScoreCutoffFilter_hh
18 
19 // Unit Headers
22 
23 // Project Headers
24 #include <core/pose/Pose.fwd.hh>
25 // AUTO-REMOVED #include <basic/options/option.hh>
26 // AUTO-REMOVED #include <basic/options/keys/OptionKeys.hh>
28 
29 
30 #include <utility/vector1.hh>
31 
32 
33 // ObjexxFCL Headers
34 
35 // Utility headers
36 
37 //// C++ headers
38 
39 namespace protocols {
40 namespace simple_filters {
41 
42 
44 
45 public:
47 
48 public:
49  /// c-tor and
51 
52  ScoreCutoffFilter( core::Real cutoff_in );
53 
55  return new ScoreCutoffFilter( *this ); }
56 
58  return new ScoreCutoffFilter(); }
59 
60  virtual void report( std::ostream & ostr, core::pose::Pose const & pose ) const;
61 
63 
64 
65  /// @brief Returns true if the given pose passes the filter, false otherwise.
66  /// In this case, the test is the result of the following comparison:
67  /// sc <= cutoff
68  /// Where cutoff is the cutoff set for this filter, and sc is the value of the
69  /// ScoreType from the Pose Energies object.
70  virtual
71  bool apply( core::pose::Pose const & pose ) const;
72 
73  void set_cutoff( core::Real cutoff_in ){
74  cutoff_ = cutoff_in;
75  }
76 
77  void set_cutoff( core::pose::Pose const & pose ) {
78  cutoff_ = get_score( pose ); }
79 
80  core::Real cutoff() const {
81  return cutoff_;
82  }
83 
85 
87 
88  void set_positions( utility::vector1< core::Size > const & positions ){
89  positions_ = positions;
90  }
91 
92  void set_unweighted( bool init ){ unweighted_ = init; }
93 
94  core::Real get_score( core::pose::Pose const & pose ) const;
95 
96 
97  virtual std::string name() const {
98  return "ScoreCutoffFilter";
99  }
100 
101  void
102  output_residue_pair_energies( std::ostream & ostr, core::pose::Pose const & pose ) const;
103 
104 private:
105 
108 
110 
112 
114  bool unweighted_; // option to NOT use scorefunction weights when accumulating score
115 
116 };
117 
118 } // filters
119 } // protocols
120 
121 #endif