26 #include <numeric/random/random.hh>
27 #include <numeric/random/random_permutation.hh>
32 #include <utility/tag/Tag.hh>
35 #include <basic/Tracer.hh>
43 #include <utility/vector1.hh>
46 #include <boost/foreach.hpp>
47 #define foreach BOOST_FOREACH
53 #include <utility/vector0.hh>
56 #include <utility/string_util.hh>
57 #include <utility/io/ozstream.hh>
60 #include <utility/excn/Exceptions.hh>
61 #include <basic/options/keys/OptionKeys.hh>
64 namespace design_opt {
66 static basic::Tracer
TR(
"protocols.design_opt.ParetoOptMutationMover" );
68 using namespace chemical;
75 task_factory_( NULL ),
83 stopping_condition_( NULL ),
84 stop_before_condition_( false ),
85 skip_best_check_( false ),
87 shuffle_order_( false )
101 bool stop_before_condition,
102 bool skip_best_check,
148 return "ParetoOptMutationMover";
298 using namespace core::pack::task;
299 using namespace core::pack::task::operation;
300 using namespace core::chemical;
306 greedy_opt->apply( pose );
314 if( filter_delta <
Real( 0. ) ) filter_delta = -1 * filter_delta;
328 TR <<
"ParetoOptMutationMover"<<std::endl;
332 protocols::moves::Movers_map::const_iterator mover_it( movers.find( relax_mover_name ) );
333 if( mover_it == movers.end() )
334 throw utility::excn::EXCN_RosettaScriptsOption(
"Relax mover "+relax_mover_name+
" not found" );
339 dump_pdb( tag->getOption<
bool >(
"dump_pdb",
false ) );
341 dump_table( tag->getOption<
bool >(
"dump_table",
false ) );
342 parallel( tag->getOption<
bool >(
"parallel",
false ) );
343 if( tag->hasOption(
"stopping_condition" ) ){
346 TR<<
"Defined stopping condition "<<stopping_filter_name<<std::endl;
352 if( btag->getName() ==
"Filters" ){
356 Filters_map::const_iterator find_filt( filters.find( filter_name ));
357 if( find_filt == filters.end() ) {
358 TR.Error <<
"Error !! filter not found in map: \n" << tag << std::endl;
359 runtime_assert( find_filt != filters.end() );
363 add_filter( find_filt->second->clone(), samp_type, filter_delta );
367 throw utility::excn::EXCN_RosettaScriptsOption(
"tag name " + btag->getName() +
" unrecognized." );
372 if( filter_name !=
"true_filter" ||
filters_.size() < 1 ){
373 protocols::filters::Filters_map::const_iterator find_filt( filters.find( filter_name ) );
374 if( find_filt == filters.end() )
375 throw utility::excn::EXCN_RosettaScriptsOption(
"Filter "+filter_name+
" not found" );
379 add_filter( find_filt->second->clone(), samp_type, filter_delta );
385 delta_filter_names.clear();
386 if( tag->hasOption(
"reset_delta_filters" ) ){
387 delta_filter_names = utility::string_split( tag->getOption<
std::string >(
"reset_delta_filters" ),
',' );
388 foreach(
std::string const fname, delta_filter_names ){
390 TR<<
"The baseline for Delta Filter "<<fname<<
" will be reset upon each accepted mutation"<<std::endl;
401 rtmin( tag->getOption<
bool >(
"rtmin",
false ) );
403 shuffle_order( tag->getOption<
bool >(
"shuffle_order",
false ) );