38 #include <utility/string_util.hh>
39 #include <basic/Tracer.hh>
42 #include <utility/tag/Tag.hh>
43 #include <utility/tag/Tag.fwd.hh>
48 #include <utility/vector1.hh>
50 #include <boost/foreach.hpp>
52 #define foreach BOOST_FOREACH
55 using namespace protocols::seeded_abinitio;
56 static basic::Tracer
TR(
"protocols.seeded_abinitio.DefineMovableLoops" );
60 namespace seeded_abinitio {
62 using namespace protocols::moves;
66 DefineMovableLoopsCreator::keyname()
const
68 return DefineMovableLoopsCreator::mover_name();
72 DefineMovableLoopsCreator::create_mover()
const {
77 DefineMovableLoopsCreator::mover_name()
79 return "DefineMovableLoops";
82 DefineMovableLoops::~DefineMovableLoops() {}
84 DefineMovableLoops::DefineMovableLoops() :
125 bool use_seeds = seeds.
size() > 0;
126 Size end = offset + secstruct.length() - 1;
138 for (
Size i = 1; i <= chain_ends.size(); ++i )
139 TR.Debug<<
"chain endings: " << chain_ends[i] <<std::endl;
142 for(
Size cut_it = 1; cut_it <= cutpoints.size(); ++ cut_it ){
143 TR.Debug <<
"cutpoints of current foldtree: "<< cutpoints[cut_it] <<std::endl;
145 for(
Size ends_it = 1; ends_it <= chain_ends.size(); ++ends_it ){
146 if( (cutpoints[cut_it] != chain_ends[ends_it]) && (cutpoints[cut_it] <=
end ) && ( cutpoints[cut_it] >= offset) ){
147 adjusted_cutpoints.push_back( cutpoints[cut_it] );
148 TR <<
"adjusted cutpoint "<< cutpoints[cut_it] << std::endl;
157 TR.Debug <<
"sec. strc: "<< secstruct <<std::endl;
162 for(
Size ss_i = 0; ss_i < secstruct.length() ; ++ss_i ){
163 ss = secstruct[ss_i];
169 individual_loop.push_back( ss_i + offset );
173 individual_loop.push_back( ss_i + offset );
175 TR.Debug <<
"use cutpoint " <<
use_cutpoints_ <<
" cut: " << cut <<
" iterator with offset: " << ss_i + offset <<std::endl;
178 TR <<
"cut: " << cut << std::endl;
187 TR <<
"adding chainbreak type"<< std::endl;
192 if( individual_loop.size() > 0 ){
194 TR.Debug <<
"selecting loop with cutpoint only" << std::endl;
195 found_loops.
add_loop( individual_loop[1], individual_loop[individual_loop.size()], cut , 0, false );
198 TR.Debug <<
"not using cutpoint " << std::endl;
199 found_loops.
add_loop( individual_loop[1], individual_loop[individual_loop.size()], cut , 0, false );
202 individual_loop.clear();
207 TR <<
"loop return: " << found_loops << std::endl;
215 bool res_cut =
false;
231 TR.Debug <<
"residues to compare: "<<residues <<std::endl;
234 TR.Debug <<
"residues " <<residues <<
" ss assignment: "<<
secstructure_.length();
237 TR <<
"residues vs " <<residues <<
" ss assignment: "<<
secstructure_.size() << std::endl;;
238 utility_exit_with_message(
"input residues under considerations do not agree with the number of secondary strcutres assignments");
248 TR.Debug <<
"secstr lenght: " <<
secstructure_.length() <<
" stop: " << stop_res <<
" start: " << start_res << std::endl;
249 utility_exit_with_message(
"secondary structure length does not equal the start and stop of the chain!!!" );
254 TR.Debug <<
"start searching: "<<start_res <<
" stop searching: " << stop_res <<std::endl;
256 TR <<
"loops " << *
loops_ <<std::endl;
273 TR<<
"DefineMovableLoops has been instantiated"<<std::endl;
277 data.
add(
"loops",
"found_loops",
loops_ );
284 if( tag->hasOption(
"secstrct") ){
286 TR<<
"getting secstructure from a string" <<std::endl;
289 TR<<
"extracting secondary structure from input pose" <<std::endl;
293 if( tag->hasOption(
"template_pdb" ) ){
297 TR<<
"read in a template pdb with " <<
template_pdb_->total_residue() <<
"residues"<<std::endl;
314 if( tag->hasOption(
"chain_num" ) ){
315 TR<<
"NOTE: chains have to be consecutive" << std::endl;
320 std::istringstream ss( key );
323 TR<<
"adding chain "<<key<<std::endl;
330 TR<<
"no chains specified, defaulting to use the last chain: "<< chain << std::endl;
336 foreach(
TagPtr const btag, branch_tags ){
338 if( btag->getName() ==
"Seeds" ) {
341 std::pair <std::string,std::string> seedpair;
342 seedpair.first = beginS;
343 TR.Debug <<
"parsing seeds: " << beginS <<
" " <<endS <<std::endl;
344 seedpair.second = endS;