Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TorsionBinSimilarity.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/TorsionBin.hh
11 /// @brief scores a fragment based on scores for a probability over torsion bins.
12 /// @author James Thompson
13 
14 #ifndef INCLUDED_protocols_frag_picker_scores_TorsionBinSimilarity_hh
15 #define INCLUDED_protocols_frag_picker_scores_TorsionBinSimilarity_hh
16 
17 // type headers
18 #include <core/types.hh>
19 
22 #include <utility/vector1_bool.hh>
23 #include <iostream>
24 
25 #include <utility/vector1.hh>
26 
27 
28 
29 
30 namespace protocols {
31 namespace frag_picker {
32 namespace scores {
33 
35 
39 
40 /// @brief scores a fragment by torsion bin similarity
42 public:
43 
45  Size priority,
46  Real lowest_acceptable_value,
47  bool use_lowest,
49  Size sequence_length,
50  Size longest_vall_chunk
51  ) :
53  priority, lowest_acceptable_value, use_lowest,
54  "TorsionBin"
55  ),
56  query_len_( sequence_length ),
57  query_bin_probs_( query_bin_probs )
58  {
59  for ( Size i = 1; i <= query_len_; ++i ) {
60  utility::vector1< Real > row(longest_vall_chunk);
61  scores_.push_back(row);
62  }
63  }
64 
65  void do_caching(VallChunkOP);
66 
67  void clean_up() {};
68 
69  /// @brief Computes the score
71 
72 private:
73  char torsion2big_bin_(
74  core::Real const phi,
75  core::Real const psi,
76  core::Real const omega
77  ) const;
78 
79  Size bin_index_( char const bin_name ) const;
80 
81 protected:
83 
84 private:
89 }; // TorsionBinSimilarity
90 
91 /// @brief Maker class that produces a new TorsionBin object
93 public:
94 
96  MakeFragmentScoringMethod("TorsionBinSimilarity")
97  {}
98 
100  Size priority,
101  Real lowest_acceptable_value,
102  bool use_lowest,
103  FragmentPickerOP picker,
104  std::string /* prediction_id */
105  );
106 };
107 
108 } // scores
109 } // frag_picker
110 } // protocols
111 
112 #endif /* INCLUDED_protocols_frag_picker_scores_TorsionBin_HH */