21 #include <utility/tag/Tag.hh>
23 #include <utility/string_util.hh>
24 #include <basic/Tracer.hh>
50 #include <boost/foreach.hpp>
51 #define foreach BOOST_FOREACH
52 #include <numeric/random/random.hh>
53 #include <numeric/random/random_permutation.hh>
55 #include <utility/vector0.hh>
56 #include <utility/vector1.hh>
57 #include <utility/options/IntegerVectorOption.hh>
62 #include <basic/options/keys/OptionKeys.hh>
65 static numeric::random::RandomGenerator
RG( 14071789 );
68 namespace protein_interface_design {
73 using namespace core::scoring;
74 using namespace protocols::moves;
76 static basic::Tracer
TR(
"protocols.protein_interface_design.movers.PlaceOnLoop" );
97 loop_begin_( 0 ), loop_end_( 0 ),
98 hires_scorefxn_( NULL ), lores_scorefxn_( NULL ),
99 chain_closing_attempts_( 100 ), host_chain_( 2 ), stub_set_( NULL ), minimize_toward_stub_( true )
121 using namespace protocols::loops;
128 loops->push_back( loop );
133 kinwrap.
apply( pose );
135 TR<<
"Kinematic loop closure failed to close loop."<<std::endl;
140 using namespace core::pack::task;
141 using namespace protocols::toolbox::task_operations;
147 refine.
apply( pose );
158 using namespace core::pack::task;
159 using namespace core::chemical;
164 using namespace basic::options;
165 using namespace basic::options::OptionKeys;
168 ptask->nonconst_residue_task( i ).prevent_repacking();
170 ptask->nonconst_residue_task( i ).prevent_repacking();
176 stub_set_->add_hotspot_constraints_to_pose( pose, fixed_atom_id, ptask,
stub_set_, 0.7, 0,
false, 10.0,
true );
182 using namespace core::pack::task;
183 using namespace core::chemical;
186 ala_only[
aa_ala ] =
true;
190 ptask->nonconst_residue_task( i ).restrict_absent_canonical_aas( ala_only );
192 ptask->nonconst_residue_task( i ).prevent_repacking();
203 Pose const saved_pose( pose );
206 bool loop_closed(
false );
208 TR<<
"changing loop length by "<<delta<<std::endl;
210 for(
int del(-1); del>=delta; --del ){
215 else if( delta > 0 ){
216 using namespace core::chemical;
217 using namespace core::conformation;
235 return( loop_closed );
241 utility_exit_with_message(
"position_stub is not yet implemented." );
277 runtime_assert( loop_begin_ < loop_end_ );
278 runtime_assert( loop_begin_ > 1 );
281 runtime_assert( chain_begin < loop_begin_ && loop_begin_ < chain_end );
282 runtime_assert( chain_begin < loop_end_ && loop_end_ < chain_end );
284 if( tag->hasOption(
"stubfile" ) ){
298 if( tag->hasOption(
"shorten_by" ) )
299 shorten_by = tag->getOption<
std::string >(
"shorten_by" );
300 if( tag->hasOption(
"lengthen_by" ) )
301 lengthen_by = tag->getOption<
std::string >(
"lengthen_by" );
302 StringVec
const shorten_by_keys( utility::string_split( shorten_by,
',' ) );
303 StringVec
const lengthen_by_keys( utility::string_split( lengthen_by,
',' ) );
305 foreach(
std::string const shorten, shorten_by_keys ){
306 if( shorten ==
"" )
continue;
307 int const shorten_i( -1 * atoi( shorten.c_str() ) );
308 runtime_assert( (
core::Size ) abs( shorten_i ) < loop_length );
312 foreach(
std::string const lengthen, lengthen_by_keys ){
313 if( lengthen ==
"" )
continue;
318 runtime_assert( loop_end_ - loop_begin_ + 1 + *
delta_length_.begin() >= 3 );
320 TR<<
"PlaceOnLoop mover defined with kinematic mover ";
321 TR<<
" will change the loop by these values: ";