Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SequenceIdentity.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/SequenceIdentity.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_SequenceIdentity_hh
15 #define INCLUDED_protocols_frag_picker_scores_SequenceIdentity_hh
16 
17 // type headers
18 #include <core/types.hh>
19 
20 // package headers
24 
25 #include <utility/vector1.hh>
26 
27 
28 namespace protocols {
29 namespace frag_picker {
30 namespace scores {
31 
32 /// @brief SequenceIdentity score counts identical residues
33 /// @detailed Resulting score is the number of identical residues
34 /// on corresponding positions in a vall fragment and a query sequence
36 public:
37  /// @brief will be added if the two residues are identical
38  static const int REWARD = 0;
39  /// @brief will be added if the two residues are NOT identical
40  static const int PENALTY = 1;
41 
42  SequenceIdentity(Size priority, Real lowest_acceptable_value, bool use_lowest,
43  std::string & fastaQuerySequence) :
44  FragmentScoringMethod(priority, lowest_acceptable_value, use_lowest,
45  "SequenceIdentity"), query_(fastaQuerySequence) {
46  }
47 
48  bool score(FragmentCandidateOP f, FragmentScoreMapOP empty_map);
49 
50  /// @brief prints a detailed explanation how a fragment score has been computed
51  /// @detailed besides extensive output, the method should return the same result as score()
53  std::ostream& out);
54 
55 private:
58 };
59 
60 /// @brief Maker class that produces a new SequenceIdentity object
62 public:
63 
65  MakeFragmentScoringMethod("SequenceIdentity") {
66  }
67 
68  FragmentScoringMethodOP make(Size priority, Real lowest_acceptable_value, bool use_lowest,
69  FragmentPickerOP picker, std::string) {
70  return (FragmentScoringMethodOP) new SequenceIdentity(priority,
71  lowest_acceptable_value, use_lowest, picker->get_query_seq_string());
72  }
73 };
74 
75 } // scores
76 } // frag_picker
77 } // protocols
78 
79 
80 #endif /* INCLUDED_protocols_frag_picker_scores_SequenceIdentity_HH */