Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PackerNeighborGraphFilter.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/PackerNeighborGraphFilter.hh
11 /// @brief header file for packer neighbor graph based filter
12 /// @detailed
13 ///
14 ///
15 ///
16 /// @author Florian Richter, floric@u.washington.edu (march 09 )
17 
18 #ifndef INCLUDED_protocols_simple_filters_PackerNeighborGraphFilter_hh
19 #define INCLUDED_protocols_simple_filters_PackerNeighborGraphFilter_hh
20 
21 // Unit Headers
23 
24 // Project Headers
25 //#include <core/graph/Graph.fwd.hh>
28 #include <core/types.hh>
29 
30 
31 // Utility headers
32 //#include <utility/pointer/ReferenceCount.hh>
33 // AUTO-REMOVED #include <utility/vector1.hh>
34 
35 //// C++ headers
36 #include <string>
37 #include <set>
38 #include <map>
39 
40 #include <utility/vector1.hh>
41 
42 
43 namespace protocols {
44 namespace simple_filters {
45 
46 
47 
48 /// @details helper class for PackerNeighborGraphFilter
50 
51 public:
52 
54  std::set< core::Size > const & reg1,
55  std::set< core::Size > const & reg2,
56  core::Size required_cons
57  ) : region1_( reg1 ), region2_( reg2 ), required_connections_( required_cons ), num_cons_( 0 )
58  {}
59 
60  std::set< core::Size > const &
61  region1() const {
62  return region1_; }
63 
64  std::set< core::Size > const &
65  region2() const {
66  return region2_; }
67 
68  bool
70  return (required_connections_ <= num_cons_); }
71 
72  //core::Size
73  //num_connections() const {
74  // return num_connections_; }
75 
76  void
78  num_cons_ = 0; }
79 
80  void
82  core::Size res1,
83  core::Size res2
84  ) const;
85 
86 private:
87  std::set< core::Size > region1_;
88  std::set< core::Size > region2_;
89 
91 
93 
94 };
95 
96 /// @details filter that creates a packer neighbor graph of the pose
97 /// @details in every apply function and returns true if this graph
98 /// @details satisfies a specified connectivity
100 
101 public:
102 
106  ) : task_( task ), sfxn_( sfxn ), task_invalidated_( false ) {}
107 
108 
110 
112 
113 
115  return new PackerNeighborGraphFilter( *this ); }
116 
118  return new PackerNeighborGraphFilter(); }
119 
120 
121 
122  /// @brief Returns true if the given pose passes the filter, false otherwise.
123  virtual bool apply( core::pose::Pose const & pose ) const;
124 
125  virtual
126  std::string name() const { return "PackerNeighborGraphFilter"; }
127 
128  void
130  task_ = task; }
131 
132  /// @brief note: will overwrite if information for this residue has already been entered
133  void
135  core::Size residue,
136  core::Size required_connections
137  );
138 
139  /// @brief note: will increase required connections for this residue by 1
140  void
142  core::Size residue
143  );
144 
145  void
147  std::set< core::Size > const & region1,
148  std::set< core::Size > const & region2,
149  core::Size required_connections
150  );
151 
152 
153 private:
154 
157 
158  std::map< core::Size, core::Size > required_connections_per_res_;
159 
161 
163 
164 };
165 
166 
169 
170 } // filters
171 } // protocols
172 
173 #endif