27 #include <basic/Tracer.hh>
33 #include <basic/options/keys/OptionKeys.hh>
36 #include <basic/prof.hh>
38 #include <utility/vector1.hh>
42 namespace frag_picker {
45 using namespace basic::options;
46 using namespace basic::options::OptionKeys;
49 "protocols.frag_picker.scores.ProfileScoreDistWeight");
54 if (tmp.compare(cached_scores_id_) == 0)
56 cached_scores_id_ = tmp;
60 <<
" of size " << chunk->size() << std::endl;
61 PROF_START( basic::FRAGMENTPICKING_PROFILE_CAHING );
64 for (
Size i = 0; i < query_sequence_.length(); ++i) {
67 Size seqpos_res_id(aa_order_map_.find(query_sequence_[i])->second);
70 for (
Size j = 1; j <= chunk->size(); ++j) {
76 Size tmplt_res_id (aa_order_map_.find(chunk->at(j)->aa())->second);
78 for (
Size s = 1; s <= 3; s++) {
81 ss_weight = query_ss_->helix_fraction(i+1);
83 ss_weight = query_ss_->strand_fraction(i+1);
85 ss_weight = query_ss_->loop_fraction(i+1);
94 Real distance_weight(0.0);
96 distance_weight = distance_weights_[s][seqpos_res_id][tmplt_res_id];
97 score += ss_weight*distance_weight;
109 scores_[i+1][j] = score;
113 PROF_STOP( basic::FRAGMENTPICKING_PROFILE_CAHING );
115 <<
"x" << chunk->size() << std::endl;
121 if (tmp.compare(cached_scores_id_) != 0)
122 do_caching(f->get_chunk());
124 Real totalScore = 0.0;
125 for (
Size i = 1; i <= f->get_length(); i++) {
126 assert(f->get_first_index_in_query() + i - 1 <= scores_.size());
127 assert(f->get_first_index_in_vall()
128 + i - 1<= scores_[1].size());
129 totalScore += scores_[f->get_first_index_in_query() + i - 1][f->get_first_index_in_vall() + i - 1];
132 totalScore *= (
Real) 100.0;
133 totalScore /= (
Real) f->get_length();
134 empty_map->set_score_component(totalScore, id_);
135 if ((totalScore < lowest_acceptable_value_) && (use_lowest_ ==
true))
147 Size len = picker->get_vall()->get_largest_chunk_size();
159 lowest_acceptable_value, use_lowest, picker->get_query_seq(), picker->get_query_ss(prediction_id),picker->get_query_seq_string(),len);