Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JumpSRFD.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 // :noTabs=false:tabSize=4:indentSize=4:
4 //
5 // (c) Copyright Rosetta Commons Member Institutions.
6 // (c) This file is part of the Rosetta software suite and is made available under license.
7 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
8 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
9 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
10 
11 /// @file core/fragments/FragData.hh
12 /// @brief A fragment as list of SingleResidue Data
13 /// @author Oliver Lange (olange@u.washington.edu)
14 /// @date Wed Oct 20 12:08:31 2007
15 ///
16 #ifndef INCLUDED_core_fragment_JumpSRFD_HH
17 #define INCLUDED_core_fragment_JumpSRFD_HH
18 
19 // Unit Headers
22 
23 // Package Headers
25 
26 // Project Headers
27 #include <core/pose/Pose.fwd.hh>
29 #include <core/types.hh>
30 
31 // AUTO-REMOVED #include <core/conformation/Residue.hh> // for ResidueSRFD
32 
33 // AUTO-REMOVED #include <core/kinematics/types.hh>
34 #include <core/kinematics/RT.hh>
35 
36 // AUTO-REMOVED #include <core/id/TorsionID.hh>
37 
38 // Utility headers
39 // AUTO-REMOVED #include <utility/vector1.hh>
40 #include <utility/pointer/ReferenceCount.hh>
41 
42 #include <utility/vector1.hh>
43 
44 
45 
46 namespace core {
47 namespace fragment {
48 
51 public:
52 
53  UpJumpSRFD( char sequence = 'X' )
55  {};
56 
57  /// @brief clone
59  return new UpJumpSRFD( *this );
60  };
61 
62  /// @brief create a new instance of this object
63  virtual
65  return new UpJumpSRFD();
66  }
67 
68  virtual bool apply( pose::Pose&, Size const, Frame const& ) const {
69  return true;
70  }
71 
72  virtual bool apply( kinematics::MoveMap const &, pose::Pose &, Size const, Frame const & ) const {
73  return true;
74  }
75 
76  virtual bool apply_ss( std::string&, Size, Frame const& ) const {
77  return true;
78  };
79 
80  bool steal( pose::Pose const&, Size, Frame const& ) {
81  return true;
82  }
83 
84  bool is_compatible( SingleResidueFragData const& ) const;
85 
86  bool is_applicable( kinematics::MoveMap const&, Size ) const {
87  return true;
88  }
89 
90  virtual
91  std::string type() const {
92  return _static_type_name();
93  }
94 
96  return "UpJump";
97  }
98 
99 
100  // for UpJumpSRFD these functions should never be called
101  // might obsolet these completely and only use SRFDs via the func (pose, ipos, Frame ) variant
102  virtual bool apply(pose::Pose &, Size) const {
103  assert( 0 );
104  return false;
105  }
106 
107  /// @brief for UpJumpSRFD this function should never be called, instead use Frame version
108  /// @return always false
109  /// @warning will trigger a false runtime assert
110  virtual bool apply( kinematics::MoveMap const &, pose::Pose &, Size const ) const {
111  runtime_assert( 0 );
112  return false;
113  }
114 
115  // insert fragment_data sec-struct into ss-string at position seq_pos
116  virtual bool apply_ss( std::string&, Size) const {
117  assert( 0 );
118  return false;
119  }
120 
121  // insert fragment_data into pose at position seq_pos
122  virtual bool steal(pose::Pose const&, Size) {
123  assert( 0 );
124  return false;
125  }
126 
127 };
128 
129 //
132 public:
134 
135  DownJumpSRFD( char sequence = 'X' )
137  {
139  };
140 
141  DownJumpSRFD( kinematics::RT rt, AtomList downstream_stub_atoms, AtomList upstream_stub_atoms, char sequence ) :
142  SingleResidueFragData( sequence ),
143  rt_( rt ),
144  downstream_stub_atoms_( downstream_stub_atoms ),
145  upstream_stub_atoms_( upstream_stub_atoms )
146  {
147  assert( downstream_stub_atoms.size() == 3 || downstream_stub_atoms.size() == 4 );
148  assert( upstream_stub_atoms.size() == 3 || upstream_stub_atoms.size() == 4 );
149  };
150 
151  /// @brief clone
153  return new DownJumpSRFD( *this );
154  };
155 
156  /// @brief create a new instance of this object
157  virtual
159  return new DownJumpSRFD();
160  }
161 
162  /// @brief set value of jump
163  void
165  rt_ = setting;
166  };
167 
168  void
169  set_stub_atoms( AtomList downstream, AtomList upstream );
170 
171  //@brief set stub atoms to "CA" as center and "N", "CA", "C" as stub atoms
172  void
174 
175  /// @brief the seq_pos is hijacked for the rt_nr
176 
177  virtual bool apply( pose::Pose&, Size const intra_frame_pos, Frame const& ) const;
178  virtual bool apply( kinematics::MoveMap const &, pose::Pose &, Size const intra_frame_pos, Frame const & ) const;
179  virtual bool apply_ss( std::string&, Size, Frame const& ) const { return true; }; //does nothing as jump has no ss
180 
181  bool steal( pose::Pose const&, Size pos, Frame const& );
182  bool is_compatible( SingleResidueFragData const& ) const;
183  bool is_applicable( kinematics::MoveMap const&, Size pos, Frame const& ) const;
184 
185 
186  // for DownJumpSRFD these functions should never be called
187  // might obsolet these completely and only use SRFDs via the func (pose, ipos, Frame ) variant
188  virtual bool apply(pose::Pose &, Size) const {
189  assert( 0 );
190  return false;
191  }
192 
193  /// @brief for DownJumpSRFD this function should never be called, instead use Frame version
194  /// @return always false
195  /// @warning will trigger a false runtime assert
196  virtual bool apply( kinematics::MoveMap const &, pose::Pose &, Size const ) const;
197 
198  // insert fragment_data sec-struct into ss-string at position seq_pos
199  virtual bool apply_ss( std::string&, Size) const {
200  assert( 0 );
201  return false;
202  }
203 
204  // insert fragment_data into pose at position seq_pos
205  virtual bool steal(pose::Pose const&, Size) {
206  assert( 0 );
207  return false;
208  }
209 
210  //
211  virtual bool
213  assert( 0 );
214  return false;
215  }
216 
217 // void get_stubs(
218 // pose::Pose const& pose,
219 // Size downstream_res_nr,
220 // id::StubID &up_stub,
221 // id::StubID &down_stub
222 // ) const;
223 
224  virtual
225  std::string type() const {
226  return _static_type_name();
227  }
228 
230  return "DownJump";
231  }
232 
233  virtual
234  void show( std::ostream &out ) const;
235 
236  virtual
237  void read( std::istream &in );
238 
239 private:
243 };
244 
245 }
246 }
247 
248 #endif