Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SymSidechainMinMover.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 Sid Chaudhury (Carbon copy by Ingemar AndrĂ©)
13 
14 // Unit headers
16 
17 // Project headers
19 
20 #include <core/types.hh>
21 
24 
25 #include <core/pose/Pose.hh>
27 // AUTO-REMOVED #include <core/kinematics/FoldTree.hh>
28 // AUTO-REMOVED #include <basic/options/option.hh>
29 // AUTO-REMOVED #include <basic/options/keys/docking.OptionKeys.gen.hh>
33 // AUTO-REMOVED #include <core/conformation/symmetry/util.hh>
34 
35 #include <protocols/moves/Mover.hh>
37 
38 // Utility Headers
39 #include <basic/Tracer.hh>
40 
41 #include <utility/vector1.hh>
42 
43 
44 using basic::T;
45 using basic::Error;
46 using basic::Warning;
47 
48 static basic::Tracer TR("protocols.docking.SymSidechainMinMover");
49 
50 namespace protocols {
51 namespace symmetric_docking {
52 
53 //default constructor
55 {
56  Mover::type( "SymSidechainMin" );
57  update_movemap_ = true;
59 }
60 
61 //construtor with arguments
62 SymSidechainMinMover::SymSidechainMinMover( core::scoring::ScoreFunctionCOP scorefxn_in) : moves::Mover(), scorefxn_(scorefxn_in)
63 {
64  Mover::type( "SymSidechainMin" );
66 }
67 
68 //construtor with arguments
72 ) : moves::Mover(), scorefxn_(scorefxn_in), movemap_(movemap_in), update_movemap_(false)
73 {
74  Mover::type( "SymSidechainMin" );
76 }
77 
78 //constructor with arguments
81  core::pack::task::PackerTaskOP task_in) : moves::Mover(), scorefxn_(scorefxn_in), task_(task_in), update_movemap_(true)
82 {
83  Mover::type( "SymSidechainMin" );
85 }
86 
87 //constructor with arguments
90  core::pack::task::TaskFactoryOP tf_in) : moves::Mover(), scorefxn_(scorefxn_in), tf_(tf_in), update_movemap_(true)
91 {
92  Mover::type( "SymSidechainMin" );
94 }
95 
96 //destructor
98 
100 
101 //default options setup for SymSidechainMinMover
103 {
104  if(update_movemap_){
106  movemap_->set_chi( true );
107  }
109  minmover_ = new simple_moves::symmetry::SymMinMover(movemap_, scorefxn_, "dfpmin_armijo_nonmonotone", 0.01, true/*nblist*/, false/*deriv_check*/ );
110 }
111 
114  return "SidechainMin";
115 }
116 
117 //SymSidechainMinMover updates the movemap based on a packer task
119 {
120  movemap_->set_chi( true );
121  if (tf_) task_ = tf_->create_task_and_apply_taskoperations( pose );
122  if (task_){
123  for(Size i = 1; i <= pose.total_residue(); i++){
124  if (!task_->nonconst_residue_task(i).being_packed()) movemap_->set_chi(i, false);
125  }
126  }
127 }
128 
129 //SymSidechainMinMover apply function
131 {
132  //runtime_assert(pose.is_fullatom());
133  if(update_movemap_) update_movemap( pose );
135  minmover_->apply( pose );
136 }
137 
138 //constructor
140 {
141  Mover::type( "SymInterfaceSidechainMinMover" );
143 }
144 
147  core::Real interface_dist_in
148  ) : SymSidechainMinMover(scorefxn_in), interface_dist_(interface_dist_in)
149 {
150  Mover::type( "SymInterfaceSidechainMin" );
152 }
153 
154 //destructor
156 
158 {
159  interface_dist_ = interface_dist_in;
160  interface_->distance(interface_dist_);
161 }
162 
163 //default options setup for SymInterfaceSidechainMinMover
164 void
166 {
168 
169 }
170 
171 //apply function for SymInterfaceSidechainMinMover
172 void
174 {
175  //reset movemap
176  movemap_->set_bb(false);
177  movemap_->set_jump(false);
178  movemap_->set_chi(false);
179 
181 
182  //calculate interface
183  interface_->calculate( pose );
184 
185  minmover_->apply(pose);
186 
187 }
188 
191  return "SymInterfaceSidechainMin";
192 }
193 
194 } // docking
195 } // protocols