34 #include <basic/options/option.hh>
35 #include <basic/Tracer.hh>
38 #include <utility/exit.hh>
39 #include <utility/tag/Tag.hh>
43 #include <basic/options/keys/packing.OptionKeys.gen.hh>
45 #include <utility/vector0.hh>
46 #include <utility/vector1.hh>
50 namespace simple_moves {
53 using namespace basic::options;
56 using namespace operation;
57 using namespace scoring;
60 using basic::t_warning;
61 static basic::Tracer
TR(
"protocols.simple_moves.PackRotamersMover");
79 return "PackRotamersMover";
83 protocols::moves::
Mover(
"PackRotamersMover"),
86 nloop_( option[ OptionKeys::packing::ndruns ].value() ),
88 rotamer_sets_( new rotamer_set::RotamerSets ),
93 protocols::moves::
Mover( type_name ),
96 nloop_( option[ OptionKeys::packing::ndruns ].value() ),
98 rotamer_sets_( new rotamer_set::RotamerSets ),
108 protocols::moves::
Mover(
"PackRotamersMover"),
109 scorefxn_( scorefxn ),
113 rotamer_sets_( new rotamer_set::RotamerSets ),
121 protocols::moves::
Mover( other )
145 if (
run == 1 || packer_energy < best_energy ) {
147 best_energy = packer_energy;
150 if (
nloop_ > 1 ) pose = best_pose;
169 if ( !
task_->residue_task(i).is_original_type( &pose.
residue_type(i) ) )
return false;
175 utility::lua::LuaObject
const & score_fxns,
176 utility::lua::LuaObject
const & tasks,
180 runtime_assert(
nloop_ > 0 );
183 if( def[
"scorefxn"] ) {
190 if ( new_task_factory == 0)
return;
211 if ( tag->hasOption(
"nloop") ) {
213 runtime_assert(
nloop_ > 0 );
230 if ( new_score_function == 0 )
return;
245 if ( new_task_factory == 0)
return;
270 Warning() <<
"undefined ScoreFunction -- creating a default one" << std::endl;
277 }
else if (
task_ == 0 ) {
278 Warning() <<
"undefined PackerTask -- creating a default one" << std::endl;
279 task_ = TaskFactory::create_packer_task( pose );
299 std::ostringstream packable, designable;
300 packable <<
"REMARK PackingRes";
301 designable <<
"REMARK DesignRes";
304 ResidueLevelTask
const & rtask(
task_->residue_task(i) );
305 if ( rtask.being_designed() ) {
308 designable << pose.
pdb_info()->number(i) <<
" " << pose.
pdb_info()->chain(i);
312 }
else if ( rtask.being_packed() ) {
322 info().push_back( packable.str() );
323 info().push_back( designable.str() );
329 runtime_assert( sf );
336 runtime_assert( tf );
353 os <<
"Score function: " << mover.
score_function()->get_name() << std::endl;
355 else { os <<
"Score function: none" << std::endl; }