Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EnzdesCstCache.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 .hh file for enzdes cacheable observer
11 /// @brief
12 /// @author Florian Richter, floric@u.washington.edu
13 
14 #ifndef INCLUDED_protocols_toolbox_match_enzdes_util_EnzdesCstCache_hh
15 #define INCLUDED_protocols_toolbox_match_enzdes_util_EnzdesCstCache_hh
16 
17 //unit headers
19 
20 //package headers
22 
23 #ifdef WIN32
26 #endif
27 
28 //project headers
29 #include <core/pose/Pose.fwd.hh>
32 #include <core/types.hh>
33 
34 //utility headers
35 #include <utility/pointer/ReferenceCount.hh>
36 #include <utility/vector1.hh>
37 
38 // C++ headers
39 #include <map>
40 
41 namespace protocols {
42 namespace toolbox{
43 namespace match_enzdes_util {
44 
45 
46 /// @brief a simple class to store the pose specific
47 /// enzdes constraint information in the actual pose
49 
50 public: //constructor/destructor/
51 
53  EnzConstraintIOCOP enz_cstio,
54  core::Size num_cst_blocks
55  );
56 
57  EnzdesCstCache( EnzdesCstCache const & other );
58 
59  virtual ~EnzdesCstCache();
60 
61 public: //accessors
62 
64  enzcst_io() const;
65 
68  core::Size cst_block );
69 
72  core::Size cst_block ) const;
73 
75  ncsts() const { return param_cache_.size(); }
76 
77  void
79  core::Size cst_block,
80  EnzdesCstParamCacheOP param_cache
81  );
82 
83  bool
85  core::Size seqpos) const;
86 
87  /// @brief returns all seqpos present in the cache in order of the params
88  /// which they are in.
89  ///note: ligands are explicityly put at the end of the vector
91  ordered_constrained_positions( core::pose::Pose const & pose ) const;
92 
93  /// @brief remapping sequence positions
94  void
95  remap_resid( core::id::SequenceMapping const & smap );
96 
97 private:
98 
101 
102 };
103 
104 
106 
107 public: //typedefs
108 
110 
111 public: //constructor/destructor
112 
114 
115  EnzdesCstParamCache( EnzdesCstParamCache const & other );
116 
117  virtual ~EnzdesCstParamCache();
118 
119 public: //accessors
120 
123  return template_res_cache_[index]; }
124 
127  return template_res_cache_[index]; }
128 
129  core::Size
131  return template_res_cache_.size(); }
132 
135  return active_pose_constraints_; }
136 
139  return active_pose_constraints_; }
140 
141  void
144  );
145 
146  void
148 
149  //utility::vector1< CovalentConnectionReplaceInfo > &
150  //covalent_connections();
151 
154  return covalent_connections_; }
155 
156  bool
157  missing_in_pose() const;
158 
159  void
161 
162  void
164 
165  bool
166  contains_position( core::Size seqpos ) const;
167 
168  /// @brief remapping sequence positions
169  void
170  remap_resid( core::id::SequenceMapping const & smap );
171 
172 private:
173 
177 
178 };
179 
181 
182 public: //typedefs
183 
184  friend class EnzCstTemplateRes;
185 
186  typedef std::map< core::Size, EnzCstTemplateResAtomsOP > SeqposTemplateAtomsMap;
187 
188 public: //constructor/destructor
189 
191 
193 
194  virtual ~EnzCstTemplateResCache();
195 
196 public: //accessors
197 
198  std::map< Size, EnzCstTemplateResAtomsOP >::const_iterator
200  return seqpos_map_.begin();
201  }
202 
203  std::map< Size, EnzCstTemplateResAtomsOP >::const_iterator
204  seqpos_map_end() const{
205  return seqpos_map_.end();
206  }
207 
208  core::Size
210  return seqpos_map_.size(); }
211 
212  bool
213  contains_position( core::Size const seqpos ) const {
214  return seqpos_map_.find( seqpos ) != seqpos_map_.end();
215  }
216 
217  void
219 
220  void
222 
223  bool
224  remove_seqpos( core::Size seqpos );
225 
226  /// @brief remapping sequence positions
227  void
228  remap_resid( core::id::SequenceMapping const & smap );
229 
230  bool
231  not_in_pose() const {
232  return not_in_pose_; }
233 
234 private:
235 
239 
240 };
241 
242 }
243 } //toolbox
244 } //protocols
245 
246 
247 #endif