43 #include <basic/Tracer.hh>
46 #include <utility/PyAssert.hh>
51 static basic::Tracer
TR(
"protocols.grafting.GraftMoverBase");
57 using namespace core::pose;
58 using namespace protocols::moves;
59 using namespace core::scoring;
69 moves::
Mover(mover_name),
161 atoms_to_superimpose[ atom_piece ]=atom_pose;
164 for (
core::Size atom_num=1; atom_num <=4; atom_num++){
165 AtomID const atom_piece(atom_num, piece_res_num);
166 AtomID const atom_pose(atom_num, pose_res_num);
167 atoms_to_superimpose[ atom_piece ]=atom_pose;
179 atoms_to_superimpose[ atom_piece ]=atom_pose;
182 for (
core::Size atom_num=1; atom_num <=4; ++atom_num){
183 AtomID const atom_piece(atom_num, piece_res_num);
184 AtomID const atom_pose( atom_num, pose_res_num);
185 atoms_to_superimpose[ atom_piece ]=atom_pose;
194 TR <<
"RMS of piece from starting position to current: "<<rms<<std::endl;
201 using namespace core::kinematics;
203 TR<<
"Combining movemaps"<<std::endl;
206 typedef std::pair< Size, core::id::TorsionType > MoveMapTorsionID;
207 typedef std::map< MoveMapTorsionID, bool > MoveMapTorsionID_Map;
214 if (it->first.first<=
start_){
215 MoveMapTorsionID new_id = MoveMapTorsionID(it->first.first, it->first.second);
216 mm->set(new_id, it->second);
224 MoveMapTorsionID new_id = MoveMapTorsionID(new_resnum, it->first.second);
225 mm->set(new_id, it->second);
235 MoveMapTorsionID new_id = MoveMapTorsionID(new_resnum, it->first.second);
236 mm->set(new_id, it->second);
254 Pose final_pose(pose);
261 TR <<
"Insertion complete."<<std::endl;
271 TR <<
"Randomizing residues in movemap." <<std::endl;
276 randomize.
apply(pose);
279 TR <<
"All BB Heavy Atom RMSD "<< RMS <<std::endl;
306 TR <<
"Setting default movemap"<<std::endl;
366 for (
Size i =
start_+insertion_length_; i>=1; --i){
402 Size anchor_offset = 1;
403 if (loop_modeling){anchor_offset=2;}
405 core::Size const cutpoint_lower(Cter_loop_end-1);
406 core::Size const cutpoint_upper(Cter_loop_end);
407 core::Size const loop_start_foldtree_anchor(Nter_loop_start-anchor_offset);
408 core::Size const loop_end_foldtree_anchor(Cter_loop_end+anchor_offset);
410 TR <<
"loop_start_foldtree_anchor " << loop_start_foldtree_anchor << std::endl;
411 TR <<
"cutpoint_lower " << cutpoint_lower << std::endl;
412 TR <<
"cutpoint_upper " << cutpoint_upper << std::endl;
413 TR <<
"loop_end_foldtree_anchor " << loop_end_foldtree_anchor << std::endl;
416 remodeling_tree.
clear();
417 remodeling_tree.add_edge(
Edge(1, loop_start_foldtree_anchor, Edge::PEPTIDE));
418 remodeling_tree.add_edge(
Edge(loop_start_foldtree_anchor, cutpoint_lower, Edge::PEPTIDE));
419 remodeling_tree.add_edge(
Edge(cutpoint_upper, loop_end_foldtree_anchor, Edge::PEPTIDE));
420 remodeling_tree.add_edge(
Edge(loop_end_foldtree_anchor, pose.
total_residue(), Edge::PEPTIDE));
421 remodeling_tree.add_edge(
Edge(loop_start_foldtree_anchor, loop_end_foldtree_anchor, 1));
422 remodeling_tree.reorder(1);
423 TR << remodeling_tree << std::endl;
436 TR <<
"Setting up single loop, double arm remodeling foldtree"<<std::endl;
441 Size anchor_offset = 1;
442 if (loop_modeling){anchor_offset=2;}
446 core::Size const loop_start_foldtree_anchor(Nter_loop_start-anchor_offset);
447 core::Size const loop_end_foldtree_anchor(Cter_loop_end+anchor_offset);
449 TR <<
"loop_start_foldtree_anchor " << loop_start_foldtree_anchor << std::endl;
450 TR <<
"cutpoint_lower " << cutpoint_lower << std::endl;
451 TR <<
"cutpoint_upper " << cutpoint_upper << std::endl;
452 TR <<
"loop_end_foldtree_anchor " << loop_end_foldtree_anchor << std::endl;
455 remodeling_tree.
clear();
456 remodeling_tree.add_edge(
Edge(1, loop_start_foldtree_anchor, Edge::PEPTIDE));
457 remodeling_tree.add_edge(
Edge(loop_start_foldtree_anchor, cutpoint_lower, Edge::PEPTIDE));
458 remodeling_tree.add_edge(
Edge(cutpoint_upper, loop_end_foldtree_anchor, Edge::PEPTIDE));
459 remodeling_tree.add_edge(
Edge(loop_end_foldtree_anchor, pose.
total_residue(), Edge::PEPTIDE));
460 remodeling_tree.add_edge(
Edge(loop_start_foldtree_anchor, loop_end_foldtree_anchor, 1));
461 remodeling_tree.reorder(1);
462 TR << remodeling_tree << std::endl;
470 return "GraftMoverBase";