Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RotamerSets.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 core/pack/RotamerSet/RotamerSets.hh
11 /// @brief RotamerSets class declaration
12 /// @author Andrew Leaver-Fay (leaverfa@email.unc.edu)
13 
14 
15 #ifndef INCLUDED_core_pack_rotamer_set_RotamerSets_hh
16 #define INCLUDED_core_pack_rotamer_set_RotamerSets_hh
17 
18 // Unit Headers
20 //#include <core/pack/rotamer_set/rotamer_building_functions.hh> // WHY IS THIS IN THE .HH?
21 
22 // Package Headers
23 
26 //#include <core/pack/rotamer_set/RotamerSetsBase.hh>
31 
32 #ifdef WIN32 //VC++ needs full class declaration
33 #include <core/pack/rotamer_set/RotamerSet.hh> // WIN32 INCLUDE
34 #endif
35 
36 // Project Headers
38 // AUTO-REMOVED #include <core/chemical/ResidueTypeSet.fwd.hh>
39 #include <core/graph/Graph.fwd.hh>
40 #include <core/pose/Pose.fwd.hh>
42 
43 // Utility Headers
44 // AUTO-REMOVED #include <utility/vector1.hh>
45 #include <core/types.hh>
46 
47 #include <utility/vector1.hh>
48 
49 
50 namespace core {
51 namespace pack {
52 namespace rotamer_set {
53 
55 {
56 public:
58 
59 public:
60  RotamerSets();
61  ~RotamerSets();
62 
63  void
65 
66  void
68  pose::Pose const & pose,
69  scoring::ScoreFunction const & scfxn,
70  graph::GraphCOP packer_neighbor_graph
71  );
72 
73  void
75  pose::Pose const & pose,
76  scoring::ScoreFunction const & scfxn,
77  graph::GraphCOP packer_neighbor_graph,
79  );
80 
81  void
82  dump_pdb( pose::Pose const & pose, std::string const & filename ) const;
83 
84  virtual uint nrotamers() const;
85  virtual uint nrotamers_for_moltenres( uint ) const;
86 
87  virtual uint nmoltenres() const;
88  virtual uint total_residue() const;
89 
90  virtual
91  uint
92  moltenres_2_resid( uint ) const;
93 
94  virtual
95  uint
96  resid_2_moltenres( uint ) const;
97 
98  virtual
99  uint
100  moltenres_for_rotamer( uint ) const;
101 
102  virtual
103  uint
104  res_for_rotamer( uint ) const;
105 
106  virtual
108  rotamer( uint ) const;
109 
110  virtual
112  rotamer_for_moltenres( uint moltenres_id, uint rotamerid ) const;
113 
114  virtual
115  uint
117 
118  virtual
120  rotamer_set_for_residue( uint resid ) const;
121 
122  virtual
124  rotamer_set_for_residue( uint resid );
125 
126  virtual
128  rotamer_set_for_moltenresidue( uint moltenresid ) const;
129 
130  virtual
132  rotamer_set_for_moltenresidue( uint moltenresid );
133 
134  virtual
135  RotamerSetVector::const_iterator begin()
136  { return set_of_rotamer_sets_.begin(); }
137 
138  virtual
139  RotamerSetVector::const_iterator end()
140  { return set_of_rotamer_sets_.end(); }
141 
142  /// convert rotid in full rotamer enumeration into rotamer id on its source residue
143  virtual
144  uint
145  rotid_on_moltenresidue( uint rotid ) const;
146 
147  /// convert moltenres rotid to id in full rotamer enumeration
148  virtual
149  uint
150  moltenres_rotid_2_rotid( uint moltenres, uint moltenresrotid ) const;
151 
152  /// access to packer_task_
154  task() const;
155 
156  void prepare_sets_for_packing( pose::Pose const & pose, scoring::ScoreFunction const &);
157 
158 private:
159  void update_offset_data();
160 
161 
162 public:
163 
164  void
166  pose::Pose const & pose,
167  scoring::ScoreFunction const & scfxn,
168  graph::GraphCOP packer_neighbor_graph,
170  );
171 
172  /// @brief precomputes all rotamer pair energies between neighboring RotamerSets( residues )
173  /// and stores those energies in an intereaction graph capable of storing them
174  /// public so it can be used by the GreenPacker.
175  void
177  pose::Pose const & pose,
178  scoring::ScoreFunction const & scfxn,
179  graph::GraphCOP packer_neighbor_graph,
181  bool const finalize_edges = true
182  );
183 
184 private:
185  /// @brief Marks all protein vertices in the on-the-fly interaction graph as ones
186  /// that should distinguish between the backbones and sidechains. Then, adds edges to
187  /// the on-the-fly interaction graph between neighboring RotamerSets,
188  /// and figures out, for those edges, which pairs of rotamer groups (e.g. ala1/arg2, ser1/phe2)
189  /// are close enough to interact for their energies to need calculation.
190  void
192  pose::Pose const & pose,
193  scoring::ScoreFunction const & scfxn,
194  graph::GraphCOP packer_neighbor_graph,
196  );
197 
198  /// @brief computes one body energies for the on-the-fly graph, calculating proline-correction
199  /// terms for protien-residues that allow prolines and storing them on the otf edges
200  void
202  pose::Pose const & pose,
203  scoring::ScoreFunction const & scfxn,
204  graph::GraphCOP packer_neighbor_graph,
206  );
207 
208 public:
209 
210  static
212  get_bb_bbE(
213  pose::Pose const & pose,
214  scoring::ScoreFunction const & scfxn,
215  conformation::Residue const & res1,
216  conformation::Residue const & res2
217  );
218 
219  static
221  get_sc_bbE(
222  pose::Pose const & pose,
223  scoring::ScoreFunction const & scfxn,
224  conformation::Residue const & res1,
225  conformation::Residue const & res2
226  );
227 
228 public: // WHY? G++, WHY?!
229 
230  virtual
233  return resid_2_moltenres_;
234  }
235 
236  virtual
239  return moltenres_2_resid_;
240  }
241 
242 private:
245 
247 
252 
253  // originating moltenres for a particular rotamer in the enumeration of all rotamers
256 
258 };
259 
260 } // namespace rotamer_set
261 } // namespace pack
262 } // namespace core
263 
264 
265 #endif // INCLUDED_core_pack_RotamerSet_RotamerSets_HH