33 #include <basic/Tracer.hh>
38 #include <utility/tag/Tag.hh>
39 #include <utility/tag/Tag.fwd.hh>
47 #include <utility/vector1.hh>
48 #include <boost/foreach.hpp>
49 #include <utility/vector0.hh>
52 #define foreach BOOST_FOREACH
55 using namespace protocols::seeded_abinitio;
56 static basic::Tracer
TR(
"protocols.seeded_abinitio.SwapSegment" );
60 namespace seeded_abinitio {
62 using namespace protocols::moves;
66 SwapSegmentCreator::keyname()
const
68 return SwapSegmentCreator::mover_name();
72 SwapSegmentCreator::create_mover()
const {
77 SwapSegmentCreator::mover_name(){
82 SwapSegment::~SwapSegment() {}
84 SwapSegment::SwapSegment():
110 TR.Debug<<
"iterating through pose: " <<pos << std::endl;
112 TR.Debug<<
"pos "<< pos <<std::endl;
114 TR.Debug<<
"offsetres " << offsetres <<std::endl;
129 using namespace core::conformation;
137 TR.Debug<<
"iterating through pose: " <<pos << std::endl;
139 TR.Debug <<
"pos "<< pos <<std::endl;
141 TR.Debug <<
"offsetres " << offsetres <<std::endl;
144 TR.Debug <<
"After Swap loop Residue " << offsetres << std::endl;
157 TR<<
"replacing residues from chain " <<chain_to_swap <<
" with appropriate rotamers" <<std::endl;
186 TR.Debug<<
"all_seeds_.loop_size() " <<
all_seeds_.
loop_size() <<
" total residues in seeds pdb: " << segment->total_residue() <<std::endl;
187 TR<<
"adjusting for chain numbering by: " <<adjust_numbering <<std::endl;
198 utility_exit_with_message(
"residues specified under the seeds does not agree with the number of residues provided as segment");
203 TR<<
"adopting side chains" << std::endl;
208 TR<<
"swapping segment" <<std::endl;
234 TR<<
"scoring with following scorefunction: " << *
scorefxn_ <<std::endl;
236 TR<<
"SwapSegment mover has been instantiated" <<std::endl;
244 TR<<
"swap sidechains: " <<
copy_sidechains_ <<
", swapping segment: "<< swap_segment_ <<
", taking segments from chain: " << from_chain_ << std::endl;
247 TR<<
"not necessary to swap segments AND to copy side chains" << std::endl;
249 if( tag->hasOption(
"seeds_pdb" ) || tag->hasOption(
"template_pdb" ) ){
253 TR<<
"read in a template pdb with " <<
seeds_pdb_->total_residue() <<
"residues"<<std::endl;
258 utility_exit_with_message(
"need to specify a template to swap from!!!!");
261 if( tag->hasOption(
"previously_grown") ){
263 TR<<
"decoy was previously changed in its length, aka was \"grown\" "<<std::endl;
268 foreach(
TagPtr const btag, branch_tags ){
274 if( btag->getName() ==
"Seeds" ) {
284 TR.Debug<<
"string seeds: \n"<< beginS <<
" and " << endS <<std::endl;
288 begin = ( btag->getOption<
core::Size >(
"begin" ) );
289 end = ( btag->getOption<
core::Size >(
"end" ) );
294 TR.Debug<<
"parsing seeds: \n"<< begin <<
" and " << end <<std::endl;
300 utility_exit_with_message(
"NEED TO SPECIFY A SEGMENT TO REPLACE!!!, whole pose swap currently not supported");