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
core
scoring
etable
count_pair
CountPairGeneric.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/scoring/etable/count_pair/CountPairGeneric.hh
11
/// @brief
12
/// @author Andrew Leaver-Fay (leaverfa@email.unc.edu)
13
14
15
#ifndef INCLUDED_core_scoring_etable_count_pair_CountPairGeneric_hh
16
#define INCLUDED_core_scoring_etable_count_pair_CountPairGeneric_hh
17
18
// Unit Headers
19
#include <
core/scoring/etable/count_pair/CountPairGeneric.fwd.hh
>
20
21
// Package Headers
22
#include <
core/scoring/etable/count_pair/CountPairFunction.hh
>
23
// AUTO-REMOVED #include <core/scoring/etable/atom_pair_energy_inline.hh>
24
25
#include <
core/types.hh
>
26
// AUTO-REMOVED #include <core/conformation/Atom.hh>
27
28
#include <
core/chemical/ResidueType.fwd.hh
>
29
#include <utility/vector1_bool.hh>
30
31
32
namespace
core {
33
namespace
scoring {
34
namespace
etable {
35
namespace
count_pair {
36
37
class
CountPairGeneric
:
public
CountPairFunction
38
{
39
public
:
40
public
:
41
typedef
CountPairFunction
parent
;
42
43
public
:
44
CountPairGeneric
(
45
conformation::Residue
const
& res1,
46
conformation::Residue
const
& res2
47
);
48
49
/// @brief Create a count pair object that pretends there exist
50
/// a chemical bond between some number of atoms in residue 1 and
51
/// some number of atoms in residue2; the bond_pairs vector is
52
/// a set of ordered-pairs of atom-indices, where the first
53
/// is an atom from restype1 and the second is an atom of restype2.
54
CountPairGeneric
(
55
chemical::ResidueType
const
& restype1,
56
chemical::ResidueType
const
& restype2,
57
utility::vector1
< std::pair< Size, Size > > bond_pairs
58
);
59
60
void
set_crossover
(
Size
);
61
62
virtual
~CountPairGeneric
();
63
64
///@brief function required by templated functions in atom_pair_energy_inline
65
inline
66
bool
67
operator ()
(
68
int
const
at1,
69
int
const
at2,
70
Real
& weight,
71
Size
& minpathdist
72
)
const
73
{
74
minpathdist =
path_distance
( at1, at2 );
75
76
//std::cout << "CPGeneric: r1= " << r1_.seqpos() << " r2=" << r2_.seqpos();
77
//std::cout << " at1: " << r1_.atom_name( at1 ) << " at2: " << r2_.atom_name( at2 );
78
//std::cout << " minpathdist= " << minpathdist << " count? ";
79
//std::cout << ( minpathdist < crossover_ ? "not counted" : minpathdist == crossover_ ? "half" : "yes") << std::endl;
80
81
if
( (
int
) minpathdist <
crossover_
) {
return
false
; }
82
if
( (
int
) minpathdist >
crossover_
) {
return
true
; }
83
weight =
cp_half
;
84
return
true
;
85
}
86
87
int
88
path_distance
(
int
const
at1,
int
const
at2 )
const
89
{
90
int
minpathdist = 10;
91
92
// Check genuine connections
93
for
(
Size
ii = 1; ii <=
n_connect_
; ++ii ) {
94
int
ii_pathdist =
res1_conn_point_path_dists_
[ ii ]->operator[](at1) +
res2_conn_point_path_dists_
[ ii ]->
operator
[](at2) + 1;
95
if
( ii_pathdist < minpathdist ) minpathdist = ii_pathdist;
96
}
97
98
// Check pseudobond connections
99
for
(
Size
ii = 1; ii <=
n_pconnect_
; ++ii ) {
100
int
ii_pathdist =
res1_pbconn_point_path_dists_
[ ii ]->operator[]( at1 )
101
+
res2_pbconn_point_path_dists_
[ ii ]->
operator
[]( at2 )
102
+
pb_lengths_
[ ii ];
103
if
( ii_pathdist < minpathdist ) minpathdist = ii_pathdist;
104
}
105
return
minpathdist;
106
}
107
108
virtual
109
bool
110
count
(
111
int
const
at1,
112
int
const
at2,
113
Real
&,
114
Size
& path_dist
115
)
const
;
116
117
/// Type Resolution Functions ///
118
119
virtual
120
void
121
residue_atom_pair_energy
(
122
conformation::Residue
const
& res1,
123
conformation::Residue
const
& res2,
124
etable::TableLookupEvaluator
const
&,
125
EnergyMap
&
126
)
const
;
127
128
129
virtual
130
void
131
residue_atom_pair_energy_sidechain_backbone
(
132
conformation::Residue
const
&,
133
conformation::Residue
const
&,
134
etable::TableLookupEvaluator
const
&,
135
EnergyMap
&
136
)
const
;
137
138
139
virtual
140
void
141
residue_atom_pair_energy_sidechain_whole
(
142
conformation::Residue
const
&,
143
conformation::Residue
const
&,
144
etable::TableLookupEvaluator
const
&,
145
EnergyMap
&
146
)
const
;
147
148
149
virtual
150
void
151
residue_atom_pair_energy_backbone_backbone
(
152
conformation::Residue
const
&,
153
conformation::Residue
const
&,
154
etable::TableLookupEvaluator
const
&,
155
EnergyMap
&
156
)
const
;
157
158
159
virtual
160
void
161
residue_atom_pair_energy_sidechain_sidechain
(
162
conformation::Residue
const
&,
163
conformation::Residue
const
&,
164
etable::TableLookupEvaluator
const
&,
165
EnergyMap
&
166
)
const
;
167
168
virtual
169
void
170
residue_atom_pair_energy
(
171
conformation::Residue
const
& res1,
172
conformation::Residue
const
& res2,
173
etable::AnalyticEtableEvaluator
const
&,
174
EnergyMap
&
175
)
const
;
176
177
178
virtual
179
void
180
residue_atom_pair_energy_sidechain_backbone
(
181
conformation::Residue
const
&,
182
conformation::Residue
const
&,
183
etable::AnalyticEtableEvaluator
const
&,
184
EnergyMap
&
185
)
const
;
186
187
188
virtual
189
void
190
residue_atom_pair_energy_sidechain_whole
(
191
conformation::Residue
const
&,
192
conformation::Residue
const
&,
193
etable::AnalyticEtableEvaluator
const
&,
194
EnergyMap
&
195
)
const
;
196
197
198
virtual
199
void
200
residue_atom_pair_energy_backbone_backbone
(
201
conformation::Residue
const
&,
202
conformation::Residue
const
&,
203
etable::AnalyticEtableEvaluator
const
&,
204
EnergyMap
&
205
)
const
;
206
207
208
virtual
209
void
210
residue_atom_pair_energy_sidechain_sidechain
(
211
conformation::Residue
const
&,
212
conformation::Residue
const
&,
213
etable::AnalyticEtableEvaluator
const
&,
214
EnergyMap
&
215
)
const
;
216
217
218
private
:
219
//conformation::Residue const & r1_;
220
//conformation::Residue const & r2_;
221
222
Size
n_connect_
;
223
utility::vector1< utility::vector1< int >
const
* >
res1_conn_point_path_dists_
;
224
utility::vector1< utility::vector1< int >
const
* >
res2_conn_point_path_dists_
;
225
226
Size
n_pconnect_
;
227
utility::vector1< utility::vector1< int >
const
* >
res1_pbconn_point_path_dists_
;
228
utility::vector1< utility::vector1< int >
const
* >
res2_pbconn_point_path_dists_
;
229
utility::vector1< int >
pb_lengths_
;
230
231
int
crossover_
;
232
};
233
234
}
// namespace count_pair
235
}
// namespace etable
236
}
// namespace scoring
237
}
// namespace core
238
239
#endif
Generated on Sat Jun 1 2013 11:36:47 for Rosetta 3.5 by
1.8.4