Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BFactor.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/BFactor.cc
11 /// @brief a base class for fragment scoring
12 /// @author rvernon@u.washington.edu
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  FragmentScoreMapOP empty_map) {
33 
34  // describe_score(f, empty_map, std::cerr);
35 
36  Real totalScore = 0;
37  for (Size i = 1; i <= f->get_length(); i++) {
38  VallResidueOP r = f->get_residue(i);
39  totalScore += r->bF();
40  }
41  totalScore /= (Real) f->get_length();
42  empty_map->set_score_component(totalScore, id_);
43  if ((totalScore > lowest_acceptable_value_) && (use_lowest_ == true))
44  return false;
45  return true;
46 }
47 
49  FragmentScoreMapOP empty_map, std::ostream& out) {
50 
51  Real totalScore = 0;
52 
53  out << f->get_chunk()->get_pdb_id() << " " << I(5,
54  f->get_first_index_in_vall()) << " ";
55  for (Size i = 1; i <= f->get_length(); i++)
56  out << f->get_residue(i)->bF();
57  out << std::endl;
58 
59  //THIS FUNCTION IS POINTLESS!!!
60 
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 } // scores
68 } // frag_picker
69 } // protocols
70 
71