Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ResiduePairJump.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 src/protocols/jumping/ResiduePairJump.hh
11 /// @brief a class to create jump transform from a pair of residues
12 /// @detailed
13 /// This class is to create possible jump transforms between a pair of residues
14 /// when their sidechains are locked in certain geometry constraints. It starts
15 /// from the predefined constraints and takes backbone-independent rotamer
16 /// conformation into account and reversely generate their backbone positions.
17 /// Then a jump transform is measured.
18 /// @author Chu Wang
19 
20 
21 
22 #ifndef INCLUDED_protocols_jumping_ResiduePairJump_hh
23 #define INCLUDED_protocols_jumping_ResiduePairJump_hh
24 
25 // Unit Headers
27 
28 // Package Headers
29 
30 // Project Headers
31 #include <core/types.hh>
33 // AUTO-REMOVED #include <core/id/DOF_ID.hh>
35 #ifdef WIN32
37 #endif
38 
39 #include <core/pose/Pose.fwd.hh>
40 
41 #include <core/kinematics/Jump.hh>
42 
43 // ObjexxFCL Headers
44 
45 // Utility headers
46 // AUTO-REMOVED #include <utility/io/izstream.hh>
47 #include <utility/pointer/ReferenceCount.hh>
48 // AUTO-REMOVED #include <utility/vector1.hh>
49 
50 //// C++ headers
51 #include <string>
52 #include <map>
53 // AUTO-REMOVED #include <vector>
54 
56 #include <utility/vector1.hh>
57 
58 
59 namespace protocols {
60 namespace jumping {
61 ///////////////////////////////////////////////////////////////////////////////////
62 ///@brief a single residue component of a ResiduePairJump class
63 ///
64 ///@details a residue type with information which atoms to be used to define a jump
65 ///and cst.
67 
68 public:
69  ///@brief empty constructor
71 
72  virtual ~ResiduePairJumpSingle();
73 
74  ///@brief constructed by residue_type
76  core::chemical::ResidueType const & residue_type
77  );
78 
79  ///@brief have jumpAtoms been defined?
80  inline
81  bool jumpAtoms_defined() const { return jumpAtoms_.size() == 3; }
82 
83  ///@brief have cstAtoms been defined?
84  inline
85  bool cstAtoms_defined() const { return cstAtoms_.size() == 3; }
86 
87  ///@brief whether this residue has internal flexibility
88  inline
89  bool fixResidue() const { return fixResidue_; }
90 
91  ///@brief access residue type
93 
94  ///@brief access all three jumpAtoms at once
95  inline
97 
98  ///@brief access single jumpAtom one at a time
99  inline
100  std::string const jumpAtoms( core::Size i ) const { return jumpAtoms_[i]; }
101 
102  ///@brief access all three cstAtoms at once
103  inline
105 
106  ///@brief access single cstAtom one at a time
107  inline
108  std::string const cstAtoms( core::Size i ) const { return cstAtoms_[i]; }
109 
110  ///@brief set all three jumpAtoms at once
111  void set_jumpAtoms( utility::vector1< std::string > const & jump_atoms );
112 
113  ///@brief set single jumpAtom one at a time
114  void set_jumpAtoms( core::Size i, std::string const atom_name );
115 
116  ///@brief set all three cstAtoms at once
117  void set_cstAtoms( utility::vector1< std::string > const & cst_atoms );
118 
119  ///@brief set all single cstAtom one at a time
120  void set_cstAtoms( core::Size i, std::string const atom_name );
121 
122 private:
123  ///@brief internal data -- residue type
125  ///@brief internal data -- atom names (3) for creating the jump
127  ///@brief internal data -- atom names (3) for defining cst
129  ///@brief internal data -- whether to consider internal flexibility within this residue
131 };
132 
133 
134 enum cstType {
135  disAB = 1,
142 };
143 
144 enum dofType {
145  rot1 = 1,
149 };
150 
152 
153  typedef std::map< cstType, utility::vector1< core::Real > > cstInfoMap;
154  typedef std::map< cstType, utility::vector1< core::Real > >::iterator cstInfoMapIterator;
155 
156  //typedef std::map< cstType, core::id::DOF_ID > cstTypeToDofMap;
157  //typedef std::map< cstType, core::id::DOF_ID >::iterator cstTypeToDofMapIterator;
158 
159 public:
160 
161  // empty constructor
162  ResiduePairJump();
163  virtual ~ResiduePairJump();
164 
165  // constructed by two input ResidueTypes
167  core::chemical::ResidueType const & residue1,
168  core::chemical::ResidueType const & residue2
169  );
170 
171  // add two input ResidueTypes to define this pair ( erase old data );
172  void add_residue_pair(
173  core::chemical::ResidueType const & residue1,
174  core::chemical::ResidueType const & residue2
175  );
176 
177  void add_residue_single(
178  core::chemical::ResidueType const & residue
179  );
180 
181  inline
182  bool jumpAtoms_defined () const {
183  return residues_[1]->jumpAtoms_defined() && residues_[2]->jumpAtoms_defined();
184  }
185 
186  inline
187  bool cstAtoms_defined () const {
188  return residues_[1]->cstAtoms_defined() && residues_[2]->cstAtoms_defined();
189  }
190 
191  inline
192  bool cstInfoMap_defined() const {
193  return cstInfoMap_.size() >= core::Size( dihedralB );
194  }
195 
196  inline
198  core::Size rsd,
199  core::Size atom,
200  std::string name
201  )
202  {
203  residues_[rsd]->set_cstAtoms( atom, name );
204  }
205 
206  inline
208  return residues_[i]->cstAtoms();
209  }
210 
211  inline
213  core::Size rsd,
214  core::Size atom,
215  std::string name
216  )
217  {
218  residues_[rsd]->set_jumpAtoms( atom, name );
219  }
220 
221  inline
223  return residues_[i]->jumpAtoms();
224  }
225 
226  void set_cstInfo( cstType type, core::Real value );
227 
228  void set_cstInfo( cstType type, utility::vector1< core::Real > const & values );
229 
231 
232  void init_mini_pose();
233 
234  void diversify_dof_conformers( dofType type, core::Size max_index );
235 
237 
238  core::pose::PoseOP apply_dof_conformer( std::map< dofType, core::Size > const & conformer_map );
239 
240  //void setup_cstTypeToDofMap();
241 
243 
245 
246  void diversify_cst_conformers( cstType type, core::Size max_index );
247 
249 
250 private:
251  // residue types
253  // discrete conformation for each cst parameters
254  std::map< cstType, utility::vector1< core::Real > > cstInfoMap_;
255  // a vector of all possible conformers derived from the combination of different cst types
257  // jumpSet derived from all cst_conformers
259  // rotamerSet for each residues if possible
261  // a vector of all possible conformers derived from the combination of sidechain rotamers and cst_jumps
263  // data, miniPose consisting of these two residues
265 };
266 
267 
268 } //protocols
269 } //jumping
270 
271 #endif
272