Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ResiduePairJumpSetup.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 ResiduePairJumpSetup
11 /// @brief setup jumps specifically to ResiduePairJump, read in definition file
12 /// @detailed derived from BaseJumpSetup
13 /// @author Chu Wang
14 
15 
16 #ifndef INCLUDED_protocols_jumping_ResiduePairJumpSetup_hh
17 #define INCLUDED_protocols_jumping_ResiduePairJumpSetup_hh
18 
19 // Unit Headers
21 
22 // Package Headers
26 
27 // Project Headers
28 
29 // ObjexxFCL Headers
30 
31 // Utility headers
32 
33 //// C++ headers
34 #include <string>
35 
36 #include <utility/vector1.hh>
37 
38 
39 
40 namespace protocols {
41 namespace jumping {
42 
43 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
44 /// forward declaration
45 class JumpSample;
46 
47 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
49 public:
50  class JumpDef {
51  public:
52  JumpDef( Interval jump, Interval cut_reg ) :
53  jump_( jump ), cut_reg_ ( cut_reg) { };
54 
57  };
58 
60  return "ResiduePairJumpSetup";
61  }
62 
63 public:
64 
67 
68 
69  //@brief c'stor
71  total_residue_( 0 ), root_( 1 )
72  {};
73 
74  //@brief c'stor
76  total_residue_( total_residue )
77  {};
78 
79  //@brief add a new jump to the list
80  void
81  add_jump( JumpDef const& jd ) {
82  jumps_.push_back ( jd );
83  }
84 
85  void
86  add_jump( Interval const& jump, Interval const& cut_reg ) {
87  add_jump( JumpDef( jump, cut_reg ) );
88  }
89 
90  void
92  add_jump( JumpDef( Interval( js, je ), Interval( crs, cre ) ) );
93  }
94 
95  void
97  ResiduePairJumps_.push_back( ptr );
98  }
99 
100  void
102  runtime_assert( root >= 1 && root <= total_residue_ );
103  root_ = root;
104  };
105 
106  core::Size
107  root() const {
108  return root_;
109  };
110 
111  core::Size
112  size() const {
113  return jumps_.size();
114  };
115 
117  begin() const {
118  return jumps_.begin();
119  };
120 
122  end() const {
123  return jumps_.end();
124  };
125 
126  void
127  read_file( std::string file );
128 
129  JumpSample
130  create_jump_sample( ) const;
131 
132  virtual JumpSample
133  clean_jumps( JumpSample const& js) const {
134  std::cerr << "ERROR ERROR ERROR unimplemented method!;";
135  return js;
136  }
137 
139  generate_jump_frags( JumpSample const&, core::kinematics::MoveMap const& mm) const;
140 
141  core::Size
142  total_residue() const {
143  return total_residue_;
144  }
145  void clear() {
146  jumps_.clear();
147  }
148 
149 private:
154 };
155 
156 
157 } //jumping
158 } //protocols
159 #endif