Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
StepWiseRNA_Util.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 Rhiju Das
15 
16 
17 #ifndef INCLUDED_protocols_swa_rna_StepWiseRNA_Util_hh
18 #define INCLUDED_protocols_swa_rna_StepWiseRNA_Util_hh
19 
20 
27 #include <core/pose/Pose.fwd.hh>
28 #include <core/types.hh>
30 #include <utility/vector1.hh>
31 #include <numeric/xyzMatrix.hh>
32 #include <numeric/xyzVector.hh>
33 #include <string>
34 #include <map>
35 #include <core/chemical/AA.hh>
38 #include <numeric/angle.functions.hh>
42 #include <set>
43 
44 
46 
47 namespace protocols {
48 namespace swa {
49 namespace rna {
50 
51 bool Is_O1P_atom(std::string const & atom_name);
52 bool Is_O2P_atom(std::string const & atom_name);
53 bool Is_P_atom(std::string const & atom_name);
54 bool Is_O2star_atom(std::string const & atom_name);
55 bool Is_O3star_atom(std::string const & atom_name);
56 bool Is_O4star_atom(std::string const & atom_name);
57 bool Is_O5star_atom(std::string const & atom_name);
58 bool Is_C2star_atom(std::string const & atom_name);
59 bool Is_C3star_atom(std::string const & atom_name);
60 bool Is_C4star_atom(std::string const & atom_name);
61 bool Is_C5star_atom(std::string const & atom_name);
62 bool Is_1H5star_atom(std::string const & atom_name);
63 bool Is_2H5star_atom(std::string const & atom_name);
64 bool Is_H3star_atom(std::string const & atom_name);
65 bool Is_H4star_atom(std::string const & atom_name);
66 bool Is_three_prime_phosphate_atom(std::string const & atom_name);
67 bool Is_five_prime_phosphate_atom(std::string const & atom_name);
68 bool Is_phosphate_atom(std::string const & atom_name);
69 
70 
71 void
73 
74 bool
76 
77 bool
79 
80 void
81 apply_protonated_H1_adenosine_variant_type(core::pose::Pose & pose, core::Size const & seq_num, bool const apply_check=true);
82 
83 void
84 apply_virtual_rna_residue_variant_type(core::pose::Pose & pose, core::Size const & seq_num, bool const apply_check=true);
85 
86 void
87 apply_virtual_rna_residue_variant_type(core::pose::Pose & pose, core::Size const & seq_num, utility::vector1< core::Size > const & working_cutpoint_closed_list, bool const apply_check=true);
88 
89 void
91 
92 bool
94 
95 void
97 
98 // Undefined, commenting out to fix PyRosetta build core::Size get_matching_atom_name(std::string const & atom_name, core::conformation::Residue const & rsd);
99 
100 void
102  core::conformation::Residue const & rsd_2,
104  bool const base_only=true);
105 
106 
107 void
109  core::conformation::Residue const & rsd_2,
110  core::Size const res_num_1,
111  core::Size const res_num_2, //allow for the possibility that two poses have different sizes Jun 9, 2010
113  bool const base_only=true);
114 
115 void
117  core::pose::Pose const & pose_2,
118  core::Size const base_res,
120  bool const base_only=true);
121 
122 
123 void
124 setup_suite_atom_id_map(core::pose::Pose const & pose_1, ////Dec 23, 2011.
125  core::pose::Pose const & pose_2,
126  core::Size const base_res_1,
127  core::Size const base_res_2,
129  bool const base_only=true);
130 
131 
133 create_alignment_id_map( core::pose::Pose & mod_pose, core::pose::Pose const & ref_pose, utility::vector1< core::Size > const & rmsd_residue_list, bool const base_only=true);
134 
135 void
136 align_poses( core::pose::Pose & moving_pose,
137  std::string const moving_tag,
138  core::pose::Pose const & static_pose,
139  std::string const static_tag,
140  utility::vector1< core::Size > const & working_best_alignment,
141  bool const base_only=true);
142 
144 apply_full_to_sub_mapping( utility::vector1< core::Size > const & res_vector, utility::vector1< core::Size > const & is_working_res, std::map< core::Size, core::Size > const & full_to_sub);
145 
148 
149 
150 void
151 ensure_valid_full_seq_num(core::Size const full_seq_num, StepWiseRNA_JobParametersCOP const & job_parameters);
152 
153 bool
154 check_is_working_res(core::Size const full_seq_num, StepWiseRNA_JobParametersCOP const & job_parameters);
155 
157 check_validity_and_get_working_res(core::Size const full_seq_num, StepWiseRNA_JobParametersCOP const & job_parameters);
158 
159 
162 
163 std::map< core::Size, core::Size >
165 
166 /*
167 utility::vector1< core::Size >
168 apply_sub_to_full_mapping( utility::vector1< core::Size > const & working_res_vector, StepWiseRNA_JobParametersOP & job_parameters);
169 */
170 /*
171 utility::vector1< core::Size >
172 apply_full_to_sub_mapping( utility::vector1< core::Size > const & res_vector, StepWiseRNA_JobParametersOP & job_parameters);
173 */
174 /*
175 
176 */
177 
179 string_to_int(std::string const input_string);
180 
182 string_to_real(std::string const input_string);
183 
184 
186 Tokenize(std::string const str, std::string delimiters);
187 
188 bool
189 Contain_seq_num(core::Size const & seq_num, utility::vector1< std::pair< core::Size, core::Size > > const & residue_pair_list);
190 
191 bool
192 Contain_seq_num(core::Size const & seq_num, utility::vector1< core::Size > const & residue_list);
193 
194 bool
196 
197 void
198 output_pair_size(std::pair<core::Size, core::Size> const & pair_size);
199 
200 void
201 output_pair_size_vector(utility::vector1 <std::pair<core::Size, core::Size> > const & pair_size_vector, std::string const & output_string, core::Size const spacing=40);
202 
203 bool
204 pair_sort_citeria(std::pair<core::Size, core::Size> pair_one, std::pair<core::Size, core::Size> pair_two);
205 
207 
208 void Output_seq_num_list(std::string const tag, utility::vector1<core::Size> const & seq_num_list, core::Size const spacing=40);
209 
210 bool
211 Is_equivalent_vector(utility::vector1<core::Size> const & seq_num_list_1, utility::vector1<core::Size> const & seq_num_list_2);
212 
213 void Output_is_prepend_map(std::string const tag, std::map< core::Size, bool > const & my_map, core::Size const max_seq_num, core::Size const tag_spacing=40);
214 
215 void
216 Output_bool_list(std::string const tag, utility::vector1< bool > const & bool_list, core::Size const spacing=40);
217 
218 void
219 Output_bool_list(std::string const tag, utility::vector1< core::Size > const & size_list, core::Size const spacing=40);
220 
221 void
222 Output_size_list(std::string const tag, utility::vector1< core::Size > const & size_list, core::Size const spacing=40);
223 
224 // Undefined, commenting out to fix PyRosetta build bool seq_num_list_sort_citeria(core::Size seq_num_1, Residue_info seq_num_2);
225 
226 void
227 Sort_pair_list(utility::vector1< std::pair<core::Size, core::Size> > pair_list);
228 
229 bool
231 
232 //core::Size
233 //Get_five_prime_chain_break(core::pose::Pose const & pose);
234 
235 void
237 
238 void
239 Output_fold_tree_info(core::kinematics::FoldTree const & fold_tree, std::string const pose_name);
240 
241 void
242 Output_fold_tree_info(core::pose::Pose const & pose, std::string pose_name);
243 
244 bool
245 file_exists(std::string const & file_name);
246 
247 void
248 remove_file(std::string const & file_name);
249 
250 void
252 
253 void
255 
256 bool
258 
260 suite_rmsd(core::pose::Pose const & pose1,core::pose::Pose const & pose2, core::Size const & seq_num, bool const prepend_res, bool const ignore_virtual_atom=false);
261 
263 full_length_rmsd_over_residue_list(core::pose::Pose const & pose1, core::pose::Pose const & pose2, utility::vector1 < core::Size > const & residue_list, std::string const & full_sequence, bool const verbose, bool const ignore_virtual_atom);
264 
265 
267 rmsd_over_residue_list(core::pose::Pose const & pose1, core::pose::Pose const & pose2, utility::vector1 < core::Size > const & residue_list, std::map< core::Size, core::Size > const & full_to_sub, std::map< core::Size, bool > const & Is_prepend_map, bool const verbose, bool const ignore_virtual_atom=false);
268 
270 rmsd_over_residue_list(core::pose::Pose const & pose1, core::pose::Pose const & pose2, StepWiseRNA_JobParametersCOP job_parameters_, bool const ignore_virtual_atom=false);
271 
272 void
273 Print_heavy_atoms(core::Size const & suite_num_1, core::Size const & suite_num_2, core::pose::Pose const & pose1, core::pose::Pose const & pose2);
274 
276 Get_num_side_chain_atom_from_res_name(core::chemical::AA const & res_aa, bool const verbose);
277 
278 
279 void
280 base_atoms_square_deviation(core::pose::Pose const & pose1, core::pose::Pose const & pose2, core::Size const & moving_res_1, core::Size const & moving_res_2, core::Size& atom_count, core::Real& sum_sd, bool verbose, bool const ignore_virtual_atom);
281 
282 void
283 phosphate_square_deviation(core::pose::Pose const & pose1, core::pose::Pose const & pose2, core::Size const & moving_res_1, core::Size const & moving_res_2, core::Size& atom_count, core::Real& sum_sd, bool verbose, bool const ignore_virtual_atom);
284 
286 phosphate_base_phosphate_rmsd(core::pose::Pose const & pose1, core::pose::Pose const & pose2, core::Size const & moving_res_num, bool const ignore_virtual_atom);
287 
288 void
289 phosphate_base_phosphate_square_deviation(core::pose::Pose const & pose1, core::pose::Pose const & pose2, core::Size const & moving_res_1, core::Size const & moving_res_2, core::Size & atom_count, core:: Real & sum_sd, bool verbose, bool const ignore_virtual_atom);
290 
292 atom_square_deviation(core::conformation::Residue const & rsd_1, core::conformation::Residue const & rsd_2, core::Size const & atomno_1, core::Size const & atomno_2, bool verbose);
293 
294 void
295 suite_square_deviation(core::pose::Pose const & pose1, core::pose::Pose const & pose2, bool const & prepend_res, core::Size const & moving_res_1, core::Size const & moving_res_2, core::Size& atom_count, core::Real& sum_sd, bool verbose, bool const ignore_virtual_atom);
296 
297 void
298 Output_title_text(std::string const title);
299 
300 bool
302 
303 bool
304 Check_chain_closable(core::pose::Pose const & pose, core::Size const five_prime_chain_break_res, core::Size const gap_size );
305 
306 bool
308  core::pose::Pose const & three_prime_pose,
309  core::Size const five_prime_chain_break_res,
310  core::Size const gap_size );
311 
312 void
314  core::conformation::Residue const & three_prime_rsd,
315  core::Distance & C4_C3_dist_min,
316  core::Distance & C4_C3_dist_max);
317 
318 void
320 
321 void
322 Output_boolean(std::string const & tag, bool boolean);
323 
324 void
325 Output_boolean(bool boolean);
326 
327 void
329 
331 get_surrounding_O2star_hydrogen(core::pose::Pose const & pose, utility::vector1< core::Size > const & moving_res, bool verbose=false);
332 
333 void
334 o2star_minimize(core::pose::Pose& pose, core::scoring::ScoreFunctionOP const & packer_scorefxn);
335 
336 void
337 o2star_minimize(core::pose::Pose& pose, core::scoring::ScoreFunctionOP const & packer_scorefxn, utility::vector1< core::Size > const & O2star_seq_num_list);
338 
340 create_standard_o2star_pack_task(core::pose::Pose const & pose, utility::vector1< core::Size > const & O2star_pack_seq_num);
341 
342 void
343 print_backbone_torsions(core::pose::Pose const & pose, core::Size five_prime_chainbreak);
344 
345 void
346 Correctly_position_cutpoint_phosphate_torsions(core::pose::Pose & current_pose, core::Size const five_prime_chainbreak, bool verbose=false);
347 
348 void
349 copy_torsions_FROM_TO( core::id::TorsionID const start_torsion_ID, core::id::TorsionID const end_torsion_ID, core::pose::Pose const & template_pose, core::pose::Pose & pose);
350 
352 setup_chain_break_jump_point( core::pose::Pose & pose, core::Size const jump_point_one, core::Size const jump_point_two , core::Size const five_prime_cutpoint, bool const verbose);
353 
354 void
355 remove_chain_break_jump_point(core::pose::Pose & pose, core::Size const five_prime_cutpoint, core::kinematics::FoldTree const fold_tree_without_cutpoint);
356 
358 setup_bulge_jump_point( core::pose::Pose & pose, core::Size const & moving_base, core::Size const & reference_base , bool verbose=false);
359 
361 make_cut_at_moving_suite( core::pose::Pose & pose, core::Size const & moving_suite );
362 
364 make_cut_at_moving_suite( core::kinematics::FoldTree & fold_tree, core::Size const & moving_suite );
365 
366 void
368 
369 bool
371 
372 BaseState
373 Get_residue_base_state(core::pose::Pose const & pose, core::Size const seq_num);
374 
376 Get_residue_pucker_state(core::pose::Pose const & pose, core::Size const seq_num, bool verbose=false);
377 
378 bool
379 Is_same_ribose_pucker(core::pose::Pose const & current_pose, core::pose::Pose const & cluster_center_pose, core::Size const seq_num);
380 
381 
382 void
383 sleep(core::Size mseconds);
384 
385 
386 void
388 
389 
390 void
393  numeric::xyzVector<core::Real> > > & xyz_list,
394  core::Size const & seq_num,
395  core::conformation::Residue const & rsd_at_origin,
396  core::kinematics::Stub const & moving_res_base_stub);
397 
398 
399 void
401  core::pose::Pose & import_pose,
402  std::string const & silent_file,
403  std::string const & input_tag);
404 
405 
407 path_basename(std::string const full_path);
408 
409 bool
411  core::Size const & res_ONE,
412  core::pose::Pose const & pose_ONE,
413  core::Size const & res_TWO,
414  core::pose::Pose const & pose_TWO,
415  core::Real const atom_atom_overlap_dist_cutoff,
416  core::Size const num_atom_contacts_cutoff,
417  bool const verbose=false);
418 
419 void
421  core::pose::Pose & pose,
422  core::Size const five_prime_res);
423 
424 void
426  utility::vector1< core::Size > & allow_bulge_res_list,
427  core::pose::Pose const & pose,
428  bool const verbose);
429 
432  utility::vector1< core::Size > const & in_allow_bulge_res_list,
433  core::scoring::ScoreFunctionOP const & scorefxn,
434  std::string const & tag,
435  bool const allow_pre_virtualize,
436  bool const allow_consecutive_bulges,
437  bool const verbose);
438 
440 get_tag_from_pdb_filename(std::string const pdb_filename);
441 
442 void
444  core::kinematics::FoldTree & fold_tree,
445  std::string const & working_sequence);
446 
447 void
448 print_JobParameters_info(StepWiseRNA_JobParametersOP const & JP, std::string const JP_name, bool const Is_simple_full_length_JP=false);
449 
450 void
451 print_JobParameters_info(StepWiseRNA_JobParametersCOP const & const_JP, std::string const JP_name, bool const Is_simple_full_length_JP=false);
452 
453 //void
454 //add_native_base_pair_stats( core::io::silent::SilentStructOP & s, core::pose::Pose const & native_pose, utility::vector1 < core::Size > const & input_rmsd_res_list);
455 
456 //void
457 //add_base_pair_stats( core::io::silent::SilentStructOP &s, core::pose::Pose const & pose, core::pose::Pose const & native_pose, utility::vector1 < core::Size > const & input_rmsd_res_list);
458 
459 void
461 
462 void
463 print_atom_info(core::pose::Pose const & pose, core::Size const seq_num, std::string const pose_name);
464 
465 void
466 print_individual_atom_info(core::conformation::Residue const & rsd, core::Size const atomno, std::string const rsd_name);
467 
468 void
469 print_base_state(std::string const tag, BaseState const base_state);
470 
471 void
472 print_ribose_pucker_state(std::string const tag, PuckerState const pucker_state);
473 
474 
475 void
477  core::scoring::ScoreFunctionOP const & scorefxn,
478  core::scoring::ScoreFunctionOP & sampling_scorefxn,
479  core::scoring::ScoreFunctionOP & atr_rep_screening_scorefxn,
480  core::scoring::ScoreFunctionOP & chainbreak_scorefxn,
481  core::scoring::ScoreFunctionOP & o2star_pack_scorefxn);
482 
483 
484 void
485 copy_all_o2star_torsions(core::pose::Pose & mod_pose, core::pose::Pose const & template_pose);
486 
488 rescale_scorefxn(core::scoring::ScoreFunctionOP const & starting_scorefxn, core::Real const scaling_factor);
489 
490 void
492 //Doesn't work on MAC!!
493 //void
494 //process_mem_usage(double& vm_usage, double& resident_set, core::Size count);
495 
496 }
497 }
498 }
499 
500 #endif