Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ShoveResidueMover.cc
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 
11 /// @file protocols/protein_interface_design/movers/ShoveResidueMover.cc
12 /// @brief
13 /// @author Sarel Fleishman (sarelf@u.washington.edu), Jacob Corn (jecorn@u.washington.edu)
14 
15 // Unit headers
18 
19 // Project headers
20 #include <core/pose/Pose.hh>
21 #include <utility/tag/Tag.hh>
25 #include <core/kinematics/Jump.hh>
30 #include <utility/string_util.hh>
31 
32 #include <core/graph/Graph.hh>
34 #include <core/pose/selection.hh>
35 #include <boost/foreach.hpp>
36 #define foreach BOOST_FOREACH
37 #include <basic/Tracer.hh>
39 
40 #include <core/pose/util.hh>
41 #include <utility/vector0.hh>
42 #include <utility/vector1.hh>
43 
44 
45 namespace protocols {
46 namespace protein_interface_design {
47 namespace movers {
48 
49 using namespace core;
50 using namespace std;
51 using namespace core::scoring;
52 using namespace protocols::moves;
53 
54 static basic::Tracer TR( "protocols.protein_interface_design.movers.ShoveResidueMover" );
55 
58 {
60 }
61 
64  return new ShoveResidueMover;
65 }
66 
69 {
70  return "ShoveResidueMover";
71 }
72 
73 
75  protocols::moves::Mover( ShoveResidueMoverCreator::mover_name() ),
76  resnum_( 0 )
77 {}
78 
80  protocols::moves::Mover( ShoveResidueMoverCreator::mover_name() ),
81  resnum_( resnum )
82 {}
83 
84 void
86 {
87  //using namespace rotamer_set;
88  using namespace core::scoring;
89  using namespace core::pack::task;
90  using namespace core::pack::rotamer_set;
91  foreach( core::Size const resid, shove_residues_ ) {
92  if ( remove_shove_variant_ ) {
93  core::pose::remove_variant_type_from_pose_residue( pose, "SHOVE_BB", resid );
94  } else {
95  core::pose::add_variant_type_to_pose_residue( pose, "SHOVE_BB", resid );
96  }
97  }
98 }
99 
103 }
104 
105 void
107  DataMap &,
109  Movers_map const &,
110  Pose const & pose)
111 {
112  resnum_ = core::pose::get_resnum( tag, pose );
113  remove_shove_variant_ = tag->getOption<bool>( "remove_shove_variant", false );
114  if( tag->hasOption( "shove" ) ){
115  std::string const shove_val( tag->getOption< std::string >( "shove" ) );
116  utility::vector1< std::string > const shove_keys( utility::string_split( shove_val, ',' ) );
117  foreach( std::string const key, shove_keys ){
118  core::Size const resnum( core::pose::parse_resnum( key, pose ) );
119  shove_residues_.push_back( resnum );
120  TR<<"Using shove atomtype for "<< key <<'\n';
121  }
122  } else {
123  shove_residues_.push_back( resnum_ );
124  }
125 }
126 
127 } //movers
128 } //protein_interface_design
129 } //protocols
130