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 //
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 core/kinematics/util.hh
11 /// @brief Kinematics utility functions
12 /// @author Phil Bradley
13 
14 
15 #ifndef INCLUDED_core_kinematics_util_hh
16 #define INCLUDED_core_kinematics_util_hh
17 
18 
19 // Package headers
21 // AUTO-REMOVED #include <core/kinematics/Edge.fwd.hh>
23 // AUTO-REMOVED #include <core/kinematics/AtomTree.fwd.hh>
25 #include <core/id/AtomID.fwd.hh>
26 // AUTO-REMOVED #include <core/id/AtomID_Map.hh> // FWD doesnt get AtomMap for slice
27 // AUTO-REMOVED #include <core/id/DOF_ID_Map.fwd.hh>
28 // AUTO-REMOVED #include <core/id/DOF_ID_Mask.fwd.hh>
29 // AUTO-REMOVED #include <core/id/TorsionID.fwd.hh>
31 // AUTO-REMOVED #include <core/kinematics/types.hh>
32 
33 // ObjexxFCL headers
34 // AUTO-REMOVED #include <ObjexxFCL/FArray.all.fwd.hh>
35 #include <ObjexxFCL/FArray1D.fwd.hh>
36 
37 // Numeric headers
38 // AUTO-REMOVED #include <numeric/xyzMatrix.fwd.hh>
39 
40 #include <core/types.hh>
41 
42 #include <string>
43 #include <map>
44 
45 
46 namespace core {
47 namespace kinematics {
48 
50 
51 /// @brief creat an atom and add it to the residue atom-tree based on information stored in links.
53 add_atom(
54  int const atomno,
55  int const seqpos,
57  AtomPointer1D & atom_ptr,
58  bool const add_jump_atom
59 );
60 
61 int
63  Size const n_res,
64  ObjexxFCL::FArray1D_float const & cut_bias_sum
65 );
66 
69  utility::vector1< id::AtomID > mainchain, // make our own local copy
70  id::AtomID const & downstream_id, // mainchain child of last mainchain atom
71  AtomPointer2D const & old_atom_pointer,
72  utility::vector1< std::pair< Size, Size > > const & edges,
73  Size const first_new_pseudo_residue
74 );
75 
76 /// @brief prints something like this ***1***C***1*********2***C********3****C****2********3*****
77 void
78 simple_visualize_fold_tree( FoldTree const & fold_tree, std::ostream& out );
79 
80 /// @brief prints something like this ***1***C***1*********2***C********3****C****2********3*****
81 /// **********xxxxxxxxxxxxx************************************
82 void
83 simple_visualize_fold_tree_and_movemap( FoldTree const & fold_tree, MoveMap const& mm, std::ostream& out );
84 
85 /// @brief prints something like this ***1***C***1*********2***C********3****C****2********3*****
86 /// **********xxxxxxxxxxxxx************************************
87 void
88 simple_visualize_fold_tree_and_movemap_bb_chi( FoldTree const & fold_tree, MoveMap const& mm, std::ostream& out );
89 
90 ///@brief linearizes (or defoliates, if you prefer) a FoldTree. "default" FoldTrees produced by the PDB reader have all chains (peptide edges) starting from jumps relative to residue 1. This code modifies the tree to instead have all the jumps be relative to the preceding edge. It is not tested with ligands and will not work with "functional" jumps. From A to B:
91 ///A:FOLD_TREE EDGE 1 78 -1 EDGE 1 79 1 EDGE 79 454 -1 EDGE 1 455 2 EDGE 455 540 -1 EDGE 1 541 3 EDGE 541 697 -1
92 ///B:FOLD_TREE EDGE 1 78 -1 EDGE 78 79 1 EDGE 79 454 -1 EDGE 454 455 2 EDGE 455 540 -1 EDGE 540 541 3 EDGE 541 697 -1
95 
96 /// sheffler
99  FoldTree const & fold_tree
100 );
101 
104  FoldTree const & fold_tree,
105  std::map<Size,std::string> const & node_labels_partial
106 );
107 
110  FoldTree const & fold_tree,
111  std::map<Size,char> const & mark_jump_to_res
112 );
113 
116  FoldTree const & fold_tree,
117  std::map<Size,std::string> const & node_labels_partial,
118  std::map<Size,char> const & mark_jump_to_res,
119  std::map<Size,Size> const & jump_follows
120 );
121 
122 ///@brief remodel a fold tree to account for a large insertion by adding the size of the insert to upstream positions
123 ///@author Steven Lewis smlewi@gmail.com as a favor for Jared
126  core::kinematics::FoldTree const & input_tree, //return a remodeled version of this tree
127  core::Size insert_after, //add insert_size to points after this in primary sequence in the tree
128  core::Size insert_size
129 );
130 
131 } // namespace kinematics
132 } // namespace core
133 
134 
135 #endif // INCLUDED_core_kinematics_util_HH