24 #include <boost/foreach.hpp>
40 #define foreach BOOST_FOREACH
42 #include <basic/Tracer.hh>
48 #include <utility/tag/Tag.hh>
49 #include <utility/string_util.hh>
53 #include <utility/vector0.hh>
54 #include <utility/vector1.hh>
55 #include <basic/options/keys/OptionKeys.hh>
59 namespace seeded_abinitio {
63 static basic::Tracer
TR(
"protocols.seeded_abinitio.SeedSetupMover" );
79 return "SeedSetupMover";
139 bool is_part_of_this =
false;
141 if( i == pos ) is_part_of_this =
true;
142 return is_part_of_this;
156 using namespace core::pack::task;
157 using namespace core::pack::task::operation;
158 using namespace protocols::toolbox::task_operations;
167 TR<<
"disallowing target chain(s) to repack" << std::endl;
170 Size chains_norepack = num_chains;
172 chains_norepack -= 1;
173 TR <<
"allowing repacking of fold pose" <<std::endl;
175 for (
Size chain = 1; chain <= chains_norepack ; chain++ ){
176 pcfr->chain( chain );
179 tf->push_back( pcfr );
183 if ( norepack_res.size() != 0 ){
184 TR.Debug<<
"disallow " << norepack_res.size() <<
" to repack " <<std::endl;
185 using namespace protocols::toolbox::task_operations;
188 tf->push_back( prfr );
193 foreach ( const Size res , norepack_res ){
194 using namespace core::pack::task::operation;
195 PreventRepackingOP pr = new PreventRepacking;
196 pr->include_residue( res );
202 tf->push_back( nrd );
211 for (
Size chain = 1; chain <= num_chains - 1 ; chain++ )
212 rctr->chain( chain );
213 tf->push_back( rctr );
216 TR<<
"WARNING, are you sure you want to design the target chains? designing target chain" << std::endl;
225 bool allow_design(
false );
227 TR.Debug<<
"is not seed: "<< i <<
" allow design" << std::endl;
231 residues.push_back( i );
234 if( residues.size() ){
235 TR.Debug<<
"The following residues will be repacked only: ";
240 rrtr->set_residues( residues );
241 tf->push_back( rrtr );
258 using namespace basic::options;
259 using namespace basic::options::OptionKeys;
262 movemap->set_bb(
false );
263 movemap->set_chi(
false );
264 movemap->set_jump(
false );
267 if( num_chains > 1 ){
275 interface_obj.
distance( interface_distance_cutoff );
279 TR<<
"disallowing all chains to be movable but the last one" <<std::endl;
282 movemap->set_bb( i ,
false );
283 movemap->set_chi( i,
false );
285 movemap->set_chi( i,
true );
288 movemap->set_chi( i,
true );
295 movemap->set_bb( pos,
true );
296 movemap->set_chi(pos,
true );
299 movemap->set_chi(
true );
302 TR<<
"setting movemap method:"<<std::endl;
304 TR.Debug<<
"i: "<<i<<
", bb: "<< movemap->get_bb(i)<<
", chi: "<<movemap->get_chi(i)<<std::endl;
322 TR.Debug<<
"design within seed, residue: "<< key <<
", parsed: "<< resnum <<std::endl;
323 design_res.push_back( resnum);
324 TR<<
"allowing design for "<<key<<std::endl;
333 using namespace core::pack;
334 using namespace core::pack::task;
359 TR.Debug <<
"position: "<< i <<
", bb: "<<
movemap_->get_bb(i)<<
", chi: "<<
movemap_->get_chi(i)<<std::endl;
382 TR<<
"SeedSetupMover has been invoked"<<std::endl;
393 chi_chain2_ = tag->getOption<
bool >(
"chi_chain2", 0 );
394 chi_chain1_ = tag->getOption<
bool >(
"chi_chain1", 0 );
412 using namespace core::scoring;
416 design_ = tag->getOption<
bool >(
"design" , 0 );
420 foreach(
TagPtr const btag, branch_tags ){
422 if( btag->getName() ==
"Seeds" ) {
426 std::pair <std::string,std::string> seedpair;
427 seedpair.first = beginS;
428 TR.Debug <<
"parsing seeds: " << beginS <<
" " <<endS <<std::endl;
429 seedpair.second = endS;
435 if( tag->hasOption(
"allow_design" ) ){
440 if( tag->hasOption(
"norepack_res" ) ){
444 if( tag->hasOption(
"packtask") ){
445 packtask_ = tag->getOption<
bool >(
"packtask" );
446 TR<<
"packer task factory set to: " << std::endl;