Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RRProtocolMover.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 src/protocols/rotamer_recovery/RRProtocolMover.cc
11 /// @brief Preform the rotamer recovery after applying mover
12 /// @author Matthew O'Meara (mattjomeara@gmail.com)
13 
14 // Unit Headers
16 
17 // Project Headers
20 
21 // Platform Headers
22 #include <basic/Tracer.hh>
23 // AUTO-REMOVED #include <core/chemical/ResidueType.hh>
24 // AUTO-REMOVED #include <core/conformation/Residue.hh>
26 #include <core/pack/min_pack.hh>
27 #include <core/pose/Pose.hh>
28 // AUTO-REMOVED #include <core/scoring/ScoreFunction.hh>
30 
31 // C++ Headers
32 #include <string>
33 
34 //Auto Headers
35 #include <protocols/moves/Mover.hh>
36 #include <utility/exit.hh>
37 #include <utility/vector1.hh>
38 
39 
40 using std::string;
41 using core::Size;
43 using core::pose::Pose;
48 using basic::Tracer;
49 
50 namespace protocols {
51 namespace rotamer_recovery {
52 
53 static Tracer TR("protocol.rotamer_recovery.RRProtocolMover");
54 
56  mover_(NULL)
57 {}
58 
60  MoverOP mover
61 ) :
62  mover_(mover)
63 {}
64 
66  RRProtocol(),
67  mover_(src.mover_)
68 {}
69 
71 
72 string
74  return "RRProtocolMover";
75 }
76 
77 string
79  return "";
80 }
81 
82 
83 /// @details apply Mover and measure rotamer recovery for each residue
84 void
86  RRComparerOP comparer,
87  RRReporterOP reporter,
88  Pose const & pose,
89  ScoreFunction const &,
90  PackerTask const & packer_task
91 ) {
92  // Assume score_function.setup_for_scoring(pose) has already been called.
93 
94  Pose working_pose = pose; // deep copy
95 
96  if(!mover_){
97  utility_exit_with_message("Attempting to run RotamerRecovery with the 'RRProtocolMover' protocol, but no mover was specified.");
98  }
99 
100  mover_->apply(working_pose);
101 
102  for(Size ii = 1; ii <= pose.total_residue(); ++ii){
103  if (!packer_task.pack_residue(ii)) continue;
105  comparer, reporter,
106  pose, working_pose,
107  pose.residue(ii), working_pose.residue(ii) );
108  }
109 }
110 
111 } // rotamer_recovery
112 } // protocols