22 #include <basic/Tracer.hh>
23 #include <utility/tag/Tag.hh>
34 #include <utility/vector0.hh>
35 #include <utility/excn/Exceptions.hh>
36 #include <utility/vector1.hh>
42 basic::Tracer
tr(
"protocols.TrialMover");
63 }
else if(
mode_ ==
"recover_low")
65 mc_->recover_low(pose);
68 utility_exit_with_message(
"MonteCarloUtil mode must be 'reset' or 'recover_low', this should have been caught earlier, dying");
80 if(!tag->hasOption(
"mode"))
82 throw utility::excn::EXCN_RosettaScriptsOption(
"you must specify option mode in MonteCarloUtil");
84 if(!tag->hasOption(
"montecarlo"))
86 throw utility::excn::EXCN_RosettaScriptsOption(
"you must specify the option montecarlo in MonteCarloUtil");
94 throw utility::excn::EXCN_RosettaScriptsOption(
"the option mode must be set to either reset or recover_low in MonteCarloUtil");
109 return "MonteCarloUtil";
114 start_weight_( 0.0 ),
115 original_weight( 0.0 ),
123 start_weight_( 0.0 ),
124 original_weight( 0.0 ),
137 Real const start_weight,
138 Real const end_weight,
140 int const ramp_cycles
143 delta = ( end_weight - start_weight ) / ramp_cycles;
181 bool accepted_move =
mc_->boltzmann( pose,
mover_->type() );
217 mover_->set_input_pose( pose );
225 mover_->set_native_pose( pose );
238 if ( mc_name ==
"" ) {
239 throw utility::excn::EXCN_RosettaScriptsOption(
"TrialMover requires the 'montecarlo' option which was not provided" );
244 if ( movername ==
"" ) {
245 throw utility::excn::EXCN_RosettaScriptsOption(
"TrialMover requires the 'mover' option which was not provided" );
247 Movers_map::const_iterator find_mover ( movers.find( movername ));
248 if( find_mover == movers.end() && movername !=
"" ) {
249 throw utility::excn::EXCN_RosettaScriptsOption(
"TrialMover was not able to find the mover named '" + movername +
"' in the Movers_map" );
251 mover_ = find_mover->second;
256 if ( statstype !=
"no_stats" && statstype !=
"accept_reject" && statstype !=
"all_stats" ) {
257 throw utility::excn::EXCN_RosettaScriptsOption(
"TrialMover keep_stats may only be given the values:\n'no_stats', 'accept_reject', and 'all_stats'.\nRead value '" + statstype +
"'" );
259 if ( statstype ==
"no_stats" ) {
261 }
else if ( statstype ==
"accept_reject" ) {
273 "Mover being tried: " << mover.
mover() << std::endl <<
274 "Moves were accepted: " << mover.
num_accepts() <<
" times." << std::endl <<
276 os <<
"MonteCarlo: ";
277 if ( mover.
mc_ != 0 ) { os << mover.
mc_ << std::endl; }
278 else { os <<
"none" << std::endl; }