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
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
21
#include <
protocols/frag_picker/FragmentPicker.hh
>
22
#include <
protocols/frag_picker/scores/FragmentScoreMap.hh
>
23
#include <
protocols/frag_picker/scores/CachingScoringMethod.hh
>
24
25
#include <
core/fragment/SecondaryStructure.hh
>
26
27
#include <utility/vector1.hh>
28
29
30
namespace
protocols {
31
namespace
frag_picker {
32
namespace
scores {
33
34
typedef
utility::vector1<utility::vector1<Real>
>
Matrix
;
35
36
class
SecondarySimilarity
;
37
typedef
utility::pointer::owning_ptr< SecondarySimilarity >
SecondarySimilarityOP
;
38
typedef
utility::pointer::owning_ptr< SecondarySimilarity const >
SecondarySimilarityCOP
;
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.
48
class
SecondarySimilarity
:
public
CachingScoringMethod
{
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
55
~SecondarySimilarity
() {}
56
57
void
do_caching
(
VallChunkOP
);
58
void
do_caching_simple
(
VallChunkOP
);
59
bool
cached_score
(
FragmentCandidateOP
f,
FragmentScoreMapOP
empty_map);
60
void
clean_up
() {}
61
62
/// @brief Computes the score
63
virtual
bool
score
(
FragmentCandidateOP
,
FragmentScoreMapOP
);
64
65
/// @brief returns the secondary structure porediction object that is used by this score
66
inline
core::fragment::SecondaryStructureOP
get_secondary_prediction
() {
return
query_ss_
; }
67
68
inline
std::string
&
get_prediction_name
() {
return
prediction_name_
; };
69
protected
:
70
Matrix
scores_
;
71
utility::vector1< Matrix >
cache_
;
72
private
:
73
std::string
prediction_name_
;
74
core::fragment::SecondaryStructureOP
query_ss_
;
75
utility::vector1< utility::vector1< Real >
>
raw_probs_
;
76
Size
query_len_
;
77
78
std::string
cached_scores_id_
;
79
};
80
81
/// @brief Maker class that produces a new SecondarySimilarity object
82
class
MakeSecondarySimilarity
:
public
MakeFragmentScoringMethod
{
83
public
:
84
85
MakeSecondarySimilarity
() :
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 */
Generated on Sat Jun 1 2013 11:53:05 for Rosetta 3.5 by
1.8.4