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
ABEGO_SS_Score.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/ABEGO_SS_Score.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_ABEGO_SS_Score_hh
15
#define INCLUDED_protocols_frag_picker_scores_ABEGO_SS_Score_hh
16
17
// type headers
18
#include <
core/types.hh
>
19
20
// package headers
21
// AUTO-REMOVED #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 <
protocols/frag_picker/quota/ABEGO_SS_Config.hh
>
26
#include <
protocols/frag_picker/quota/ABEGO_SS_Map.hh
>
27
28
// AUTO-REMOVED #include <core/fragment/SecondaryStructure.hh>
29
30
#include <utility/vector1.hh>
31
32
33
namespace
protocols {
34
namespace
frag_picker {
35
namespace
scores {
36
37
typedef
utility::vector1<utility::vector1<Real>
>
Matrix
;
38
39
class
ABEGO_SS_Score
;
40
typedef
utility::pointer::owning_ptr< ABEGO_SS_Score >
ABEGO_SS_ScoreOP
;
41
typedef
utility::pointer::owning_ptr< ABEGO_SS_Score const >
ABEGO_SS_ScoreCOP
;
42
43
class
ABEGO_SS_Score
:
public
CachingScoringMethod
{
44
public
:
45
46
ABEGO_SS_Score
(
Size
priority,
Real
lowest_acceptable_value,
bool
use_lowest,
47
std::string
prediction_file_name,
Size
longest_vall_chunk) :
48
CachingScoringMethod
(priority, lowest_acceptable_value, use_lowest,
49
"ABEGO_SS_Score"
) {
50
51
quota::ABEGO_SS_Config
prediction_file(prediction_file_name);
52
query_len_
= prediction_file.
size
();
53
n_classes_
= prediction_file.
n_columns
();
54
for
(
Size
i = 1; i <=
query_len_
; ++i) {
55
utility::vector1<Real>
row(longest_vall_chunk);
56
scores_
.push_back(row);
57
}
58
for
(
Size
iseq=1;iseq<=
query_len_
;iseq++) {
59
utility::vector1<Real>
row;
60
for
(
Size
ibin=1;ibin<=
n_classes_
;ibin++)
61
row.push_back(prediction_file.
probability
(iseq,ibin));
62
ratios_
.push_back( row );
63
}
64
for
(
Size
ibin=1;ibin<=
n_classes_
;ibin++)
65
maps_
.push_back(
new
quota::ABEGO_SS_Map
(prediction_file.
get_pool_bins
(ibin)) );
66
}
67
68
~ABEGO_SS_Score
() {}
69
70
void
do_caching
(
VallChunkOP
);
71
bool
cached_score
(
FragmentCandidateOP
f,
FragmentScoreMapOP
empty_map);
72
void
clean_up
() {}
73
74
/// @brief Computes the score
75
virtual
bool
score
(
FragmentCandidateOP
,
FragmentScoreMapOP
);
76
77
private
:
78
Size
query_len_
;
79
Size
n_classes_
;
80
utility::vector1<quota::ABEGO_SS_MapOP>
maps_
;
81
utility::vector1< utility::vector1<Real>
>
ratios_
;
82
std::string
cached_scores_id_
;
83
Matrix
scores_
;
84
};
85
86
/// @brief Maker class that produces a new ABEGO_SS_Score object
87
class
MakeABEGO_SS_Score
:
public
MakeFragmentScoringMethod
{
88
public
:
89
90
MakeABEGO_SS_Score
() :
91
MakeFragmentScoringMethod
(
"ABEGO_SS_Score"
) {
92
}
93
94
FragmentScoringMethodOP
make
(
Size
,
Real
,
bool
,
95
FragmentPickerOP
,
std::string
);
96
};
97
98
}
// scores
99
}
// frag_picker
100
}
// protocols
101
102
103
#endif
/* INCLUDED_protocols_frag_picker_scores_ABEGO_SS_Score_HH */
Generated on Sat Jun 1 2013 11:52:34 for Rosetta 3.5 by
1.8.4