Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
IdentityEval.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 core/fragment/picking_old/vall/eval/IdentityEval.hh
11 /// @brief scores a fragment based on secondary structure identity and sequence identity
12 /// @author Yih-En Andrew Ban (yab@u.washington.edu)
13 
14 #ifndef INCLUDED_core_fragment_picking_old_vall_eval_IdentityEval_hh
15 #define INCLUDED_core_fragment_picking_old_vall_eval_IdentityEval_hh
16 
17 
18 // unit headers
20 
21 // type headers
22 #include <core/types.hh>
23 
24 // package headers
27 
28 #include <utility/vector1.hh>
29 
30 
31 // C++ headers
32 
33 
34 namespace core {
35 namespace fragment {
36 namespace picking_old {
37 namespace vall {
38 namespace eval {
39 
40 
41 /// @brief scores a fragment based on sum of secondary structure identity and sequence identity
43 
44 
45 private: // typedefs
46 
47 
49 
50 
51 public: // typedefs
52 
53 
55 
57  typedef core::Real Real;
58 
59 
60 public: // concept typedefs
61 
62 
63  /// @brief typedef for ExtentEvaluator concept
65 
66 
67  /// @brief typedef for ExtentEvaluator concept
69 
70 
71 public: // concept translation typedefs
72 
73 
75 
76 
77 public: // construct/destruct
78 
79 
80  /// @brief default constructor
81  IdentityEval();
82 
83 
84  /// @brief full values constructor
85  /// @param ss secondary structure string to match against
86  /// @param aa amino acid structure string to match against
88  String const & ss,
89  String const & aa,
90  Real const ss_penalty = 1.0,
91  Real const aa_penalty = 1.0,
92  bool const randomize = true
93  );
94 
95 
96  /// @brief secondary structure constructor
98  String const & ss,
99  Real const ss_penalty = 1.0,
100  bool const randomize = true
101  );
102 
103 
104  /// @brief default copy constructor
105  IdentityEval( IdentityEval const & rval );
106 
107 
108  /// @brief default destructor
109  virtual
110  ~IdentityEval();
111 
112 
113 public: // copy assignment
114 
115 
116  /// @brief copy assignment
117  IdentityEval & operator =( IdentityEval const & rval );
118 
119 
120 public: // virtual constructors
121 
122 
123  /// @brief clone this object
124  virtual
125  VallFragmentEvalOP clone() const;
126 
127 
128 public: // virtual evaluation methods
129 
130 
131  /// @brief for a fragment extent, evaluate and store results in a VallFragmentScore
132  /// @return true, so score is always stored during VallLibrarian::catalog()
133  virtual
134  bool eval_impl(
135  Extent const & extent,
136  VallFragmentScore & fs
137  );
138 
139 
140 public: // accessor/mutators
141 
142 
143  /// @brief get secondary structure string
144  inline
145  String const & ss_str() const {
146  return ss_;
147  }
148 
149 
150  /// @brief set secondary structure string
151  inline
152  void ss_str( String const & ss ) {
153  ss_ = ss;
154  }
155 
156 
157  /// @brief get amino acid string
158  inline
159  String const & aa_str() const {
160  return aa_;
161  }
162 
163 
164  /// @brief set amino acid string
165  inline
166  void aa_str( String const & aa ) {
167  aa_ = aa;
168  }
169 
170 
171  /// @brief get secondary structure penalty
172  inline
173  Real ss_penalty() const {
174  return ss_penalty_;
175  }
176 
177 
178  /// @brief set secondary structure penalty
179  inline
180  void ss_penalty( Real const penalty ) {
181  ss_penalty_ = penalty;
182  }
183 
184 
185  /// @brief get amino acid penalty
186  inline
187  Real aa_penalty() const {
188  return aa_penalty_;
189  }
190 
191 
192  /// @brief set amino acid penalty
193  inline
194  void aa_penalty( Real const penalty ) {
195  aa_penalty_ = penalty;
196  }
197 
198 
199  /// @brief adding random noise to score?
200  inline
201  bool randomize() const {
202  return randomize_;
203  }
204 
205 
206  /// @brief set flag to add random noise between [0, 0.001) to score
207  inline
208  void randomize( bool const flag ) {
209  randomize_ = flag;
210  }
211 
212 
213 public: // additional hooks
214 
215 
216  /// @brief operation to be perform before catalog() starts
217  virtual
218  void pre_catalog_op( VallLibrary const & );
219 
220 
221 private: // data
222 
223 
224  /// @brief secondary structure string to match against
226 
227 
228  /// @brief amino acid string to match against
230 
231 
232  /// @brief secondary structure penalty if non-matching
234 
235 
236  /// @brief amino acid penalty if non-matching
238 
239 
240  /// @brief flag to add random noise between [0, 0.001) into score
242 
243 
244 };
245 
246 
247 } // namespace eval
248 } // namespace vall
249 } // namespace picking_old
250 } // namespace fragment
251 } // namespace core
252 
253 
254 #endif /* INCLUDED_core_fragment_picking_old_vall_eval_IdentityEval_HH */