Rosetta 3.5
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
protocols
frag_picker
scores
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
22
#include <
protocols/frag_picker/FragmentPicker.hh
>
23
#include <
protocols/frag_picker/scores/FragmentScoreMap.hh
>
24
#include <
protocols/frag_picker/scores/CachingScoringMethod.hh
>
25
26
#include <
core/fragment/SecondaryStructure.hh
>
27
28
#include <utility/vector1.hh>
29
30
31
namespace
protocols {
32
namespace
frag_picker {
33
namespace
scores {
34
35
typedef
utility::vector1<utility::vector1<Real>
>
Matrix
;
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.
45
class
PartialSecondarySimilarity
:
public
CachingScoringMethod
{
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
52
~PartialSecondarySimilarity
() {}
53
54
void
do_caching
(
VallChunkOP
);
55
56
bool
cached_score
(
FragmentCandidateOP
f,
FragmentScoreMapOP
empty_map);
57
void
clean_up
() {}
58
59
/// @brief Computes the score
60
virtual
bool
score
(
FragmentCandidateOP
,
FragmentScoreMapOP
);
61
62
63
inline
std::string
&
get_prediction_name
() {
return
prediction_name_
; };
64
protected
:
65
Matrix
scores_
;
66
67
private
:
68
std::string
prediction_name_
;
69
70
utility::vector1< Real >
norm_query_H_
;
71
utility::vector1< Real >
norm_query_E_
;
72
utility::vector1< Real >
norm_query_L_
;
73
74
utility::vector1< utility::vector1< Real >
>
raw_probs_
;
75
Size
query_len_
;
76
77
std::string
cached_scores_id_
;
78
};
79
80
/// @brief Maker class that produces a new PartialSecondarySimilarity object
81
class
MakePartialSecondarySimilarity
:
public
MakeFragmentScoringMethod
{
82
public
:
83
84
MakePartialSecondarySimilarity
() :
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
94
return
(
FragmentScoringMethodOP
)
new
PartialSecondarySimilarity
(priority,
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 */
Generated on Sat Jun 1 2013 11:53:02 for Rosetta 3.5 by
1.8.4