Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SolventAccessibility.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/SolventAccessibility.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 #include <utility/vector1.hh>
25 
26 
27 namespace protocols {
28 namespace frag_picker {
29 namespace scores {
30 
32  std::string ctmp = current_chunk()->chunk_key();
33  if (ctmp.compare("change to 'cached_scores_id_' when ready") != 0) {
34  return; // CACHING NOT BUILT IN YET
35  }
36 }
37 
39  FragmentScoreMapOP scores) {
40 
41  return score( fragment, scores );
42 
43 }
44 
46  FragmentScoreMapOP empty_map) {
47  Real totalScore = 0;
48  for (Size i = 1; i <= f->get_length(); i++) {
49  VallResidueOP r = f->get_residue(i);
50  // just the difference
51  totalScore += fabs( predicted_sa_norm_[i + f->get_first_index_in_query() - 1] - r->sa_norm() );
52  }
53  totalScore /= (Real) f->get_length();
54  empty_map->set_score_component(totalScore, id_);
55  if ((totalScore > lowest_acceptable_value_) && (use_lowest_ == true))
56  return false;
57  return true;
58 }
59 
60 
61 } // scores
62 } // frag_picker
63 } // protocols
64 
65