Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InvrotTreeNode.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 /// @file protocols/toolbox/match_enzdes_util/InvrotTreeNode.hh
12 /// @brief .hh file for inverse rotamer tree node
13 /// @author Florian Richter, flosopher@gmail.com, mar 2012
14 
15 #ifndef INCLUDED_protocols_toolbox_match_enzdes_util_InvrotTreeNode_hh
16 #define INCLUDED_protocols_toolbox_match_enzdes_util_InvrotTreeNode_hh
17 
18 
19 //unit headers
21 
22 //package headers
25 
26 //project headers
27 #include <core/id/AtomID.fwd.hh>
28 
29 // Utility headers
30 //#include <util
31 
32 namespace protocols {
33 namespace toolbox {
34 namespace match_enzdes_util {
35 
36 
38 
39  // what's better for this? list or vector1?
40  typedef std::pair< std::list<core::conformation::ResidueCOP >, utility::vector1< InvrotTreeNodeBaseOP > > invrots_node_ptrs_pair;
41 
42  typedef core::Size Size;
43 
44 public:
45 
47 
49 
50  /// @brief generate invrots according to
51  /// an enzdes cstfile
52  /// returns true if it was possible to
53  /// build invrots, i.e. geometry correctly
54  /// defined in cstfile and no clashes with
55  /// any parent inverse rotamers
56  bool
58  core::conformation::Residue const & target_residue,
59  EnzConstraintIOCOP enzcst_io,
60  Size invrot_geomcst,
61  core::pose::PoseCOP pose = NULL
62  );
63 
64  bool
66  std::list< core::conformation::ResidueCOP > const & all_invrots,
67  EnzConstraintIOCOP enzcst_io,
68  Size invrot_geomcst,
69  core::pose::PoseCOP pose = NULL
70  );
71 
72  /// @brief
73  /// 1. for each invrots/node pointer pair:
74  /// a.generate an ambigous constraint for the inverse rots
75  /// for each node pointer to child nodes (only if there are child nodes, of course)
76  /// b. call the generate_constraints function on the pointers to child nodes
77  /// c. package the ambig constraint generated for the inverse rots
78  /// and the constraints that come from the child nodes into one multicst
79  /// caveat: if the child nodes send up a multi constraint and not an ambiguous
80  /// constraint, 'unpackage' those multicst and generate a new multicst
81  /// containing this nodes ambigcst and the member_csts from the
82  /// child nodes' multicsts
83  ///
84  /// 2. if there is more than one invrots/node pointer pair,
85  /// throw all the generated multicsts into one ambig cst
86  /// 3. return either the multicst (one pair) or the ambigcst
87  /// 4. hope this shit works
90  core::pose::Pose const & pose,
91  AllowedSeqposForGeomCstCOP geomcst_seqpos
92  ) const;
93 
94 
95  /// @brief this function returns the AtomID for an atom
96  /// in the pose that's supposed to stay fixed during
97  /// folding, i.e. the neighbor atom of the first target
98  /// needed to generate the right backbone_stub constraints
100  get_fixed_pt( core::pose::Pose const & pose ) const;
101 
103  all_target_residues( InvrotTreeNodeBaseCAP child_node ) const;
104 
105 
106  void
108  std::list< core::conformation::ResidueCOP > & invrots,
109  bool covalent
110  ) const;
111 
112  void
114  utility::vector1< InvrotCollectorOP > & invrot_collectors
115  ) const;
116 
117 private:
118 
119  Size geom_cst_; //which geometric constraint the invrots belong to
120 
122 
123  bool generate_invrot_csts_; //if this node should actually generate csts according to the invrots stored in it. initialized to true, but gets set to fals if inverse rotamer trees for partial matches are constructed
124 };
125 
126 }
127 }
128 }
129 
130 #endif