Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 // :noTabs=false:tabSize=4:indentSize=4:
4 //
5 // (c) Copyright Rosetta Commons Member Institutions.
6 // (c) This file is part of the Rosetta software suite and is made available under license.
7 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
8 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
9 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
10 //
11 /// @brief some utilities for fragments
12 /// @author Oliver Lange (olange@u.washington.edu)
13 /// @date Wed Oct 20 12:08:31 2007
14 #ifndef INCLUDED_core_fragment_util_HH
15 #define INCLUDED_core_fragment_util_HH
16 
17 // Project Headers
18 #include <core/types.hh>
20 // AUTO-REMOVED #include <core/kinematics/Stub.hh>
21 #include <core/pose/Pose.fwd.hh>
23 
24 // Utility headers
25 // AUTO-REMOVED #include <numeric/xyzVector.hh>
26 #include <utility/vector1.fwd.hh>
27 
35 #include <utility/vector1.hh>
36 #include <set>
37 
38 namespace core {
39 namespace fragment {
40 
47 
48 void xform_pose(core::pose::Pose& pose,
49  const core::kinematics::Stub& s,
50  core::Size sres = 1,
51  core::Size eres = 0);
52 
53 /// @brief Removes all but the top <k> fragments from <fragments>
54 void retain_top(core::Size k, FragSetOP fragments);
55 
58 );
59 
61  pose::Pose const & pose_in,
62  FragSet & fragset,
64 );
65 
67  pose::Pose const& pose_in,
68  Size const begin,
69  Size const end,
70  FragSet& fragset,
72 );
73 
75  pose::Pose const & pose_in,
76  FragSet & fragset,
78  std::set< core::Size > const& active_residues
79 );
80 
81 /// @brief Function for chopping the X-sized fragments in source into fragments that
82 /// go into N-sized fragments in dest. Sizes are encoded by the value of
83 /// max_frag_length() in both source and dest.
84 void chop_fragments(
86 );
87 
88 // undocumented function which passes variables around by reference for no obviou
89 // reason. Awesome.
91  core::fragment::FragSet const & frags,
93 );
94 
95 // create new FragSet ( same type as good_frags ) and fill up with frags from
96 // filling such that at each residue mn_nr_frags are available bRandom =>
97 // select fill fragments randomly
98 FragSetOP merge_frags( FragSet const& good_frags, FragSet const& filling, core::Size min_nr_frags, bool bRandom = true );
99 
100 void flatten_list( FrameList & frames, FragID_List& frag_ids );
101 
102 /// @brief goes through all frag_data in the frame and puts the
103 /// best scoring one into the pose, i.e. quenches the frame
104 void
106  pose::Pose & pose,
107  Frame const & frame,
108  scoring::ScoreFunction const & sfxn
109 );
110 
111 /// @brief writes FragData in multimodel pdb format
112 /// start_tag can be used to only write a subset
113 /// of the contained frag data
114 void dump_frames_as_pdb(
115  pose::Pose const & pose,
116  utility::vector1< FrameOP > const & frames,
117  std::string const filename,
118  core::Size start_frag = 1
119 );
120 
121 /// @brief filling a frameset from a multimodel pdb file
122 /// @brief returns true if no error occured
124  pose::Pose const & pose,
125  utility::vector1< FrameOP > const & template_frames,
126  std::string const filename
127 );
128 
129 void read_std_frags_from_cmd( FragSetOP& fragset_large, FragSetOP& fragset_small );
130 
131 /// @brief given a JumpFrame with Up and DownJumpSRFDs as LAST SRFDs this will make a fold-tree compatible with the
132 /// Frame... this is NOT GOOD for sampling, since it introduces cut-points outside of fragments
133 /// later for sampling: one could probably write a routine that looks if it can move existing Jumps in Fold-tree to
134 /// fit the FRAME ... if not it returns failure...
135 void make_simple_fold_tree_from_jump_frame( Frame const&, core::Size total_residue, kinematics::FoldTree& new_fold_tree );
136 
137 void
138 fragment_set_slice ( ConstantLengthFragSetOP & fragset, Size const & min_res, Size const & max_res );
139 
140 void
141 make_pose_from_frags( pose::Pose & pose, std::string sequence, utility::vector1<FragDataCOP> frags, bool chains = false );
142 
143 } //fragment
144 } //core
145 
146 #endif