Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SolventAccessibility.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/SolventAccessibility.hh
11 /// @brief Object that scores a fragment by predicted solvent accessibility
12 /// @author David E Kim
13 
14 #ifndef INCLUDED_protocols_frag_picker_scores_SolventAccessibility_hh
15 #define INCLUDED_protocols_frag_picker_scores_SolventAccessibility_hh
16 
17 // package headers
23 
24 // utility headers
25 #include <utility/exit.hh>
26 
27 // type headers
28 #include <core/types.hh>
29 
30 #include <utility/vector1.hh>
31 
32 
33 
34 namespace protocols {
35 namespace frag_picker {
36 namespace scores {
37 
38 using namespace core;
39 
40 /// @brief scores a fragment by its predicted solvent accessibility
42 public:
43 
44  /// @brief creates a predicted solvent accessibility based scoring function.
45  SolventAccessibility(Size priority, Real lowest_acceptable_value, bool use_lowest,
46  std::string & fastaQuerySequence, utility::vector1<core::Real> & predicted_sa) :
47  CachingScoringMethod(priority, lowest_acceptable_value, use_lowest,
48  "SolventAccessibility"), query_(fastaQuerySequence) {
49 
50  if (query_.length() != predicted_sa.size())
51  utility_exit_with_message("Query length does not match predicted solvent accessiblity");
52 
53  // get normalized ASA values
54  // just divide by the maximum values from Faraggi et al. Proteins 2008 (Table II)
55  for (Size i=1;i<=predicted_sa.size();++i)
56  predicted_sa_norm_.push_back( predicted_sa[i]/protocols::frag_picker::sa_faraggi_max( query_[i-1] ) );
57  }
58 
60 
61  void do_caching(VallChunkOP);
62  void clean_up() {};
64  bool cached_score(FragmentCandidateOP, FragmentScoreMapOP);
65 
66 private:
70 };
71 
72 /// @brief Maker class that produces a new SolventAccessibility object
74 public:
75 
77  MakeFragmentScoringMethod("SolventAccessibility") {
78  }
79 
80  FragmentScoringMethodOP make(Size priority, Real lowest_acceptable_value, bool use_lowest,
81  FragmentPickerOP picker, std::string) {
82  return (FragmentScoringMethodOP) new SolventAccessibility(priority,
83  lowest_acceptable_value, use_lowest, picker->get_query_seq_string(), picker->get_query_sa_prediction());
84  }
85 
86 };
87 
88 } // scores
89 } // frag_picker
90 } // protocols
91 
92 #endif // INCLUDED_protocols_frag_picker_scores_SolventAccessibility_hh