Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UpstreamResTypeGeometry.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/match/upstream/UpstreamResTypeGeometry.hh
12 /// @brief
13 /// @author Alex Zanghellini (zanghell@u.washington.edu)
14 /// @author Andrew Leaver-Fay (aleaverfay@gmail.com), porting to mini
15 
16 #ifndef INCLUDED_protocols_match_upstream_UpstreamResTypeGeometry_hh
17 #define INCLUDED_protocols_match_upstream_UpstreamResTypeGeometry_hh
18 
19 // Unit headers
21 
22 // Project headers
24 #include <core/types.hh>
25 
26 // Numeric headers
27 #include <numeric/HomogeneousTransform.hh>
28 #include <numeric/xyzVector.hh>
29 
30 // Utility headers
31 // AUTO-REMOVED #include <utility/fixedsizearray1.hh>
32 #include <utility/pointer/ReferenceCount.hh>
33 // AUTO-REMOVED #include <utility/vector1.hh>
34 
35 #include <utility/vector1.hh>
36 
37 
38 namespace protocols {
39 namespace match {
40 namespace upstream {
41 
42 /// @brief A simple class that describes the geometry for a particular
43 /// residue type. It describes the coordinate frame geometry for the
44 /// fourth atom defining each chi dihedral. The fourth atom is called
45 /// the "chi tip" atom, as it's at the tip of the growing kinematic chain
46 /// when building chi i. This class also describes the location
47 /// of the atoms controlled by each chi which are not the chi-tip atoms;
48 /// it measures their location in the coordinate frame of the chi-tip atom.
49 ///
50 /// @details To generate the coordinate of the chi-tip atom, the
51 /// stored coordinate frame is multiplied
52 /// by the coordinate frame at the third atom after that coordinate frame
53 /// has been multipled by the chi-angle-z-axis rotation HT.
55 {
56 public:
57  ///@brief Automatically generated virtual destructor for class deriving directly from ReferenceCount
58  virtual ~UpstreamResTypeGeometry();
59  typedef core::Size Size;
60  typedef core::Real Real;
62  typedef numeric::HomogeneousTransform< Real > HTReal;
63 
64 public:
67 
69 
70 public:
71 
72  /// @brief the name of the residue type used to generate this geometry
73  std::string const & name() const {
74  return restype_name_;
75  }
76 
77  /// @brief the number of atoms in this residue type
78  Size natoms() const {
79  return controlling_chi_for_atom_.size();
80  }
81 
82  Size nchi() const {
83  return chitip_atoms_.size();
84  }
85 
86  bool atom_controlled_by_any_chi( Size atomno ) const {
87  return controlling_chi_for_atom_[ atomno ] != 0;
88  }
89 
90  bool atom_is_chitip( Size atomno ) const {
91  return controlling_chi_for_atom_[ atomno ] != 0 && which_point_for_atom_[ atomno ] == 0;
92  }
93 
96 
99 
101  chitip_atoms() const { return chitip_atoms_; }
102 
103  Size
104  chitip_atom( Size chi ) const {
105  return chitip_atoms_[ chi ];
106  }
107 
110 
111  HTReal const &
112  ht_for_chitip_atom( Size chi ) const {
113  return ht_for_chitip_atoms_[ chi ];
114  }
115 
116  Size
118  return nonchitip_atoms_[ chi ].size();
119  }
120 
122  nonchitip_atoms() const { return nonchitip_atoms_; }
123 
124  Size
125  nonchitip_atom( Size chi, Size which_nonchitip_atom_for_chi ) const {
126  return nonchitip_atoms_[ chi ][ which_nonchitip_atom_for_chi ];
127  }
128 
131 
134  return points_for_nonchitip_atoms_[ chi ];
135  }
136 
137  /// @brief Convenience function: get the coordinate in the chitip frame
138  /// for a particular atom. The atom must be a non-chitip atom that is
139  /// not part of the backbone (it must be controlled by a chi angle).
140  Vector const &
142  assert( atom_controlled_by_any_chi( atom ) && !atom_is_chitip( atom ) );
144  [ which_point_for_atom_[ atom ] ];
145  }
146 
147 
148  Size N_atom_id() const { return N_atom_id_; }
149  Size CA_atom_id() const { return CA_atom_id_; }
150  Size C_atom_id() const { return C_atom_id_; }
151  Size O_atom_id() const { return O_atom_id_; }
152  Size CB_atom_id() const { return CB_atom_id_; }
153  Size H_atom_id() const { return H_atom_id_; }
154  Size HA_atom_id() const { return HA_atom_id_; }
155 
156 
157  bool has_N_atom() const { return N_atom_id_ != 0; }
158  bool has_CA_atom() const { return CA_atom_id_ != 0; }
159  bool has_C_atom() const { return C_atom_id_ != 0; }
160  bool has_O_atom() const { return O_atom_id_ != 0; }
161  bool has_CB_atom() const { return CB_atom_id_ != 0; }
162  bool has_H_atom() const { return H_atom_id_ != 0; }
163  bool has_HA_atom() const { return HA_atom_id_ != 0; }
164 
165  bool
166  atom_has_nonchi_coordinate( Size restype_atomid ) const;
167 
168  Vector const &
169  coordinate_for_nonchi_atom_in_ideal_frame( Size restype_atomid ) const;
170 
171 
172 private:
173  /// Data
174 
176 
179 
182 
183 
186 
187  /// The ideal frame is defined at Calpha with the half point between N and C
188  /// in the N plane-halfpoint-Calpha plane.
189  /// i.g. HTReal( N, halfpoint, CAlpha);
190  /// Non-chi dependendent atoms are measured from the ideal coordinate in this frame.
191  /// This includes Cbeta and the Halphas. It also includes O and H, but since their
192  /// geometry depends on phi and psi, this data would be inappropriate for them.
196 
204 
205 };
206 
207 
208 
209 }
210 }
211 }
212 
213 #endif
214