Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PseudoBond.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
12 /// @brief
13 /// @author
14 
15 #ifndef INCLUDED_core_conformation_PseudoBond_hh
16 #define INCLUDED_core_conformation_PseudoBond_hh
17 
18 // Unit Headers
20 
21 // Project Headers
23 
24 // Utility Headers
25 // AUTO-REMOVED #include <utility/vector1.hh>
26 #include <utility/pointer/ReferenceCount.hh>
27 
28 #include <utility/vector1_bool.hh>
29 
30 
31 namespace core {
32 namespace conformation {
33 
34 // A PseudoBond connects two residues that are not covalently attached, but are
35 // within four bonds of each other through some third (or third & fourth) residue.
36 // PseudoBonds exist in the conformation layer and not in the chemical layer
37 // because they are the result of specific chemical configurations and cannot
38 // be predicted until runtime when a PDB is read in. A pseudobond may also connect
39 // a single residue back to itself.
40 //
41 // PseudoBonds keep indices to connection-ids for the two residues that they
42 // bridge; a psuedobond attaches between two atoms that are already designated
43 // as connection points for their ResidueTypes. The Residuetypes provide mappings
44 // between connection point ids and the atom ids that correspond to those connections.
45 // For two different residue types to utilize the same pseudo-bond information, they
46 // must have an identical set of connection points. This has a counter-intuitive
47 // result: if one wants to flip the chiral center on a residue with a three-atom
48 // backbone, one cannot simply twist the residue 180 degrees; the connection points
49 // won't correspond. The result is that different residue types have to be defined for
50 // r vs s chiral centers.
51 
53 {
54 public:
55 
57 
58 public:
59  PseudoBond();
60  virtual ~PseudoBond();
61  PseudoBond( PseudoBond const &);
62  PseudoBond const & operator = ( PseudoBond const & rhs );
63 
64  bool operator == ( PseudoBond const & rhs ) const;
65 
66  // lower residue
67  Size lr() const;
68  void lr( Size );
69 
70  // upper residue
71  Size ur() const;
72  void ur( Size );
73 
74  Size lr_conn_id() const;
75  void lr_conn_id( Size );
76 
77  Size ur_conn_id() const;
78  void ur_conn_id( Size );
79 
80 
81  ResConnID lr_resconnid() const;
82  void lr_resconnid( ResConnID );
83 
84  ResConnID ur_resconnid() const;
85  void ur_resconnid( ResConnID );
86 
87  Size nbonds() const;
88  void nbonds( Size );
89 
90 private:
93 
95 
96 #ifdef USEBOOSTSERIALIZE
97  friend class boost::serialization::access;
98 
99  template<class Archive>
100  void serialize(Archive & ar, const unsigned int version) {
101  ar & lr_conn_;
102  ar & ur_conn_;
103  ar & nbonds_;
104  }
105 #endif
106 
107 };
108 
109 
110 // A PBCollection stores all of the PBs between a pair of residues.
111 // PBs can be added to the collection, and iterated over, but cannot
112 // be modified.
113 
115 {
116 public:
118 
119 public:
121  virtual ~PseudoBondCollection();
122 
125  utility::vector1< int > const & old2new
126  ) const;
127 
128  void push_back( PseudoBond const & );
129 
130  PBIter iter_begin() const;
131  PBIter iter_end() const;
132 
133  Size size() const { return pseudo_bonds_.size(); }
134 
135 private:
136 
138 
139 #ifdef USEBOOSTSERIALIZE
140  friend class boost::serialization::access;
141 
142  template<class Archive>
143  void serialize(Archive & ar, const unsigned int version) {
144  ar & pseudo_bonds_;
145  }
146 #endif
147 };
148 
149 
150 } // conformation
151 } // core
152 
153 #endif