Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
StepWiseRNA_VirtualRiboseSampler.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 StepWiseRNA_Util.hh
11 /// @brief
12 /// @detailed
13 ///
14 /// @author Parin Sripakdeevong
15 
16 
17 #ifndef INCLUDED_protocols_swa_rna_StepWiseRNA_VirtualRiboseSampler_HH
18 #define INCLUDED_protocols_swa_rna_StepWiseRNA_VirtualRiboseSampler_HH
19 
20 #include <core/pose/Pose.fwd.hh>
21 #include <core/types.hh>
22 #include <utility/vector1.hh>
23 #include <numeric/xyzMatrix.hh>
24 #include <numeric/xyzVector.hh>
25 #include <string>
26 #include <map>
27 #include <core/chemical/AA.hh>
30 #include <numeric/angle.functions.hh> // Need this to prevent the compiling error: 'principal_angle_degrees' is not a member of 'numeric' Oct 14, 2009
34 #include <set>
35 #include <ObjexxFCL/string.functions.hh>
40 
43 #include <protocols/swa/rna/StepWiseRNA_JobParameters.hh> //June 02, 2011
44 #include <core/pose/Pose.hh> //June 02, 2011
45 #include <core/scoring/rna/RNA_Util.hh> //June 02, 2011
46 
47 
48 namespace protocols {
49 namespace swa {
50 namespace rna {
51 
53 
54  public:
55 
57  score( 0.0 ),
58  tag("tag_blah"),
59  base_tag("base_tag_blah"),
60  Is_chain_close(false),
61  base_rep_score(999999)
62 
63  {
64  }
65 
67 
68  public:
69 
78 
79 };
80 
81 
82 
84 
85  public:
86 
87 
88  FloatingBaseChainClosureJobParameter(core::Size const input_moving_res, core::Size const input_reference_res):
89  sample_sugar(true),
90  moving_res ( input_moving_res ),
91  reference_res( input_reference_res ),
96  {
97 
98  PDL.clear(); //pose_data_list
99  Is_prepend= (moving_res>reference_res) ? false: true;
103 
104  ////////////////////////Consistency check!////////////////////////////////////////
105  if(Is_prepend){
106  if(moving_res+2!=reference_res){
107  std::cout << "moving_res= " << moving_res << " reference_res= " << reference_res;
108  utility_exit_with_message("prepend, but moving_res+2!=reference_res!");
109  }
110  }else{
111  if(moving_res-2!=reference_res){
112  std::cout << "moving_res= " << moving_res << " reference_res= " << reference_res;
113  utility_exit_with_message("append, but moving_res-2!=reference_res!");
114  }
115  }
116 
117  }
118 
120  sample_sugar( false)
121  {
122  PDL.clear(); //pose_data_list
123  };
124 
126 
127 
128  void
129  check_compatibility(core::Size const nres) const{
130  using namespace ObjexxFCL;
131 
132  if(moving_res<1 || moving_res> nres) utility_exit_with_message( "moving_res<1 || moving_res> nres. moving_res= " + string_of(moving_res) );
133  if(bulge_res <1 || bulge_res> nres) utility_exit_with_message( "bulge_res <1 || bulge_res> nres. bulge_res= " + string_of(bulge_res) );
134  if(reference_res<1 || reference_res> nres) utility_exit_with_message( "reference_res<1 || reference_res> nres. reference_res= " + string_of(reference_res) );
135 
136  //Should check here that moving_res contain virtual ribose and bulge_res is a virtual_rna_residue?
137  }
138 
139  void
141 
142  ////////////////////////June 02, 2011 Add BaseState and PuckerState information///
144  if( Contain_seq_num(moving_res, JP->working_force_north_ribose_list() ) ) moving_res_pucker_state=NORTH;
145  if( Contain_seq_num(moving_res, JP->working_force_south_ribose_list() ) ) moving_res_pucker_state=SOUTH;
146 
148  if( Contain_seq_num(moving_res, JP->working_force_syn_chi_res_list() ) ) moving_res_base_state=SYN;
149 
151  if( Contain_seq_num(bulge_res, JP->working_force_north_ribose_list() ) ) bulge_res_pucker_state=NORTH;
152  if( Contain_seq_num(bulge_res, JP->working_force_south_ribose_list() ) ) bulge_res_pucker_state=SOUTH;
153 
155  if( Contain_seq_num(bulge_res, JP->working_force_syn_chi_res_list() ) ) bulge_res_base_state=SYN;
156 
157  ////////////////////////Print data!////////////////////////////////////////
158  std::cout << "FloatingBaseChainClosureJobParameter: " << std::endl;
159  Output_boolean(" Is_prepend= " , Is_prepend);
160  std::cout << " reference_res=" << reference_res;
161 
162  std::cout <<" moving_res=" << moving_res;
163  print_base_state("|base_state=", moving_res_base_state );
165 
166  std::cout << " bulge_res= " << bulge_res;
167  print_base_state("|base_state=", bulge_res_base_state );
169 
170  std::cout << " bulge_suite= " << bulge_suite << " five_prime_chain_break= " << five_prime_chain_break;
171 
172  }
173 
174  public:
186  utility::vector1< pose_data_struct2 > PDL; //pose_data_list of possible ribose conformations.
187 
188 };
189 
190 
191 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
192 
193 bool
194 fast_full_atom_VDW_repulsion_screen(core::pose::Pose const & pose, core::Size const res_1, core::Size const res_2, bool const Is_prepend);
195 
196 
197 //Duplication of Chain_break_screening function from StepWiseRNA_ResidueSampler.cc. NEED TO MERGE THEM BACK TOGETHER AFTER TESTING! Apr 20,2010. Parin S.
198 bool
200  core::Real const & base_rep_score,
201  core::scoring::ScoreFunctionOP const & atr_rep_screening_scorefxn,
202  SillyCountStruct & count_data,
203  bool const verbose);
204 
205 //Duplication of Chain_break_screening function from StepWiseRNA_ResidueSampler.cc. NEED TO MERGE THEM BACK TOGETHER AFTER TESTING! Apr 20,2010. Parin S.
206 bool
207 floating_base_chain_break_screening(core::pose::Pose & chain_break_screening_pose,
208  core::scoring::ScoreFunctionOP const & chainbreak_scorefxn,
209  SillyCountStruct & count_data,
210  core::Size const & five_prime_res,
211  std::string const & tag,
212  bool const verbose);
213 
214 
217  FloatingBaseChainClosureJobParameter const & FB_job_params,
218  core::scoring::ScoreFunctionOP const & atr_rep_screening_scorefxn,
219  core::scoring::ScoreFunctionOP const & full_scorefxn,
220  core::pose::Pose & viewer_pose,
221  bool const do_minimize);
222 
223 void
225  core::pose::Pose & viewer_pose,
226  FloatingBaseChainClosureJobParameter const & FB_job_params,
227  core::scoring::ScoreFunctionOP const & chainbreak_scorefxn,
228  core::scoring::ScoreFunctionOP const & atr_rep_screening_scorefxn,
229  StepWiseRNA_VDW_Bin_ScreenerOP const & VDW_bin_screener,
230  bool const CCD_grid_index_screen);
231 
232 
235  core::pose::Pose & viewer_pose,
236  core::scoring::ScoreFunctionOP const & sampling_scorefxn,
237  FloatingBaseChainClosureJobParameter const & FB_job_params,
238  bool const rm_chain_break_jump_point=true);
239 
242  FloatingBaseChainClosureJobParameter const & FB_job_params,
243  std::string const name,
244  core::scoring::ScoreFunctionOP const & scorefxn,
245  core::scoring::ScoreFunctionOP const & sampling_scorefxn,
246  core::scoring::ScoreFunctionOP const & atr_rep_screening_scorefxn,
247  core::scoring::ScoreFunctionOP const & chainbreak_scorefxn,
248  StepWiseRNA_JobParametersCOP & job_parameters,
249  bool const virtual_ribose_is_from_prior_step=true);
250 
251 
252 void
255  utility::vector1< pose_data_struct2 > & pose_data_list,
256  core::scoring::ScoreFunctionOP const & sampling_scorefxn,
257  StepWiseRNA_JobParametersCOP const & job_parameters,
258  bool const virtual_ribose_is_from_prior_step=true);
259 
260 
261 bool
262 Is_ribose_virtual( core::pose::Pose const & pose, core::Size const previous_moving_res, core::Size const previous_bulge_res);
263 
264 void
266 
267 void
270  core::pose::Pose const & pose);
271 
272 
274 setup_FB_CC_JP_list(core::pose::Pose const & pose, utility::vector1< std::string > const & sample_virtual_ribose_string_list, StepWiseRNA_JobParametersCOP & job_parameters);
275 
276 void
277 sample_user_specified_virtual_riboses(core::pose::Pose & pose, utility::vector1< std::string > const & sample_virtual_ribose_string_list,
278  StepWiseRNA_JobParametersCOP & job_parameters, core::scoring::ScoreFunctionOP const & scorefxn,
279  std::string const silent_file_out, std::string const input_tag);
280 
281 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
282 
283 
284 }
285 }
286 }
287 
288 #endif