Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TemperatureController.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 and 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/canonical_sampling/TemperatureControllerMover.cc
11 /// @brief TemperatureController methods implemented
12 /// @author
13 
14 
15 // Unit Headers
17 
18 
19 // protocols headers
22 #include <protocols/moves/Mover.hh>
26 
28 
29 //#include <protocols/jd2/JobDistributor.hh>
30 #include <protocols/jd2/util.hh>
31 #include <protocols/jd2/Job.hh>
32 
33 // core headers
34 #include <basic/options/option_macros.hh>
35 #include <basic/options/keys/in.OptionKeys.gen.hh>
36 #include <basic/options/keys/packing.OptionKeys.gen.hh>
37 
38 #include <basic/Tracer.hh>
39 
42 
44 #include <core/types.hh>
45 
46 // numeric headers
47 #include <numeric/random/random.hh>
48 
49 // utility headers
50 #include <utility/file/file_sys_util.hh>
51 #include <utility/pointer/owning_ptr.hh>
52 #include <utility/tag/Tag.hh>
53 #include <utility/io/ozstream.hh>
54 #include <utility/io/izstream.hh>
55 
56 // C++ Headers
57 #include <cmath>
58 
59 static basic::Tracer tr( "protocols.canonical_sampling.TemperatureController" );
60 
61 namespace protocols {
62 namespace canonical_sampling {
63 using namespace core;
64 
65 
68 
69  return interp_enum == linear ? "linear" : "exponential";
70 }
71 
74 
75  if (interp_string == "linear") {
76  return linear;
77  } else if (interp_string != "exponential") {
78  utility_exit_with_message("invalid temp_interpolation value, expecting linear or exponential");
79  }
80  return exponential;
81 }
82 
84  protocols::canonical_sampling::ThermodynamicObserver()
85 {}
86 
88  //utility::pointer::ReferenceCount(),
89  protocols::canonical_sampling::ThermodynamicObserver(other)
90 {}
91 
92 ///@brief make a move in temperature space depending on the current score
93 void
95  Real const score( monte_carlo_->last_accepted_score() );
96  temperature_move( score );
97 }
98 
101  return monte_carlo_;
102 }
103 
104 void
107 )
108 {
110 }
111 
114  return monte_carlo_;
115 }
116 
117 /// @brief execute the temperatur move ( called by observer_after_metropolis )
118 /// returns the current temperatur in kT.
121  return temperature_move( score );
122 }
123 
126 {
127  return "TemperatureController";
128 }
129 
130 
131 void
135  core::Size level,
136  core::Real,
137  core::Size
138 ) {
139  if ( level != 1 ) {
140  utility_exit_with_message( "TemperatureController - Baseclass doesn't know about different temp-levels" );
141  };
142 }
143 
144 
145 } //moves
146 } //protocols
147