Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InvrotTreeNodeBase.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/InvrotTreeNodeBase.hh
12 /// @brief Forward declaration for inverse rotamer tree node base
13 /// @author Florian Richter, flosopher@gmail.com, mar 2012
14 
15 #ifndef INCLUDED_protocols_toolbox_match_enzdes_util_InvrotTreeNodeBase_hh
16 #define INCLUDED_protocols_toolbox_match_enzdes_util_InvrotTreeNodeBase_hh
17 
18 /// unit headeers
20 
21 /// package headers
23 
24 /// project headers
26 #include <core/pose/Pose.fwd.hh>
28 #include <core/types.hh>
29 
30 //utility headers
31 #include <utility/pointer/ReferenceCount.hh>
32 #include <utility/vector1.fwd.hh>
33 
34 //c++ heades
35 #include <list>
36 #include <map>
37 
38 namespace protocols {
39 namespace toolbox {
40 namespace match_enzdes_util {
41 
42 
43 ///@ brief helper class for collecting all different definitions of invrots from a tree
45 
46 public:
47  InvrotCollector( Size num_residue_lists );
48 
49  InvrotCollector( InvrotCollector const & other );
50 
51  virtual ~InvrotCollector();
52 
54  clone() const;
55 
56  void
58  Size listnum,
59  std::list<core::conformation::ResidueCOP> const & invrots,
60  InvrotTreeNodeBaseCOP tree_node,
61  Size location_in_node
62  );
63 
64  std::vector< std::list<core::conformation::ResidueCOP> > const &
65  invrots() const {
66  return invrots_; }
67 
68  std::map< InvrotTreeNodeBaseCOP, Size > const &
71 
72 private:
73 
74  //we're using standard vectors bc the targets put into 0th element
75  std::vector< std::list<core::conformation::ResidueCOP> > invrots_;
76  std::map< InvrotTreeNodeBaseCOP, Size > owner_nodes_and_locations_;
77 };
78 
79 
80 
81 /// @brief abstract base class for an inverse rotamer tree node.
82 /// Exists so that the target node (InvrotTreeTarget) and the different
83 /// geom cst nodes (InvrotTreeNode) have a common base class.
84 /// This is necessary so that a node can point at its parent
85 /// node in a tree without having to worry about whether that
86 /// is a target or a regular node
88 
89 public:
90 
93  );
94 
95  virtual ~InvrotTreeNodeBase();
96 
98  parent_node() const {
99  return parent_node_; }
100 
101  void
103  location_in_parent_node_ = location; }
104 
106  return location_in_parent_node_; }
107 
108  /// @brief nodes need to be able to generate constraints
109  virtual
112  core::pose::Pose const & pose,
113  AllowedSeqposForGeomCstCOP geomcst_seqpos
114  ) const = 0;
115 
116 
117  /// @brief this function traverses up the tree
118  /// and adds the target residue for every geomcst
119  /// in the branch toward this node
120  /// used for clash checking, i.e. in case where
121  /// the interaction is lig<-geomcst1-<geomcst2-<geomcst3,
122  /// we don't want geomcst2 rots that clash with
123  /// the ligand, and we don't wand geomcst3 rots
124  /// that clash with the ligand or geomcst1 res
125  /// the child node argument usually represents the node
126  /// that is asking for the target residues, i.e. the node
127  /// that's calling this function
128  virtual
130  all_target_residues( InvrotTreeNodeBaseCAP child_node ) const = 0;
131 
132 
133  /// @brief convenience funtion to get all
134  /// inverse rotamers in the tree
135  /// puts all the inverse rotamers associated
136  /// with this node into vector, and should
137  /// call this function on daughter nodes
138  /// uses std:vector because the targets will be put into
139  /// 0th element
140  /// needs vector of vector bc there can be different definitions
141  /// of the tree
142  virtual
143  void
145  utility::vector1< InvrotCollectorOP > & invrot_collectors
146  ) const = 0;
147 
148 
149 private:
150 
151  InvrotTreeNodeBaseCAP parent_node_; //pointer to parent node
153 };
154 
155 
156 }
157 }
158 }
159 
160 #endif