Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RepackSidechainsMover.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 /// @file
11 /// @brief
12 /// @author Monica Berrondo
13 /// @author Modified by Sergey Lyskov
14 
15 // Unit headers
18 // AUTO-REMOVED #include <protocols/moves/DataMap.hh>
20 
24 // AUTO-REMOVED #include <core/pack/task/operation/TaskOperation.hh>
26 
28 
29 #include <core/pose/Pose.hh>
30 #include <core/pose/util.hh>
32 
33 // Utility Headers
34 #include <utility/exit.hh>
35 #include <utility/tag/Tag.hh>
36 // AUTO-REMOVED #include <utility/string_util.hh> // string_split
37 
38 // option key includes
39 // AUTO-REMOVED #include <basic/options/keys/packing.OptionKeys.gen.hh>
40 
41 #include <utility/vector0.hh>
42 #include <utility/vector1.hh>
43 #include <utility/options/BooleanVectorOption.hh>
44 #include <basic/Tracer.hh>
45 
46 //Auto Headers
47 #include <core/pose/util.tmpl.hh>
48 
49 namespace protocols {
50 namespace simple_moves {
51 
52 using basic::Warning;
53 using basic::t_warning;
54 static basic::Tracer TR("protocols.simple_moves.RepackSidechainsMover");
55 
56 /// RepackSidechainsMover
57 
60 {
62 }
63 
66  return new RepackSidechainsMover;
67 }
68 
71 {
72  return "RepackSidechainsMover";
73 }
74 
76  protocols::moves::Mover("RepackSidechainsMover"),
77  scorefxn_(0)
78 {}
79 
80 // RepackSidechainsMover::RepackSidechainsMover( std::string const & type_name ) :
81 // protocols::moves::Mover( type_name ),
82 // scorefxn_(0)
83 // {}
84 
85  // constructors with arguments
87  ScoreFunctionCOP scorefxn
88 ) :
89  protocols::moves::Mover("RepackSidechainsMover"),
90  scorefxn_( scorefxn )
91 {}
92 
94  //utility::pointer::ReferenceCount(),
95  protocols::moves::Mover( other )
96 {
97  scorefxn_ = other.scorefxn();
98 }
99 
100 void
102 {
103 // repack missing sidechains
104  core::id::AtomID_Mask all_atoms( true );
105  core::pose::initialize_atomid_map( all_atoms, pose );
106 
107  //build a PackerTask to control rotamer_trials
109  task->initialize_from_command_line();
110  task->restrict_to_repacking();
111 
112  utility::vector1_bool repackable;
113  bool something_to_pack = core::pack::figure_out_repackable_residues( pose, all_atoms, repackable );
114  if (!something_to_pack) return;
115 
116  //task is set up
117  task->restrict_to_residues(repackable);
118  core::pack::pack_rotamers( pose, *scorefxn_, task );
119 
120 }
121 
125 }
126 
127 
128 ///@brief parse XML (specifically in the context of the parser/scripting scheme)
129 void
131  TagPtr const tag,
132  protocols::moves::DataMap & datamap,
133  Filters_map const & filters,
134  protocols::moves::Movers_map const & movers,
135  Pose const & pose
136 )
137 {
138  parse_score_function( tag, datamap, filters, movers, pose );
139  // parse_task_operations( tag, datamap, filters, movers, pose );
140 }
141 
142 ///@brief parse "scorefxn" XML option (can be employed virtually by derived Packing movers)
143 void
145  TagPtr const tag,
146  protocols::moves::DataMap const & datamap,
147  Filters_map const &,
149  Pose const &
150 )
151 {
153  if ( new_score_function == 0 ) return;
154  set_scorefxn( new_score_function );
155 }
156 
157 ///@brief required in the context of the parser/scripting scheme
160 {
161  return new RepackSidechainsMover;
162 }
163 
164 ///@brief required in the context of the parser/scripting scheme
167 {
169 }
170 
171 // setters
173 {
174  scorefxn_ = sf;
175 }
176 
177 } // moves
178 } // protocols
179