Rosetta 3.5
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
protocols
match
upstream
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
20
#include <
protocols/match/upstream/UpstreamResTypeGeometry.fwd.hh
>
21
22
// Project headers
23
#include <
core/chemical/ResidueType.fwd.hh
>
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.
54
class
UpstreamResTypeGeometry
:
public
utility::pointer::ReferenceCount
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
;
61
typedef
core::Vector
Vector
;
62
typedef
numeric::HomogeneousTransform< Real >
HTReal
;
63
64
public
:
65
UpstreamResTypeGeometry
();
66
UpstreamResTypeGeometry
(
core::chemical::ResidueType
const
& );
67
68
void
initialize_from_residue_type
(
core::chemical::ResidueType
const
& );
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
94
utility::vector1< Size >
const
&
95
controlling_chi_for_atom
()
const
{
return
controlling_chi_for_atom_
; }
96
97
utility::vector1< Size >
const
&
98
which_point_for_atom
()
const
{
return
which_point_for_atom_
; }
99
100
utility::vector1< Size >
const
&
101
chitip_atoms
()
const
{
return
chitip_atoms_
; }
102
103
Size
104
chitip_atom
(
Size
chi )
const
{
105
return
chitip_atoms_
[ chi ];
106
}
107
108
utility::vector1< HTReal >
const
&
109
ht_for_chitip_atoms
()
const
{
return
ht_for_chitip_atoms_
; }
110
111
HTReal
const
&
112
ht_for_chitip_atom
(
Size
chi )
const
{
113
return
ht_for_chitip_atoms_
[ chi ];
114
}
115
116
Size
117
n_nonchitip_atoms_for_chi
(
Size
chi )
const
{
118
return
nonchitip_atoms_
[ chi ].size();
119
}
120
121
utility::vector1< utility::vector1< Size >
>
const
&
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
129
utility::vector1< utility::vector1< Vector >
>
const
&
130
points_for_nonchitip_atoms
()
const
{
return
points_for_nonchitip_atoms_
; }
131
132
utility::vector1< Vector >
const
&
133
points_for_nonchitip_atoms
(
Size
chi )
const
{
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
&
141
point_for_nonchitip_atom
(
Size
atom ) {
142
assert(
atom_controlled_by_any_chi
( atom ) && !
atom_is_chitip
( atom ) );
143
return
points_for_nonchitip_atoms_
[
controlling_chi_for_atom_
[ 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
175
std::string
restype_name_
;
176
177
utility::vector1< Size >
controlling_chi_for_atom_
;
178
utility::vector1< Size >
which_point_for_atom_
;
179
180
utility::vector1< Size >
chitip_atoms_
;
181
utility::vector1< HTReal >
ht_for_chitip_atoms_
;
182
183
184
utility::vector1< utility::vector1< Size >
>
nonchitip_atoms_
;
185
utility::vector1< utility::vector1< Vector >
>
points_for_nonchitip_atoms_
;
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.
193
utility::vector1< Size >
restype_atom_id_2_nonchi_atom_id_
;
194
utility::vector1< Size >
nonchi_atom_id_2_restype_atom_id_
;
195
utility::vector1< Vector >
nonchi_atoms_in_ideal_frame_
;
196
197
Size
N_atom_id_
;
198
Size
CA_atom_id_
;
199
Size
C_atom_id_
;
200
Size
O_atom_id_
;
201
Size
CB_atom_id_
;
202
Size
H_atom_id_
;
203
Size
HA_atom_id_
;
204
205
};
206
207
208
209
}
210
}
211
}
212
213
#endif
214
Generated on Sat Jun 1 2013 11:59:53 for Rosetta 3.5 by
1.8.4