Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AntibodyInfo.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 protocols/antibody2/AntibodyInfo.hh
11 /// @brief
12 /// @author Jianqing Xu (xubest@gmail.com)
13 
14 #ifndef INCLUDED_protocols_antibody2_AntibodyInfo_hh
15 #define INCLUDED_protocols_antibody2_AntibodyInfo_hh
16 
18 
19 // Rosetta Headers
20 #include <protocols/loops/Loop.hh>
21 #include <protocols/loops/Loops.hh>
22 #include <utility/vector1.hh>
28 
29 
30 ///////////////////////////////////////////////////////////////////////////////
31 using namespace core;
32 using namespace utility;
33 namespace protocols {
34 namespace antibody2 {
35 
39  h2,
40  h3,
43  l1,
44  l2,
45  l3,
48 };
49 
51  Aroop = 1,
55  AHO,
57 };
58 
60  Begin = 1,
61  End,
64 };
65 
67  Kinked = 1,
70 };
71 
72 
73 struct FrameWork{
76  char chain_name;
77 };
78 
79 
80 
81 
83 
84 public:
85  AntibodyInfo( pose::Pose const & pose,
86  AntibodyNumberingEnum const & numbering_scheme = Aroop,
87  bool const & cdr_pdb_numbered = true);
88 
89 
90 public:
91 
92  /// @brief: get the current numbeirng scheme being used
94  return get_string_numbering_scheme()[numbering_scheme_];
95  }
96 
97  /// @brief return the loop of a certain loop type
99  return vector1_loopsop_having_cdr_[cdr_name];
100  }
101 
102  /// @brief return the loop of a certain loop type
103  loops::Loop get_CDR_loop( AntibodyCDRNameEnum const & cdr_name ) const{
104  return (*get_CDR_in_loopsop(cdr_name))[1];
105  }
106 
107  /// @brief return a LoopsOP object, which saves all the CDR Loop object
109  return loopsop_having_allcdrs_;
110  }
111 
112  /// @brief return the sequence of a particular CDR loop
113  vector1<char> get_CDR_Sequence_with_Stem( AntibodyCDRNameEnum const & cdr_name,
114  Size left_stem = 0,
115  Size right_stem = 0) const;
116 
117  /// @brief return the antibody sequence of LH or just H for camelid
118  vector1<char> const & get_Ab_Sequence() const {
119  return ab_sequence_;
120  }
121 
122  /// @brief intput an enum, and get a string for it
123  std::string get_CDR_Name(AntibodyCDRNameEnum const & cdr_name) const {
124  return get_string_cdr_name()[cdr_name];
125  }
126 
127  /// @brief return this antibody is camelid or not
128  bool is_Camelid() const {
129  return is_camelid_;
130  }
131 
132  /// @brief return the framework numbering information
134  return framework_info_;
135  }
136 
137  // FoldTrees //TODO: find a way to remove setup_simple_fold_tree
139  Size const & cutpoint,
140  Size const & jumppoint2,
141  pose::Pose const & pose ) const;
142 
143  kinematics::FoldTreeCOP get_FoldTree_AllCDRs_LHDock( pose::Pose & pose) const;
144  kinematics::FoldTreeCOP get_FoldTree_AllCDRs(pose::Pose const & pose) const;
145 
146  /// @brief SnugDock foldtrees
147  kinematics::FoldTree get_FoldTree_LH_A( pose::Pose const & pose ) const;
148  kinematics::FoldTree get_FoldTree_L_HA( pose::Pose const & pose ) const;
149  kinematics::FoldTree get_FoldTree_LA_H( pose::Pose const & pose ) const;
150 
151  /// TODO: this should be a standard utility for loops?
152  /// @brief get a movemap for loops
153  kinematics::MoveMap get_MoveMap_for_Loops(pose::Pose const & pose,
154  loops::Loops const & the_loops,
155  bool const & bb_only = false,
156  bool const & include_nb_sc = false,
157  Real const & nb_dist = 10.0) const;
158 
159  /// @brief get a movemap for loops and set the first jump be true
160  kinematics::MoveMap get_MoveMap_for_LoopsandDock(pose::Pose const & pose,
161  loops::Loops const & the_loops,
162  bool const & bb_only = false,
163  bool const & include_nb_sc = false,
164  Real const & nb_dist = 10.0) const;
165 
166  /// @brief TaskFactory
167  pack::task::TaskFactoryOP get_TaskFactory_AllCDRs(pose::Pose & pose) const;
168  pack::task::TaskFactoryOP get_TaskFactory_OneCDR(pose::Pose & pose, AntibodyCDRNameEnum const & cdr_name) const;
169 
170  /// @brief return num of cdr loops, 3 (nanobody) or 6 (regular antibody)
172  return total_cdr_loops_;
173  }
174 
175  /// @brief return whether this pose has antigen or not
176  bool get_PoseHasAntigen() const {
177  return InputPose_has_antigen_;
178  }
179 
180  /// @brief get H3 cterminal kink/extended conformation (predicted by constructor)
182  return predicted_H3_base_type_;
183  }
184 
185  /// @brief get residues used to calculate VL/VH packing angle
187  return packing_angle_residues_;
188  }
189 
190  /// @brief use the H3 cterm coordinates in the pose to calculate the cterminal type
191  //std::string calculate_H3_base_by_coordinates(pose::Pose const & pose) const;
192 
193  void show( std::ostream & out=std::cout );
194  friend std::ostream & operator<<(std::ostream& out, const AntibodyInfo & ab_info ) ;
195 
196 
197 // private functions
198 private:
199  /////////////////////////////////////////////////////////////////////////////////////////
200  /// all the setters ///
201  /////////////////////////////////////////////////////////////////////////////////////////
202  ///
203  void set_default();
204 
205  /// @brief check the input pose is nanobody, antibody or wrong
206  void identify_antibody(pose::Pose const & pose);
207 
208  /// @brief initialization
209  void init(pose::Pose const & pose);
210 
211  /// @brief setup the CDR loops objects based on the input numbering scheme
212  void setup_CDRsInfo( pose::Pose const & pose );
213 
214  /// @brief setup the framework information based on the input numbering scheme
215  void setup_FrameWorkInfo(pose::Pose const & pose );
216 
217  /// @brief setup the residues used to calculate VL/VH packing angle
218  void setup_VL_VH_packing_angle( pose::Pose const & pose );
219 
220  /// @brief predict H3 cterminus base as Kinked or Extended
221  void predict_H3_base_type( pose::Pose const & pose ) ;
222  void detect_and_set_camelid_CDR_H3_stem_type( pose::Pose const & pose );
223  void detect_and_set_regular_CDR_H3_stem_type( pose::Pose const & pose );
224  void detect_and_set_regular_CDR_H3_stem_type_new_rule( pose::Pose const & pose );
225 
226  /// @brief identify CDRs on L or H sequence
227  void identify_CDR_from_a_sequence(std::string const & querychain);
228  /// ///
229  /////////////////////////////////////////////////////////////////////////////////////////
230 
231 
232  /// @brief return the numbering scheme: e.g. numbering[Begin][h1]
233  vector1< vector1<Size> > get_CDR_NumberingInfo(AntibodyNumberingEnum const & numbering_scheme) const;
234 
235 
236  /// @brief copy
237  //void init_for_equal_operator_and_copy_constructor( AntibodyInfo & lhs, AntibodyInfo const & rhs);
238 
239  /// @brief all the static functions
240  static vector1<std::string> const & get_string_cdr_name(void);
241  static vector1<std::string> const & get_string_h3_base_type(void);
242  static vector1<std::string> const & get_string_numbering_scheme(void);
247 
248 /// private members
249 private:
250 
251  /// the information of the antibody pose
255 
256  /// the CDR and Framework information
257  vector1<loops::LoopsOP> vector1_loopsop_having_cdr_; // each Loops contains one CDR
258  loops::LoopsOP loopsop_having_allcdrs_; // one Loops object containing the set of Loop objects for all CDRs
262 
263  /// Antibody properties
267 
268 };
269 
270 
271 } //namespace antibody2
272 } //namespace protocols
273 
274 
275 #endif //INCLUDED_protocols_loops_AntibodyInfo_HH