Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ResidueConnection.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/chemical/ResidueConnection.hh
11 /// @brief Inter-residue chemical bond connection point class declaration.
12 /// @author Phil Bradley
13 /// @author Andrew Leaver-Fay (aleaverfay@gmail.com)
14 
15 
16 #ifndef INCLUDED_core_chemical_ResidueConnection_hh
17 #define INCLUDED_core_chemical_ResidueConnection_hh
18 
19 
20 // Unit headers
22 
23 // Project headers
25 
26 // Utility headers
27 
28 // C++ headers
29 // Commented by inclean daemon #include <string>
30 
31 
32 namespace core {
33 namespace chemical {
34 
35 /// @brief A simple class marking atoms at inter-residue connections.
36 ///
37 /// Each residue type specifies some number of positions at which it is expecting
38 /// to form a chemical bond with another residue. Think of them as ports: they are
39 /// parts of the residue where there are chemical bonds beyond the intra-residue
40 /// chemical bonds are expected -- places where they can be chemically linked
41 /// to the outside world. A conformation::Residue will require that its
42 /// ResidueConnections be fullfilled by other Residues -- the ResConnID class
43 /// describes how two residues are connected: e.g. the third ResConnID for
44 /// residue 10 would say "I connect to residue 58 at residue 58's third residue
45 /// connection" if residue 10 and residue 58 were disulfide bonded as the disulfide
46 /// connection id is "3" for two mid-protein cystine residues. The advantages
47 /// of separating ResidueConnections from atoms themselves are that 1) it allows
48 /// multiple residue connections to stem from the same atom -- useful for single-atom
49 /// residues, such as coordinated metals (Zn, Mg), and 2) it allows one residue
50 /// to change its set of atoms without invalidating the bond information (e.g. the atom
51 /// index) on its partner. For example, if a chain-break were placed between residues
52 /// 57 and 58, then residue 58 will get an extra C-prev virtual atom, and the index of
53 /// SG will change. Residue 10, if it had recorded the SG index would have to find
54 /// SG's new index. If instead, the connection point is represented simply as
55 /// connection point 3, and if the new residue type (the chainbreak disulfide residue)
56 /// has the same number of residue connections as the original residue type (it will!)
57 /// then nothing about residue 10 needs to be updated.
58 
60 public:
61  /// @brief default constructor
63  atomno_( 0 ),
64  icoor_(),
65  index_( 0 )
66  {}
67  /// @brief constructor with atom index number
69  int const atomno_in
70  ):
71  atomno_( atomno_in ),
72  icoor_(),
73  index_( 0 )
74  {}
75  /// @brief constructor with atom index number and AtomICoor
77  int const atomno_in,
78  AtomICoor const & icoor_in
79  ):
80  atomno_( atomno_in ),
81  icoor_( icoor_in ),
82  index_( 0 )
83  {}
84 
85  /// @brief constructor with atom index number, AtomICoor, and connection index
87  int const atomno_in,
88  AtomICoor const & icoor_in,
89  int const index
90  ):
91  atomno_( atomno_in ),
92  icoor_( icoor_in ),
93  index_( index )
94  {}
95 
96  /// @brief get atom index number
97  int
98  atomno() const
99  {
100  return atomno_;
101  }
102 
103  /// @brief set atom index number
104  void
105  atomno( Size const atomno_in )
106  {
107  atomno_ = atomno_in;
108  }
109 
110  /// @brief get atom's AtomICoor
111  AtomICoor const &
112  icoor() const
113  {
114  return icoor_;
115  }
116 
117  /// @brief set atom's AtomICoor
118  void
119  icoor( AtomICoor const & ic )
120  {
121  icoor_ = ic;
122  }
123 
124  int index() const { return index_; }
125  void index( int index_in ) { index_ = index_in; }
126 
127 private:
128 
129 #ifdef USEBOOSTSERIALIZE
130  friend class boost::serialization::access;
131 
132  template<class Archive>
133  void serialize(Archive & ar, const unsigned int version) {
134  ar & atomno_;
135  ar & icoor_;
136  ar & index_;
137  }
138 #endif
139 
140  /// atom index number
141  int atomno_;
142  /// atom AtomICoor
144  /// Which residue connection # am I in my owners list of residue connections?
145  int index_;
146 };
147 
148 } // chemical
149 } // core
150 
151 
152 
153 #endif
154 // int other_rsd_;
155 // std::string other_atom_name_;
156 // ///
157 // int
158 // other_rsd() const
159 // {
160 // return other_rsd_;
161 // }
162 
163 // ///
164 // std::string const &
165 // other_atom_name() const
166 // {
167 // return other_atom_name_;
168 // }
169