Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Phi.cc
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 && 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/Phi.cc
11 /// @brief a base class for fragment scoring
12 /// @author David E Kim
13 
15 
16 // type headers
17 #include <core/types.hh>
18 
19 // package headers
23 
24 namespace protocols {
25 namespace frag_picker {
26 namespace scores {
27 
28 static const core::Real PHI_MIN_CONF = 0.5;
29 
30 void Phi::do_caching(VallChunkOP current_chunk) {
31  std::string ctmp = current_chunk()->chunk_key();
32  if (ctmp.compare("change to 'cached_scores_id_' when ready") != 0) {
33  return; // CACHING NOT BUILT IN YET
34  }
35 }
36 
38  FragmentScoreMapOP scores) {
39 
40  return score( fragment, scores );
41 
42 }
43 
45  FragmentScoreMapOP empty_map) {
46  Real totalScore = 0;
47  Size conf_positions = 0;
48  for (Size i = 1; i <= f->get_length(); i++) {
49  // skip low confidence positions
50  Size qindex = i + f->get_first_index_in_query() - 1;
51  VallResidueOP r = f->get_residue(i);
52  //if (query_phi_prediction_conf_[qindex] < PHI_MIN_CONF) continue;
53  // skip first residue in query and vall chunk
54  if ((i == 1 && ( qindex == 1 || f->get_first_index_in_vall() <= 1)) ||
55  r->dssp_phi() == 360.0 || query_phi_prediction_[qindex] == 360.0) continue;
56  // difference / 180
57  totalScore += fabs( (query_phi_prediction_[qindex] - r->dssp_phi()) / 180.0 );
58  conf_positions++;
59  }
60  totalScore /= (Real) conf_positions;
61  empty_map->set_score_component(totalScore, id_);
62  if ((totalScore > lowest_acceptable_value_) && (use_lowest_ == true))
63  return false;
64  return true;
65 }
66 
67 
68 } // scores
69 } // frag_picker
70 } // protocols
71 
72