31 #include <utility/tag/Tag.hh>
60 #include <basic/options/option.hh>
61 #include <basic/options/keys/packing.OptionKeys.gen.hh>
62 #include <basic/options/keys/loops.OptionKeys.gen.hh>
81 #include <utility/vector0.hh>
82 #include <utility/vector1.hh>
83 #include <basic/Tracer.hh>
92 namespace protein_interface_design {
95 using namespace protocols::moves;
97 static basic::Tracer
TR(
"protocols.protein_interface_design.movers.LoopRemodel" );
113 return "LoopRemodel";
132 bool const auto_loops,
145 protocol_( protocol ),
146 loop_start_( loop_start ),
147 loop_end_( loop_end ),
149 auto_loops_(auto_loops),
166 using namespace protocols::loops;
170 if( loops->size() == 0) {
171 TR <<
"No loops found!" << std::endl;
174 else TR << *loops << std::endl;
176 if( loops->size() > 0 ) {
178 TR.Debug <<
"Original FoldTree " << pose.
fold_tree() << std::endl;
193 if( basic::options::option[ basic::options::OptionKeys::loops::remodel_init_temp ].user() ) mc_kt = basic::options::option[ basic::options::OptionKeys::loops::remodel_init_temp ]();
197 for(
core::Size i = 1; i <= outer_cycles; ++i ) {
198 TR.Debug <<
"outer_cycle " << i <<
" kt=" << outer_mc.
temperature() << std::endl;
202 for(
core::Size j = 1; j <= inner_cycles; ++j ) {
203 TR.Debug <<
"inner_cycle " << j <<
" kt=" << inner_mc.
temperature() << std::endl;
204 for(
Loops::iterator it = loops->v_begin(); it != loops->v_end(); ++it ) {
209 if(
perturb_ ) kinmover->set_idealize_loop_first(
true );
211 kinmover->set_temperature( mc_kt );
213 kinmover->set_vary_bondangles(
true );
214 kinmover->set_sample_nonpivot_torsions(
true );
215 kinmover->set_rama_check(
true );
218 kinwrapper.
apply( pose );
223 if( basic::options::option[ basic::options::OptionKeys::loops::kic_recover_last ].value() ) {
230 (*hires_score_)(pose);
234 using namespace core::pack::task::operation;
238 task_factory->push_back( prevent_repacking_on_certain_res );
241 if( basic::options::option[ basic::options::OptionKeys::packing::resfile ].user() ) {
248 for(
Loops::iterator it = loops->v_begin(); it != loops->v_end(); ++it ) {
251 if( i >= loop.
start() && i <= loop.
stop() )
continue;
252 else task->nonconst_residue_task( i ).restrict_to_repacking();
265 minmover->apply( pose );
277 retrieve_sc.
allsc(
true );
281 for(
Loops::iterator it = loops->v_begin(); it != loops->v_end(); ++it ) {
282 it->set_extended(
true );
286 perturb.
apply( pose );
289 retrieve_sc.
apply( pose );
296 refine.
apply( pose );
306 bool const pick_status =
pick_loop_frags( loops, full_sequence, full_ss );
313 for(
Loops::iterator it = loops->v_begin(); it != loops->v_end(); ++it ) {
314 it->set_extended(
true );
323 perturb.
apply( pose );
326 retrieve_sc.
apply( pose );
335 refine.
apply( pose );
341 retrieve_sc.
apply( pose );
347 bool const pick_status =
pick_loop_frags( loops, full_sequence, full_ss );
359 remodel.
apply( pose );
368 TR.Debug <<
"Reverted FoldTree " << pose.
fold_tree() << std::endl;
370 else TR <<
"No loops found!" << std::endl;
383 using namespace core;
384 using namespace core::fragment;
385 using namespace protocols::loops;
388 for(
core::Size frag_length = 3; frag_length <= 9; frag_length+=6 ) {
389 TR <<
"Finding " << frag_length <<
"mer loop fragments..." << std::endl;
396 if( loop->size() < frag_length )
continue;
398 for(
core::Size i=loop->start(); i <= loop->stop() - frag_length; ++i ) {
401 std::string ss = full_ss.substr( i - 1, frag_length);
402 if ( ss.length() < frag_length ) {
403 ss.append( frag_length - ss.length(),
'D' );
405 TR.Debug <<
"Window ss: " << ss <<
"\n";
406 std::string aa = full_sequence.substr( i - 1, frag_length);
407 if ( aa.length() < frag_length ) {
408 aa.append( frag_length - aa.length(),
'.' );
410 TR.Debug <<
"Window aa: " << aa << std::endl;
416 for( FragDataList::const_iterator it = list.begin(); it != list.end(); ++it ) {
417 TR.Debug << (*it)->size() <<
" " << (*it)->sequence() << std::endl;
421 TR.Debug <<
"Adding frame: "<< i <<
"-" << i+frag_length <<
": " << ss <<
" " << aa << std::endl;
423 frame->add_fragment( list );
424 if( frag_length == 3 )
frag3_->add( frame );
425 else if( frag_length == 9 )
frag9_->add( frame );
434 picking_old::FragmentLibraryManager::get_instance()->clear_Vall();
435 if( (
frag1_->size() > 0) || (
frag3_->size() > 0) || (
frag9_->size() > 0) )
return true;
444 perturb_ = tag->getOption<
bool>(
"perturb", 0 );
445 refine_ = tag->getOption<
bool>(
"refine", 1 );
453 auto_loops_ = tag->getOption<
bool>(
"auto_loops", 0 );
454 bool const des = tag->getOption<
bool>(
"design", 0 );
457 hurry_ = tag->getOption<
bool>(
"hurry", 0 );
459 runtime_assert( cycles_ > 0 );
466 if( !data.
has(
"loops",
"found_loops" ) )
468 TR <<
"Loops not present in DataMap! Be sure to add LoopFinder before LoopRemodel!" << std::endl;
479 loops_->add_loop( *loop );
490 " perturb="<<perturb_<<
" refine="<<refine_<<
" hurry=" <<
hurry_<<
" cycles=" << cycles_ <<
" hires_score="<<hires_score << std::endl;