Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HybridizeFoldtreeDynamic.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/hybridization/HybridizeFoldtreeDynamic.hh
11 /// @author Yifan Song
12 
13 #ifndef INCLUDED_protocols_hybridization_HybridizeFoldtreeDynamic_hh
14 #define INCLUDED_protocols_hybridization_HybridizeFoldtreeDynamic_hh
15 
16 // Unit headers
18 
19 // C/C++ headers
20 #include <string>
21 
22 // Project headers
23 #include <core/types.hh>
24 #include <core/pose/Pose.fwd.hh>
26 #include <protocols/loops/Loops.hh>
27 
28 #include <utility/vector1.hh>
29 
30 #include <set>
31 
32 namespace protocols {
33 namespace hybridization {
34 
36 public:
38 
39  // initialize pose ... add VRT if needed
40  void initialize(
41  core::pose::Pose & pose,
42  protocols::loops::Loops const & core_chunks,
43  utility::vector1< std::pair< core::Size, core::Size > > const & strand_pairs,
44  std::set<core::Size> const & strand_pair_library_positions
45  );
46  void reset( core::pose::Pose & pose );
47 
49 
50 private:
51  // HELPER FUNCTIONS
52 
53  // stochastically selects an anchor position
55 
56  // update pose fold tree with new chunks .. assume vrt already added
57  void update(core::pose::Pose & pose);
58 
59  // set the core chunks ... where anchors must lie and cuts are forbidden
60  void set_core_chunks(const protocols::loops::Loops & chunks);
61 
62  // fold tree
63  //void jumps_and_cuts_from_pose( core::pose::Pose & pose, utility::vector1< std::pair<int, int > > & jumps, utility::vector1< int > & cuts);
64  void jumps_and_cuts_from_foldtree( core::kinematics::FoldTree & foldtree, utility::vector1< std::pair<core::Size, core::Size > > & jumps, utility::vector1< core::Size > & cuts);
65 
66  // cutpoints selection logic
68 
69  // anchor selection logic
70  void choose_anchors();
71 
73  utility::vector1 < core::Size > cut_positions,
74  core::Size n_residues);
75 
76  // straind pairings
77 
78  // gets core chunks that are strand paired to a specific chunk
79  void get_pair_core_chunks( core::Size const chunk_index, utility::vector1<core::Size> & pair_chunks, utility::vector1<std::pair<core::Size, core::Size> > & pair_chunks_pairs );
80 
81  // gets a core chunk that covers a specific position
82  void get_core_chunk_index_from_position( core::Size const position, core::Size & index );
83 
85  core::Size const index,
87  utility::vector1<std::pair<core::Size, core::Size> > & jumps,
88  std::set<core::Size> & rooted_chunk_indices );
89 
90  void remove_cut( core::Size const cut, utility::vector1<core::Size> & cuts );
91 
92 private:
93  // DATA
94 
95  // segment the entire pose, defining cutpoints
98 
99  // segment pose into "core regions" where anchors may lie
102 
105 
106  /// index of the virtual residue we added to the pose in set_up()
110 
111  // backup original info
115 
116  // strand pairings
118  std::set<core::Size> strand_pair_library_positions_; // strand pair positions that are from the pairing library (not from a pdb template)
119  std::set<core::Size> template_core_chunk_indices_; // core_chunks_ indices of chunks from templates (not from pairing library)
120  std::set<core::Size> rooted_chunk_indices_; // chunk indices that have a jump to the root of the star fold tree
121 
122 };
123 
124 } // namespace hybridization
125 } // namespace protocols
126 
127 #endif // INCLUDED_protocols_hybridization_HybridizeFoldtreeDynamic_hh