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
Hit.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/Hit.hh
12
/// @brief Hit typedef
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_Hit_hh
17
#define INCLUDED_protocols_match_Hit_hh
18
19
// Unit headers
20
#include <
protocols/match/Hit.fwd.hh
>
21
22
// Project headers
23
#include <
core/types.hh
>
24
25
// Utility headers
26
// AUTO-REMOVED #include <utility/vector1.hh>
27
#include <utility/fixedsizearray1.hh>
28
29
#include <utility/vector1_bool.hh>
30
31
32
namespace
protocols {
33
namespace
match
{
34
35
class
Hit
36
{
37
public
:
38
core::Size
39
scaffold_build_id
()
const
{
40
return
first_
[ 1 ];
41
}
42
43
core::Size
44
upstream_conf_id
()
const
{
45
return
first_
[ 2 ];
46
}
47
48
core::Size
49
external_geom_id
()
const
{
50
return
first_
[ 3 ];
51
}
52
53
54
core::Size
55
downstream_conf_id
()
const
{
56
return
first_
[ 4 ];
57
}
58
59
Size4
const
&
first
()
const
{
60
return
first_
;
61
}
62
63
Size4
&
first
() {
64
return
first_
;
65
}
66
67
Real6
const
&
second
()
const
{
68
return
second_
;
69
}
70
71
Real6
&
second
() {
72
return
second_
;
73
}
74
75
private
:
76
77
Size4
first_
;
78
Real6
second_
;
79
80
};
81
82
class
upstream_hit
83
{
84
public
:
85
upstream_hit
() {}
86
87
upstream_hit
(
Hit
const
& source ) {
88
first_
[ 1 ] = source.
first
()[ 1 ];
89
first_
[ 2 ] = source.
first
()[ 2 ];
90
first_
[ 3 ] = source.
first
()[ 3 ];
91
}
92
93
void
94
copy_hit
(
Hit
const
& source ) {
95
first_
[ 1 ] = source.
first
()[ 1 ];
96
first_
[ 2 ] = source.
first
()[ 2 ];
97
first_
[ 3 ] = source.
first
()[ 3 ];
98
}
99
100
core::Size
101
scaffold_build_id
()
const
{
102
return
first_
[ 1 ];
103
}
104
105
core::Size
106
upstream_conf_id
()
const
{
107
return
first_
[ 2 ];
108
}
109
110
core::Size
111
external_geom_id
()
const
{
112
return
first_
[ 3 ];
113
}
114
115
void
116
scaffold_build_id
(
core::Size
setting ) {
117
first_
[ 1 ] = setting;
118
}
119
120
void
121
upstream_conf_id
(
core::Size
setting ) {
122
first_
[ 2 ] = setting;
123
}
124
125
void
126
external_geom_id
(
core::Size
setting ) {
127
first_
[ 3 ] = setting;
128
}
129
130
bool
131
operator <
(
upstream_hit
const
& rhs )
const
;
132
133
bool
134
operator ==
(
upstream_hit
const
& rhs )
const
;
135
136
137
private
:
138
Size3
first_
;
139
};
140
141
142
class
downstream_hit
143
{
144
145
public
:
146
147
downstream_hit
(){}
148
149
downstream_hit
(
Hit
const
& source ) {
150
downstream_conf_id_
= source.
first
()[ 4 ];
151
second_
= source.
second
();
152
}
153
154
void
155
copy_hit
(
Hit
const
& source ) {
156
downstream_conf_id_
= source.
first
()[ 4 ];
157
second_
= source.
second
();
158
}
159
160
core::Size
161
downstream_conf_id
()
const
{
162
return
downstream_conf_id_
;
163
}
164
165
Real6
const
&
second
()
const
{
166
return
second_
;
167
}
168
169
Real6
&
second
() {
170
return
second_
;
171
}
172
173
bool
174
operator <
(
downstream_hit
const
& rhs )
const
;
175
176
bool
177
operator ==
(
downstream_hit
const
& rhs )
const
;
178
179
180
private
:
181
core::Size
downstream_conf_id_
;
182
Real6
second_
;
183
};
184
185
186
/// @brief Describe a match as n_geometric_constraint upstream residue conformations and
187
/// one positioning of the downstream partner ( "dspos1" = 1 downstrem position)
188
struct
match_dspos1
189
{
190
public
:
191
match_dspos1
();
192
match_dspos1
(
core::Size
n_geometric_constraints );
193
match_dspos1
(
match
const
& m,
core::Size
geomcst_specifying_dspos );
194
195
utility::vector1< upstream_hit >
upstream_hits
;
196
core::Size
originating_geom_cst_for_dspos
;
197
core::Size
downstream_conf_id
;
198
Real6
dspos
;
199
};
200
201
/// @brief Create a fake hit from an upstream_hit where hit.first()[4] and hit.second() are 0's.
202
Hit
fake_hit
(
upstream_hit
const
& );
203
204
/// @brief Create a fake hit from a downstream_hit where hit.first()[1-3] are 0's.
205
Hit
fake_hit
(
downstream_hit
const
& );
206
207
/// @brief Create a hit with the full data from a given match_dspos1 representing
208
/// the upstream conformation from the originating_geom_cst and its
209
/// description of the downstream position.
210
Hit
full_hit
(
match_dspos1
const
& m );
211
212
}
213
}
214
215
#endif
Generated on Sat Jun 1 2013 11:59:31 for Rosetta 3.5 by
1.8.4