Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Phi.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/Phi.hh
11 /// @brief Object that scores a fragment by predicted Phi torsions
12 /// @author David E Kim
13 
14 #ifndef INCLUDED_protocols_frag_picker_scores_Phi_hh
15 #define INCLUDED_protocols_frag_picker_scores_Phi_hh
16 
17 // package headers
22 
23 // utility headers
24 #include <utility/exit.hh>
25 
26 // type headers
27 #include <core/types.hh>
28 
29 #include <utility/vector1.hh>
30 
31 
32 
33 namespace protocols {
34 namespace frag_picker {
35 namespace scores {
36 
37 using namespace core;
38 
39 /// @brief scores a fragment by its predicted phi similarity
40 class Phi: public CachingScoringMethod {
41 public:
42 
43  /// @brief creates a predicted phi-based scoring function.
44  Phi(Size priority, Real lowest_acceptable_value, bool use_lowest,
45  std::string & fastaQuerySequence, utility::vector1<core::Real> & query_phi_prediction,
46  utility::vector1<core::Real> & query_phi_prediction_conf) :
47  CachingScoringMethod(priority, lowest_acceptable_value, use_lowest,
48  "Phi"), query_(fastaQuerySequence) {
49 
50  if (query_.length() != query_phi_prediction.size())
51  utility_exit_with_message("Query length does not match predicted phi values");
52 
53  query_phi_prediction_ = query_phi_prediction;
54  query_phi_prediction_conf_ = query_phi_prediction_conf;
55  }
56 
57  ~Phi() {};
58 
59  void do_caching(VallChunkOP);
60  void clean_up() {};
62  bool cached_score(FragmentCandidateOP, FragmentScoreMapOP);
63 
64 private:
69 };
70 
71 /// @brief Maker class that produces a new Phi object
73 public:
74 
75  MakePhi() :
77  }
78 
79  FragmentScoringMethodOP make(Size priority, Real lowest_acceptable_value, bool use_lowest,
80  FragmentPickerOP picker, std::string) {
81  return (FragmentScoringMethodOP) new Phi(priority,
82  lowest_acceptable_value, use_lowest, picker->get_query_seq_string(), picker->get_query_phi_prediction(),
83  picker->get_query_phi_prediction_conf());
84  }
85 
86 };
87 
88 } // scores
89 } // frag_picker
90 } // protocols
91 
92 #endif // INCLUDED_protocols_frag_picker_scores_Phi_hh