30 #include <basic/Tracer.hh>
32 #include <utility/vector1.hh>
36 namespace frag_picker {
40 "protocols.frag_picker.scores.SecondarySimilarity");
44 Real totalScore = 0.0;
45 for (
Size i = 1; i <= f->get_length(); i++) {
49 char s(chunk->at(f->get_first_index_in_vall() + i - 1)->ss());
51 ss_weight = 1 -
query_ss_->helix_fraction(f->get_first_index_in_query() + i - 1);
53 ss_weight = 1 -
query_ss_->strand_fraction(f->get_first_index_in_query() + i - 1);
55 ss_weight = 1 -
query_ss_->loop_fraction(f->get_first_index_in_query() + i - 1);
57 totalScore += ss_weight;
59 totalScore /= (
Real) f->get_length();
60 empty_map->set_score_component(totalScore,
id_);
78 <<
" of size " << chunk->size() <<
" for fragment size "<<fl<<std::endl;
88 for (
Size j = 1; j <= chunk->size(); ++j) {
89 char s(chunk->at(j)->ss());
90 if (s ==
'H') chunk_ss_id[j] = 1;
91 if (s ==
'E') chunk_ss_id[j] = 2;
92 if (s ==
'L') chunk_ss_id[j] = 3;
96 for (
Size j = 1; j <= chunk->size(); ++j) {
101 <<
"x" << chunk->size() << std::endl;
113 Real totalScore =
cache_[f->get_length()][f->get_first_index_in_query()][f->get_first_index_in_vall()];
115 totalScore /= (
Real) f->get_length();
117 empty_map->set_score_component(totalScore,
id_);
127 "SecondarySimilarity") , prediction_name_(prediction_name) {
132 runtime_assert( query_prediction->total_residue() ==
query_len_ );
138 prow[1] = 1 - query_prediction->helix_fraction(i);
139 prow[2] = 1 - query_prediction->strand_fraction(i);
140 prow[3] = 1 - query_prediction->loop_fraction(i);