Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RamaScore.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/RamaScore.hh
11 /// @brief a base class for fragment scoring
12 /// @author Dominik Gront (dgront@chem.uw.edu.pl)
13 
14 #ifndef INCLUDED_protocols_frag_picker_scores_RamaScore_hh
15 #define INCLUDED_protocols_frag_picker_scores_RamaScore_hh
16 
17 // type headers
18 #include <core/types.hh>
19 
20 // package headers
23 
26 
28 
29 namespace protocols {
30 namespace frag_picker {
31 namespace scores {
32 
33 
34 class RamaScore;
37 
38 /// @brief RamaScore score counts identical residues
39 /// @detailed Resulting score is the number of identical residues
40 /// on corresponding positions in a vall fragment and a query sequence
42 public:
43 
45 
47 
48  void SetupRamaTables();
49 
50  void do_caching(VallChunkOP);
51  void clean_up();
52 
53  bool score(FragmentCandidateOP f, FragmentScoreMapOP empty_map);
55 
56  /// @brief prints a detailed explanation how a fragment score has been computed
57  /// @detailed besides extensive output, the method should return the same result as score()
59  std::ostream& out);
60 
62 
63 private:
68 
70 
72 
73  //Sequence Specific Ramachandran Surfaces (keep only one copy of this so we don't have to keep reading it from the database for each instance)
75 
76 };
77 
78 /// @brief Maker class that produces a new RamaScore object
80 public:
81 
83  MakeFragmentScoringMethod("RamaScore") {
84  }
85 
86  FragmentScoringMethodOP make(Size priority, Real lowest_acceptable_value, bool use_lowest,
87  FragmentPickerOP picker, std::string prediction_id ) {
88 
89  if ( prediction_id == "" ) {
91  Size query_len = picker->get_query_seq_string().size();
92  default_ss->extend( query_len );
93  for ( Size i = 1; i <= query_len; ++i ) {
94  default_ss->set_fractions(i, 0.333, 0.333, 0.334);
95  }
96 
97  // std::cout << "CO_PREDICTION_ID " << prediction_id << std::endl;
98  std::string default_prediction_name("uniform_default");
99  return (FragmentScoringMethodOP) new RamaScore(priority,
100  lowest_acceptable_value, use_lowest, picker->get_query_seq_string(), default_ss,default_prediction_name);
101  } else {
102 
103  //std::cout << "PREDICTION_ID " << prediction_id << std::endl;
104  return (FragmentScoringMethodOP) new RamaScore(priority,
105  lowest_acceptable_value, use_lowest, picker->get_query_seq_string(), picker->get_query_ss(prediction_id),prediction_id);
106  }
107  }
108 };
109 
110 } // scores
111 } // frag_picker
112 } // protocols
113 
114 
115 #endif /* INCLUDED_protocols_frag_picker_scores_RamaScore_HH */