Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SecondarySimilarity.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/SecondarySimilarity.hh
11 /// @brief scores a fragment by secondary structure similarity
12 /// @author Dominik Gront (dgront@chem.uw.edu.pl)
13 
14 #ifndef INCLUDED_protocols_frag_picker_scores_SecondarySimilarity_hh
15 #define INCLUDED_protocols_frag_picker_scores_SecondarySimilarity_hh
16 
17 // type headers
18 #include <core/types.hh>
19 
20 // package headers
24 
26 
27 #include <utility/vector1.hh>
28 
29 
30 namespace protocols {
31 namespace frag_picker {
32 namespace scores {
33 
35 
39 
40 /// @brief scores a fragment by secondary structure similarity
41 /// @detail The score for each position is P(H), P(L) or P(E) if
42 /// a vall residue is within Helix, Loop or Extended secondary stucture element, respectively.
43 /// P(H), P(L) and P(E) denotes the probability that a given residue in a query
44 /// is within Helix, Loop or Extended secondary stucture element.
45 /// The total score of a fragment is a simple sum of all positions; for N-mer fragment is a sum of N terms\n
46 /// If P(H), P(L) and P(E) probabilities takes only 1.0 and 0.0 values, result of this scoring function
47 /// should be the same as SecondaryIdentity, although the later one is faster.
49 public:
50 
51  SecondarySimilarity(Size priority, Real lowest_acceptable_value, bool use_lowest,
52  core::fragment::SecondaryStructureOP query_prediction, std::string prediction_name,
53  Size sequence_length, utility::vector1<Size> & frag_sizes, Size longest_vall_chunk);
54 
56 
57  void do_caching(VallChunkOP);
60  void clean_up() {}
61 
62  /// @brief Computes the score
64 
65  /// @brief returns the secondary structure porediction object that is used by this score
67 
69 protected:
72 private:
77 
79 };
80 
81 /// @brief Maker class that produces a new SecondarySimilarity object
83 public:
84 
86  MakeFragmentScoringMethod("SecondarySimilarity") {
87  }
88 
89  FragmentScoringMethodOP make(Size priority, Real lowest_acceptable_value, bool use_lowest,
90  FragmentPickerOP picker, std::string prediction_id) {
91 
92  Size sequence_length = picker->get_query_seq()->length();
93  Size vall_max_len = picker->get_vall()->get_largest_chunk_size();
94 
95  return (FragmentScoringMethodOP) new SecondarySimilarity(priority,
96  lowest_acceptable_value, use_lowest,
97  picker->get_query_ss(prediction_id),prediction_id,
98  sequence_length,picker->frag_sizes_,vall_max_len);
99  }
100 };
101 
102 } // scores
103 } // frag_picker
104 } // protocols
105 
106 
107 #endif /* INCLUDED_protocols_frag_picker_scores_SecondarySimilarity_HH */