Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EnzCstTemplateRes.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 IO-functionality for enzyme Constraints
11 /// @brief
12 /// @author Florian Richter, floric@u.washington.edu
13 
14 
15 #ifndef INCLUDED_protocols_toolbox_match_enzdes_util_EnzCstTemplateRes_hh
16 #define INCLUDED_protocols_toolbox_match_enzdes_util_EnzCstTemplateRes_hh
17 
18 
19 
20 // Unit headers
22 // Package headers
23 
24 // Project headers
25 //#include <core/types.hh>
29 #include <core/pose/Pose.fwd.hh>
31 
32 
33 // Utility Headers
34 // AUTO-REMOVED #include <utility/vector1.hh>
35 #include <utility/pointer/ReferenceCount.hh>
36 
37 //Utility Headers
38 
39 // C++ Headers
40 #include <map>
41 
42 #include <core/id/AtomID.fwd.hh>
43 #include <utility/vector1.hh>
44 #include <string>
45 
46 #ifdef WIN32
47  #include <core/id/AtomID.hh>
49 #endif
50 
51 
52 namespace protocols {
53 namespace toolbox {
54 namespace match_enzdes_util {
55 
56 
57 /// @brief helper class for EnzCstTemplateRes, holds atom ids corresponding
58 /// @brief to the residue types in a certain pose
60 
61 public:
62  ///@brief Automatically generated virtual destructor for class deriving directly from ReferenceCount
63  virtual ~EnzCstTemplateResAtoms();
64 
65  friend class EnzCstTemplateRes; //::check_data_consistency(pose::Pose const & pose);
66  friend class EnzConstraintParameters; //::add_constraints_to_cst_set(pose::Pose & pose);
67 
68  void
69  remap_resid( core::id::SequenceMapping const & smap );
70 
71 private:
72 
73  void
75  core::id::SequenceMapping const & smap,
76  std::vector< core::id::AtomID > & atomid_vec
77  );
78 
79  std::vector< core::id::AtomID > atom1_;
80  std::vector< core::id::AtomID > atom2_;
81  std::vector< core::id::AtomID > atom3_;
82 };
83 
84 
85 /// @brief helper class for class EnzConstraintParameters, gathers information
86 /// @brief from cst input and pdb input
88 
89  //friend class EnzConstraintParameters;
90 public:
91  ///@brief Automatically generated virtual destructor for class deriving directly from ReferenceCount
92  virtual ~EnzCstTemplateRes();
93 
94  typedef std::map< core::chemical::ResidueTypeCOP, utility::vector1< utility::vector1< core::Size > > > RestypeToTemplateAtomsMap;
95 
96 public:
97  typedef std::map< core::chemical::ResidueTypeCOP, utility::vector1< utility::vector1< core::Size > > > AtomIndsForRestypeMap;
98 
99 public:
100 
102  core::chemical::ResidueTypeSetCAP src_restype_set
103  );
104 
106  core::chemical::ResidueTypeSetCAP src_restype_set,
107  EnzConstraintParametersCAP src_enzio_param );
108 
110  EnzCstTemplateResCOP other,
111  EnzConstraintParametersCAP new_ref_param
112  );
113 
114  void
115  read_params(std::istringstream & line_stream);
116 
117  void
118  show_params() const;
119 
120  void
121  get_pose_data(core::pose::Pose & pose) const;
122 
123  void
125  enz_io_param_ = src_enz_io_param;
126  }
127 
128  void
130  param_index_ = index; }
131 
132  core::Size
133  param_index() const{
134  return param_index_; }
135 
137  get_template_atoms_at_pos(core::pose::Pose const & pose, core::Size seqpos ) const;
138 
139  bool
140  rb_minimizable() const {
141  return rb_minimizable_; }
142 
143  bool
144  is_backbone() const {
145  return is_backbone_; }
146 
147  core::Size
149  return corresponding_res_block_; }
150 
151  bool
153 
154  void
156 
157 
160  return allowed_res_types_;
161  }
162 
163  RestypeToTemplateAtomsMap::const_iterator
165  return atom_inds_for_restype_.begin(); }
166 
167  RestypeToTemplateAtomsMap::const_iterator
169  return atom_inds_for_restype_.end(); }
170 
171  void
172  clear_all();
173 
174  void
175  remap_resid( core::id::SequenceMapping const & smap );
176 
177  void
179 
182  core::Size template_atom,
184  ) const;
185 
186  /// @brief checks whether the distance
187  /// between any of the template res atoms
188  /// of res1 and res2 is below a certain
189  /// cutoff.
190  bool
192  core::conformation::Residue const & res1,
193  core::conformation::Residue const & res2
194  ) const;
195 
196  void
198 
199 private:
200 
201  //information from cst file
204 
205  //contains the names of allowed res types as specified by cst file
207 
208  //contains all allowed atoms for a certain residue type
209  //represents the translation of the above cst file info (allowed_res_types_, atom1_, at1_type_, etc )
210  //into workable data
212 
213  //if this is a ligand, do we want to allow rb minimization?
214  //used i.e. in cases when there are two ligands, one of them should stay fixed
216 
217  //if this residue interaction is mediated through backbone only
218  //right now can only be set through file, but should be changed
219  //to automatic detection in the future.
221 
223 
224  //if there is another residue that's identical to this
227 
228  //residue set that we are working with, needed to look up allowed res types
230 
231  EnzConstraintParametersCAP enz_io_param_; // the params object that this residue belongs to
232  core::Size param_index_; //index in CstParams, resA=1, resB =2
233 
234 
235 }; //class EnzCstTemplateRes
236 
237 
238 }
239 } //protocols
240 } //enzdes
241 
242 
243 #endif