Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PartialSecondarySimilarity.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/PartialSecondarySimilarity.cc
11 /// @brief scores a fragment by secondary structure similarity
12 /// but throws out the worst 20% of the residue matches
13 /// @author Robert Vernon (rvernon@u.washington.edu)
14 
15 #ifndef INCLUDED_protocols_frag_picker_scores_PartialSecondarySimilarity_hh
16 #define INCLUDED_protocols_frag_picker_scores_PartialSecondarySimilarity_hh
17 
18 // type headers
19 #include <core/types.hh>
20 
21 // package headers
25 
27 
28 #include <utility/vector1.hh>
29 
30 
31 namespace protocols {
32 namespace frag_picker {
33 namespace scores {
34 
36 
37 /// @brief scores a fragment by secondary structure similarity
38 /// @detail The score for each position is P(H), P(L) or P(E) if
39 /// a vall residue is within Helix, Loop or Extended secondary stucture element, respectively.
40 /// P(H), P(L) and P(E) denotes the probability that a given residue in a query
41 /// is within Helix, Loop or Extended secondary stucture element.
42 /// The total score of a fragment is a simple sum of all positions; for N-mer fragment is a sum of N terms\n
43 /// If P(H), P(L) and P(E) probabilities takes only 1.0 and 0.0 values, result of this scoring function
44 /// should be the same as SecondaryIdentity, although the later one is faster.
46 public:
47 
48  PartialSecondarySimilarity(Size priority, Real lowest_acceptable_value, bool use_lowest,
49  core::fragment::SecondaryStructureOP query_prediction, std::string prediction_name,
50  Size sequence_length, Size longest_vall_chunk);
51 
53 
54  void do_caching(VallChunkOP);
55 
57  void clean_up() {}
58 
59  /// @brief Computes the score
61 
62 
64 protected:
66 
67 private:
69 
73 
76 
78 };
79 
80 /// @brief Maker class that produces a new PartialSecondarySimilarity object
82 public:
83 
85  MakeFragmentScoringMethod("PartialSecondarySimilarity") {
86  }
87 
88  FragmentScoringMethodOP make(Size priority, Real lowest_acceptable_value, bool use_lowest,
89  FragmentPickerOP picker, std::string prediction_id) {
90 
91  Size sequence_length = picker->get_query_seq()->length();
92  Size vall_max_len = picker->get_vall()->get_largest_chunk_size();
93 
95  lowest_acceptable_value, use_lowest,
96  picker->get_query_ss(prediction_id),prediction_id,
97  sequence_length,vall_max_len);
98  }
99 };
100 
101 } // scores
102 } // frag_picker
103 } // protocols
104 
105 
106 #endif /* INCLUDED_protocols_frag_picker_scores_PartialSecondarySimilarity_HH */