Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MatchPositionModifiers.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 // :noTabs=false:tabSize=4:indentSize=4:
4 //
5 // (c) Copyright Rosetta Commons Member Institutions.
6 // (c) This file is part of the Rosetta software suite and is made available under license.
7 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
8 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
9 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
10 
11 /// @file protocols/match/MatchPositionModifiers.hh
12 /// @brief header file for MatchPositionModifiers
13 /// @author Florian Richter (floric@u.washington.edu ), may 2010
14 
15 #ifndef INCLUDED_protocols_match_MatchPositionModifiers_hh
16 #define INCLUDED_protocols_match_MatchPositionModifiers_hh
17 
18 // unit headers
20 #include <utility/pointer/ReferenceCount.hh>
21 
22 //package headers
24 
25 //project headers
27 #include <core/pose/Pose.fwd.hh>
28 #include <core/types.hh>
29 
30 // utility headers
31 #include <utility/vector1.hh>
32 
33 // C++ headers
34 #include <set>
35 
36 namespace protocols {
37 namespace match {
38 
39 /// @brief "factory" function to create the match position modifiers
42  std::string const mpm_name,
43  core::Size geom_cst,
44  utility::vector1< std::string > const & input_tokens );
45 
46 /// @brief base class for objects that modify the match positions based
47 /// on some criterion
49 
50 public:
52 
53  virtual ~MatchPositionModifier();
54 
55  /// @brief the positions in the vector1< Size > that is returned
56  /// by this function will replace the match positions in the MatcherTask.
57  virtual
60  utility::vector1< core::Size > const & original_positions,
61  core::pose::Pose const & match_pose,
63  ) const = 0;
64 
65 };
66 
67 /// @brief removes positions at which the pose does not have the
68 /// desired secondary structure
70 
71 public:
73 
75 
76  virtual
79  utility::vector1< core::Size > const & original_positions,
80  core::pose::Pose const & match_pose,
82  ) const;
83 
84 private:
85 
86  std::set< char > desired_ss_chars_;
88 
89 };
90 
91 /// @brief removes positions whose numer of neighbors
92 /// below a 10A cutoff is not within the desired range.
93 /// if either min_neighbors_ or max_neighbors_ are unspecified (0),
94 /// this means that they won't be taken into account, i.e.
95 /// if min is 5 and max is 0, every position that has
96 /// more than 4 neighbors will be allowed.
97 /// also offers the possibility of combining the num neighbors
98 /// cutoff with the angle between the CA->CB vector of the residue
99 /// and the CA->protein_center_of_mass vector, for example to
100 /// only allow positions that point inward
102 
103 public:
104  NumNeighborsMPM( utility::vector1< std::string > const & input_tokens );
105 
107 
108  virtual
111  utility::vector1< core::Size > const & original_positions,
112  core::pose::Pose const & match_pose,
114  ) const;
115 
116  bool
118  core::Size seqpos,
119  core::pose::Pose const & pose,
120  core::Vector const & com
121  ) const;
122 
123 private:
124 
126 
127  bool com_vector_criterion_; //whether to use center of mass vector
128  bool both_criteria_needed_to_pass_; //if fullfilling the com vector criterion and the num neighbors criterion is necessary for a position to pass
130 
131 };
132 
133 
134 /// @brief removes positions at which the bfactors for
135 /// c-alpha atoms are above a desired cutoff. bfactors
136 /// stored in the pose pdbinfo are taken.
137 /// if relative bfactors are used, all bfactors are divided
138 /// by the largest observed bfactor
140 
141 public:
142  BfactorMPM( utility::vector1< std::string > const & input_tokens );
143 
144  ~BfactorMPM();
145 
146  virtual
149  utility::vector1< core::Size > const & original_positions,
150  core::pose::Pose const & match_pose,
152  ) const;
153 
155  get_ca_bfactors( core::pose::Pose const & pose ) const;
156 
157 private:
158 
160  mutable bool all_bfactors_zero_; //safeguard against pdbs that had their bfactors wiped
162 
163 };
164 
165 /// @brief MPM that returns a vector of all protein positions in the pose
166 /// i.e. allowing matching everywhere
168 
169 public:
171 
173 
174  virtual
177  utility::vector1< core::Size > const & original_positions,
178  core::pose::Pose const & match_pose,
180  ) const;
181 
182 
183 private:
184 
185 };
186 
187 /// @brief added by olga and flo 1/2011
188 /// class to exclude positions at the n and c termini of proteins from matching
190 
191 public:
192 
193  RemoveNorCTermMPM( utility::vector1< std::string > const & input_tokens );
194 
196 
197  virtual
200  utility::vector1< core::Size > const & original_positions,
201  core::pose::Pose const & match_pose,
203  ) const;
204 
205 
206 private:
208 
209 };
210 
211 /// @brief mpm that will get a task operation as specified in the tag
212 /// from the TaskOperationFactory, apply the task operation to the pose
213 /// and every residue that is then set to designing in the task will be
214 /// a match position
216 
217 public:
218 
220  core::Size geom_cst,
221  utility::vector1< std::string > const & input_tokens
222  );
223 
225 
226  virtual
229  utility::vector1< core::Size > const & original_positions,
230  core::pose::Pose const & match_pose,
232  ) const;
233 
234 
235 private:
238 };
239 
240 
241 }
242 }
243 
244 #endif