Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HydrophobicitySimilarity.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/frag_picker/scores/HydrophobicitySimilarity.hh
11 /// @brief Object that scores a fragment by hydrophobicity
12 /// @author David E Kim
13 
14 #ifndef INCLUDED_protocols_frag_picker_scores_HydrophobicitySimilarity_hh
15 #define INCLUDED_protocols_frag_picker_scores_HydrophobicitySimilarity_hh
16 
17 // package headers
22 
23 // type headers
24 #include <core/types.hh>
25 
26 #include <map>
27 
28 #include <utility/vector1.hh>
29 
30 
31 namespace protocols {
32 namespace frag_picker {
33 namespace scores {
34 
35 
36 /// @brief scores a fragment by its hydrophobicity similarity
38 public:
39 
40  /// @brief creates a hydrophobicity-based scoring function.
41  HydrophobicitySimilarity(Size priority, Real lowest_acceptable_value, bool use_lowest,
42  std::string & fastaQuerySequence) :
43  CachingScoringMethod(priority, lowest_acceptable_value, use_lowest,
44  "HydrophobicitySimilarity"), query_(fastaQuerySequence) {
45 
46  // initialize hydrophobic aa map
47  // V, I, L, F, Y, W, M
48  if (is_hydrophobic_.empty()) {
49  is_hydrophobic_['A'] = false;
50  is_hydrophobic_['C'] = false;
51  is_hydrophobic_['D'] = false;
52  is_hydrophobic_['E'] = false;
53  is_hydrophobic_['F'] = true;
54  is_hydrophobic_['G'] = false;
55  is_hydrophobic_['H'] = false;
56  is_hydrophobic_['I'] = true;
57  is_hydrophobic_['K'] = false;
58  is_hydrophobic_['L'] = true;
59  is_hydrophobic_['M'] = true;
60  is_hydrophobic_['N'] = false;
61  is_hydrophobic_['P'] = false;
62  is_hydrophobic_['Q'] = false;
63  is_hydrophobic_['R'] = false;
64  is_hydrophobic_['S'] = false;
65  is_hydrophobic_['T'] = false;
66  is_hydrophobic_['V'] = true;
67  is_hydrophobic_['W'] = true;
68  is_hydrophobic_['Y'] = true;
69  is_hydrophobic_['a'] = false;
70  is_hydrophobic_['c'] = false;
71  is_hydrophobic_['d'] = false;
72  is_hydrophobic_['e'] = false;
73  is_hydrophobic_['f'] = true;
74  is_hydrophobic_['g'] = false;
75  is_hydrophobic_['h'] = false;
76  is_hydrophobic_['i'] = true;
77  is_hydrophobic_['k'] = false;
78  is_hydrophobic_['l'] = true;
79  is_hydrophobic_['m'] = true;
80  is_hydrophobic_['n'] = false;
81  is_hydrophobic_['p'] = false;
82  is_hydrophobic_['q'] = false;
83  is_hydrophobic_['r'] = false;
84  is_hydrophobic_['s'] = false;
85  is_hydrophobic_['t'] = false;
86  is_hydrophobic_['v'] = true;
87  is_hydrophobic_['w'] = true;
88  is_hydrophobic_['y'] = true;
89  }
90 
91  }
92 
94 
95  void do_caching(VallChunkOP);
96  void clean_up() {};
99 
100 private:
103  static std::map<char,bool> is_hydrophobic_;
104 };
105 
106 /// @brief Maker class that produces a new HydrophobicitySimilarity object
108 public:
109 
111  MakeFragmentScoringMethod("HydrophobicitySimilarity") {
112  }
113 
114  FragmentScoringMethodOP make(Size priority, Real lowest_acceptable_value, bool use_lowest,
115  FragmentPickerOP picker, std::string) {
117  lowest_acceptable_value, use_lowest, picker->get_query_seq_string());
118  }
119 
120 };
121 
122 } // scores
123 } // frag_picker
124 } // protocols
125 
126 #endif // INCLUDED_protocols_frag_picker_scores_HydrophobicitySimilarity_hh