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
output
UpstreamCollisionFilter.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/output/UpstreamCollisionFilter.hh
12
/// @brief Declaration for class to filter matches where the upstream residues collide.
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_output_UpstreamCollisionFilter_hh
17
#define INCLUDED_protocols_match_output_UpstreamCollisionFilter_hh
18
19
// Unit headers
20
#include <
protocols/match/output/UpstreamCollisionFilter.fwd.hh
>
21
22
// Package headers
23
#include <
protocols/match/BumpGrid.hh
>
24
#include <
protocols/match/output/MatchFilter.hh
>
25
#include <
protocols/match/output/UpstreamHitCacher.fwd.hh
>
26
27
// Project headers
28
#include <
core/conformation/Residue.hh
>
29
#include <
core/pose/Pose.fwd.hh
>
30
#include <
core/scoring/ScoreFunction.fwd.hh
>
31
#include <
core/scoring/methods/ShortRangeTwoBodyEnergy.fwd.hh
>
32
33
34
// Utility headers
35
#include <utility/pointer/ReferenceCount.hh>
36
37
#include <utility/vector1.hh>
38
39
40
namespace
protocols {
41
namespace
match
{
42
namespace
output {
43
44
45
class
MatchCollisionFilter
:
public
MatchFilter
{
46
47
public
:
48
typedef
core::Real
Real
;
49
50
public
:
51
//MatchCollisionFilter( std::string filter_name );
52
MatchCollisionFilter
(
std::string
filter_name
,
UpstreamHitCacherOP
coordinate_cacher );
53
54
virtual
55
~MatchCollisionFilter
();
56
57
virtual
58
bool
59
passes_filter
(
60
match
const
& m
61
)
const
= 0;
62
63
virtual
64
bool
65
passes_filter
(
66
match_dspos1
const
& m
67
)
const
= 0;
68
69
//setters
70
void
set_filter_by_lj
(
bool
setting );
71
void
set_lj_cutoff
(
Real
setting );
72
void
set_lj_atr_weight
(
Real
setting );
73
void
set_lj_rep_weight
(
Real
setting );
74
void
set_lj_sol_weight
(
Real
setting );
75
76
virtual
77
void
set_tolerated_overlap
(
Real
setting );
78
79
//getters
80
bool
filter_by_lj
()
const
;
81
Real
wfa_atr
()
const
;
82
Real
wfa_rep
()
const
;
83
Real
wfa_sol
()
const
;
84
Real
lj_cutoff
()
const
;
85
Real
tolerated_overlap
()
const
;
86
87
core::pose::PoseCOP
empty_pose
()
const
;
88
core::scoring::ScoreFunctionOP
empty_sfxn
()
const
;
89
core::scoring::methods::ShortRangeTwoBodyEnergyCOP
etable_energy
()
const
;
90
BumpGridCOP
bump_grid
()
const
;
91
92
93
protected
:
94
UpstreamHitCacherOP
cacher_
;
95
96
private
:
97
bool
filter_by_lj_
;
98
Real
wfa_atr_
;
99
Real
wfa_rep_
;
100
Real
wfa_sol_
;
101
Real
lj_cutoff_
;
102
Real
tolerated_overlap_
;
103
104
core::pose::PoseOP
empty_pose_
;
105
core::scoring::ScoreFunctionOP
empty_sfxn_
;
106
107
core::scoring::methods::ShortRangeTwoBodyEnergyOP
etable_energy_
;
108
BumpGridOP
bump_grid_
;
109
110
111
112
};
113
114
/// @brief This class is used to detect collisions between the upstream residues
115
/// and filter out matches that have too much collision. It can perform either
116
/// hard-sphere collision detection, or score-function (Etable) driven collision
117
/// detection. Four command-line flags are read by the MatcherTask to initialize
118
/// this class:
119
/// match::filter_colliding_upstream_residues
120
/// match::upstream_residue_collision_tolerance
121
/// match::upstream_residue_collision_score_cutoff
122
/// match::upstream_residue_collision_Wfa_atr
123
/// match::upstream_residue_collision_Wfa_rep
124
/// match::upstream_residue_collision_Wfa_sol
125
class
UpstreamCollisionFilter
:
public
MatchCollisionFilter
{
126
public
:
127
typedef
core::Real
Real
;
128
typedef
MatchCollisionFilter
parent
;
129
130
public
:
131
//UpstreamCollisionFilter( std::string filter_name );
132
UpstreamCollisionFilter
(
std::string
filter_name
,
UpstreamHitCacherOP
coordinate_cacher );
133
134
virtual
135
~UpstreamCollisionFilter
();
136
137
/// @brief Returns true if the given match does not contain too much residue-pair collision.
138
virtual
139
bool
140
passes_filter
(
141
match
const
& m
142
)
const
;
143
144
/// @brief Returns true if the given match does not contain too much residue-pair collision.
145
virtual
146
bool
147
passes_filter
(
148
match_dspos1
const
& m
149
)
const
;
150
151
bool
152
passes_hardsphere_filter
(
153
core::Size
geomcst_a,
154
core::Size
geomcst_b,
155
Hit
const
& upstream_hit_a,
156
Hit
const
& upstream_hit_b
157
)
const
;
158
159
inline
160
bool
161
passes_hardsphere_filter
(
162
core::conformation::Residue
const
& resA,
163
core::conformation::Residue
const
& resB
164
)
const
165
{
166
for
(
Size
ii = resA.
first_sidechain_atom
(); ii <= resA.
nheavyatoms
(); ++ii ) {
167
ProbeRadius
ii_rad =
probe_radius_for_atom_type
( resA.
atom_type_index
( ii ) );
168
for
(
Size
jj = resB.
first_sidechain_atom
(); jj <= resB.
nheavyatoms
(); ++jj ) {
169
ProbeRadius
jj_rad =
probe_radius_for_atom_type
( resB.
atom_type_index
( jj ) );
170
Real
minsep =
bump_grid
()->required_separation_distance( ii_rad, jj_rad );
171
if
( resA.
xyz
( ii ).distance_squared( resB.
xyz
( jj )) < minsep * minsep ) {
172
return
false
;
173
}
174
}
175
}
176
return
true
;
177
}
178
179
private
:
180
181
};
182
183
184
}
185
}
186
}
187
188
#endif
Generated on Sat Jun 1 2013 11:59:46 for Rosetta 3.5 by
1.8.4