Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RotamerTrialsMinMover.hh
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 RotamerTrialsMinMover.hh
11 /// @brief Wrapper mover for Rotamer-Trials with Minimization (based on RotamerTrialsMover)
12 /// @author Barak Raveh
13 
14 #ifndef INCLUDED_protocols_simple_moves_RotamerTrialsMinMover_hh
15 #define INCLUDED_protocols_simple_moves_RotamerTrialsMinMover_hh
16 
17 // Unit headers
19 
20 // Project headers
21 #include <core/types.hh>
22 
23 #include <core/pose/Pose.fwd.hh>
24 // AUTO-REMOVED #include <core/kinematics/MoveMap.fwd.hh>
28 
30 // AUTO-REMOVED #include <protocols/moves/DataMap.hh>
31 
33 #include <protocols/moves/Mover.hh>
34 
35 #include <utility/vector1.hh>
36 
37 
38 namespace protocols {
39 namespace simple_moves {
40 
42 public:
43 
50 
51 public:
52 
53  // default constructor
55 
56  ///@brief constructor with PackerTask. use a PackerTask ONLY for fixed-sequence work.
57  /// WARNING TO ANY DESIGNER WHO PASSES IN A TASK: YOUR DESIGN STEPS WILL BE UNDONE
58  /// AS THIS TASK CONCEIVES OF THE INPUT SEQUENCE THAT CORRESPONDS TO THE ORIGINAL SEQUENCE
59  ///
60  ///@param scorefxn_in The score function used for packing and minimization (which may be modified externally)
61  ///@param task_in The task that will pass to the rotamers packer
63  ScoreFunctionCOP scorefxn_in,
64  PackerTask & task_in
65  );
66 
67  ///@brief constructor with TaskFactory for producing the packer task
68  ///
69  ///@param scorefxn_in The score function used for packing and minimization (which may be modified externally)
70  ///@param factory_in The task that will pass to the rotamers packer
72  ScoreFunctionCOP scorefxn_in,
73  TaskFactoryCOP factory_in
74  );
75 
76  void
77  init();
78 
79  virtual ~RotamerTrialsMinMover();
80 
81  ///@brief Apply Rotamer-Trials with minimization to pose, using the score function
82  /// and tasks provided by the constructor
83  virtual void apply( core::pose::Pose & pose );
84  virtual std::string get_name() const;
85 
86  //PackerTaskMover/RotamerTrialsMinMover needs to have a parent class that implements this?
87  //bool task_is_valid( core::pose::Pose const & pose ) const;
88 
89  // setters
91 
93 
94  ///@brief Parse XML for RosettaScripts
95  virtual void parse_my_tag(
96  TagPtr const,
98  Filters_map const &,
100  Pose const & );
101 
102  ///@brief Return a new mover instance (for RosettaScripts)
104  ///@brief Return a copy of this mover instance (for RosettaScripts)
105  virtual protocols::moves::MoverOP clone() const;
106  friend std::ostream &operator<< (std::ostream &os, RotamerTrialsMinMover const &mover);
107 
108 protected:
109 
110  /// @brief read access for derived classes
112  scorefxn() const;
113 
114  /// @brief read access for derived classes, pose needed to run TaskFactory
116  task( core::pose::Pose const & pose ) const;
117 
118 private:
119 
120  /// @brief RotamerTrailsMinMover does not have its own score function, rather, it shares
121  /// one with other classes -- CAUTION: the score function is externally modifiable,
122  /// but this is probably the way users expect this to behave when they use this mover).
124 
125  /// @brief use a PackerTask ONLY for fixed-sequence work.
126  /// WARNING TO ANY DESIGNER WHO PASSES IN A TASK: YOUR DESIGN STEPS WILL BE UNDONE
127  /// AS THIS TASK CONCEIVES OF THE INPUT SEQUENCE THAT CORRESPONDS TO THE ORIGINAL SEQUENCE
128  ///If a factory is present it overwrites this task with each call to apply()
130 
131  ///@brief TaskFactory allows for nonconstant sequences to be used with RotamerTrialsMover
132  ///CAUTION: the factory is externally modifiable.
134  bool nonideal_;
136 };
137 
138  /// @brief Wrapper for Rotamer Trials with Minimization, which modifies only
139  /// rotamers whose energy changed by a given constant
141 public:
142 
143  // default constructor
145 
146  // constructor with arguments
148  ScoreFunctionCOP scorefxn_in,
149  PackerTask & task_in,
151  core::Real energycut_in
152  );
153 
154  // constructor with arguments
156  ScoreFunctionCOP scorefxn_in,
157  TaskFactoryCOP factory_in,
159  core::Real energycut_in
160  );
161 
162  virtual
164 
165 public:
166 
167  /// @brief apply this mover to a pose
168  virtual
169  void
170  apply( core::pose::Pose & pose );
171 
172  virtual std::string get_name() const;
173 
174 private:
175 
176  /// @brief selects a subset of residues to repack based on the per
177  /// residue energies of the last accepted pose in the MC object.
178  void
180  core::pose::Pose const & pose,
181  protocols::moves::MonteCarlo const & mc,
183  ) const;
184 
185 private:
186 
187  // data
190 };
191 
192 } // moves
193 } // protocols
194 
195 #endif