Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MoverStatistics.cc
Go to the documentation of this file.
1 
2 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
3 // vi: set ts=2 noet:
4 //
5 // (c) Copyright Rosetta Commons Member Institutions.
6 // (c) This file is part of the Rosetta software suite and is made available under license.
7 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
8 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
9 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
10 
11 /// @file
12 /// @brief Keeps track of the acceptance_rate of a Mover
13 /// @author Monica Berrondo August 16 2007
14 
15 
16 
17 // Package headers
18 #include <core/types.hh>
19 
20 // AUTO-REMOVED #include <basic/basic.hh>
21 #include <basic/Tracer.hh>
22 
25 
26 // ObjexxFCL Headers
27 #include <ObjexxFCL/format.hh>
28 
29 // C++ Headers
30 #include <string>
31 #include <sstream>
32 
33 // Utility Headers
34 #include <utility/pointer/ReferenceCount.hh>
35 
36 #include <utility/vector1.hh>
37 
38 
39 static basic::Tracer TR("protocols.moves.TrialMover");
40 
41 //static basic::Tracer trDebug("protocols.moves.TrialMover", basic::t_debug );
42 //MY_TRACERS("protocols.moves.TrialMover")
43 
44 
45 using namespace ObjexxFCL::fmt;
46 
47 namespace protocols {
48 namespace moves {
49 
50 /// @details Auto-generated virtual destructor
51 MoverStatistics::~MoverStatistics() {}
52 
53 typedef core::Real Real;
54 using basic::T;
55 using basic::Error;
56 using basic::Warning;
57 
58 void MoverStatistics::print ( MonteCarloOP mc, std::string const type )
59 {
60  //clear_score();
61  //return;
62 
63  //T("protocols.moves.TrialMover.energies") << "trialE ";
64  if ( TR.Trace.visible() ) { //change from Debug --> Trace since it produces output every step!
65  std::ostringstream outstring;
66 
67  for ( Size ii = 0; ii < score_.size(); ++ii ) {
68  outstring << F( 9, 3, score_[ ii ] ) << " ";
69  }
70  outstring << F( 9, 3, mc->last_accepted_score() ) << " " << F( 9, 3, mc->lowest_score() ) << " " << type << " ";
71 
72  switch( mc->mc_accepted() ) {
73  case 0: outstring << "reject "; break;
74  case 1: outstring << "thermal accept "; break;
75  case 2: outstring << "downhill accept "; break;
76  case 3: outstring << "lowest accept "; break;
77  }
78  //TR.Debug << outstring.str() << "\n";
79  TR.Trace << outstring.str() << std::endl;
80  }
81  clear_score();
82  return;
83 }
84 
85 
86 
87 
88 }
89 
90 }
91 
92 
93