25 #include <utility/tag/Tag.hh>
26 #include <basic/Tracer.hh>
34 #include <utility/vector0.hh>
40 namespace protein_interface_design {
45 using namespace core::scoring;
46 using namespace protocols::moves;
48 static basic::Tracer
TR(
"protocols.protein_interface_design.movers.SetAtomTree" );
76 two_parts_chain1_( false ),
95 docking_ft_ = tag->getOption<
bool >(
"docking_ft", 0 );
96 simple_ft( tag->getOption<
bool >(
"simple_ft", 0 ) );
100 if( tag->hasOption(
"resnum" ) )
102 else if( tag->hasOption(
"pdb_num" ) ){
106 if( tag->hasOption(
"anchor_res" ) ){
108 if( tag->hasOption(
"connect_from" ) )
129 if( connect_to ==
"" )
134 if ( anchor_num == 0 ) {
141 TR.Debug<<
"anchor defaults to: "<<nearest_res<<std::endl;
150 core::Size const jump_pos1( host_chain == 1 ? resnum : nearest_res );
151 core::Size const jump_pos2( host_chain == 1 ? nearest_res : resnum );
154 fold_tree->add_edge( jump_pos1, jump_pos2, rb_jump );
155 fold_tree->add_edge( 1, jump_pos1, kinematics::Edge::PEPTIDE );
158 fold_tree->add_edge( jump_pos2, pose.
total_residue(), kinematics::Edge::PEPTIDE );
159 TR.Debug<<
"CONNECT_FROM: "<<connect_from<<
" and CONNECT TO: " <<connect_to<<std::endl;
161 fold_tree->set_jump_atoms( rb_jump, connect_from , connect_to );
162 fold_tree->reorder( 1 );
172 jumps.push_back(
jump_ );
175 TR<<
"Setting up docking foldtree over jump "<<
jump_<<
'\n';
176 TR<<
"Docking foldtree: "<<pose.
fold_tree()<<std::endl;
184 for(
core::Size chain = 1; chain <= conf.num_chains(); ++chain ){
185 new_ft.
add_edge( conf.chain_begin( chain ), conf.chain_end( chain ), -1 );
187 new_ft.
add_edge( conf.chain_begin( chain - 1 ), conf.chain_begin( chain ), jump );
192 TR<<new_ft<<std::endl;
198 using namespace protocols::geometry;
202 core::Size const cut( ccm.chain_cut( pose ) );
207 TR<<
"CoM1/CoM2/CoM3/CoM1_full_length/cut: "<<CoM1<<
'/'<<CoM2<<
'/'<<CoM3<<
'/'<<
'/'<<CoM1_full_length<<
'/'<<cut<<std::endl;
211 if( CoM1_full_length <= cut ){
212 new_ft.add_edge( 1, min( CoM1_full_length, CoM1 ), -1 );
213 new_ft.add_edge( min( CoM1_full_length, CoM1 ), max( CoM1_full_length, CoM1 ), -1 );
214 new_ft.add_edge( max( CoM1_full_length, CoM1 ), cut, -1 );
215 new_ft.add_edge( cut + 1, CoM2, -1 );
219 new_ft.add_edge( 1, CoM1, -1 );
220 new_ft.add_edge( CoM1, cut, -1 );
221 new_ft.add_edge( cut + 1, min( CoM2, CoM1_full_length ), -1 );
222 new_ft.add_edge( min( CoM2, CoM1_full_length ), max( CoM2, CoM1_full_length ), -1 );
227 new_ft.add_edge( CoM1, CoM2, 1 );
228 new_ft.add_edge( CoM1_full_length, CoM3, 2 );
229 new_ft.delete_self_edges();
231 TR<<new_ft<<std::endl;
242 TR<<
"connect_to not defined by user. Defaulting to "<<connect_to<<std::endl;
253 anchor_num = pose_map.find( chain, number );
254 TR<<
"anchor_num::: " << anchor_num <<
"and pdbnum:::" <<
resnum_ <<std::endl;
262 TR<<
"Previous fold tree: "<<pose.
fold_tree()<<
'\n';
264 TR<<
"New fold tree: "<<pose.
fold_tree()<<std::endl;