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
simple_filters
PackerNeighborGraphFilter.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 src/protocols/simple_filters/PackerNeighborGraphFilter.hh
11
/// @brief header file for packer neighbor graph based filter
12
/// @detailed
13
///
14
///
15
///
16
/// @author Florian Richter, floric@u.washington.edu (march 09 )
17
18
#ifndef INCLUDED_protocols_simple_filters_PackerNeighborGraphFilter_hh
19
#define INCLUDED_protocols_simple_filters_PackerNeighborGraphFilter_hh
20
21
// Unit Headers
22
#include <
protocols/filters/Filter.hh
>
23
24
// Project Headers
25
//#include <core/graph/Graph.fwd.hh>
26
#include <
core/pack/task/PackerTask.hh
>
27
#include <
core/scoring/ScoreFunction.hh
>
28
#include <
core/types.hh
>
29
30
31
// Utility headers
32
//#include <utility/pointer/ReferenceCount.hh>
33
// AUTO-REMOVED #include <utility/vector1.hh>
34
35
//// C++ headers
36
#include <string>
37
#include <set>
38
#include <map>
39
40
#include <utility/vector1.hh>
41
42
43
namespace
protocols {
44
namespace
simple_filters {
45
46
47
48
/// @details helper class for PackerNeighborGraphFilter
49
class
RegionalConnections
{
50
51
public
:
52
53
RegionalConnections
(
54
std::set< core::Size >
const
& reg1,
55
std::set< core::Size >
const
& reg2,
56
core::Size
required_cons
57
) :
region1_
( reg1 ),
region2_
( reg2 ),
required_connections_
( required_cons ),
num_cons_
( 0 )
58
{}
59
60
std::set< core::Size >
const
&
61
region1
()
const
{
62
return
region1_
; }
63
64
std::set< core::Size >
const
&
65
region2
()
const
{
66
return
region2_
; }
67
68
bool
69
enough_connections
()
const
{
70
return
(
required_connections_
<=
num_cons_
); }
71
72
//core::Size
73
//num_connections() const {
74
// return num_connections_; }
75
76
void
77
reset_num_connections
()
const
{
78
num_cons_
= 0; }
79
80
void
81
check_if_connected_residues_belong_to_regions
(
82
core::Size
res1,
83
core::Size
res2
84
)
const
;
85
86
private
:
87
std::set< core::Size >
region1_
;
88
std::set< core::Size >
region2_
;
89
90
core::Size
required_connections_
;
91
92
mutable
core::Size
num_cons_
;
93
94
};
95
96
/// @details filter that creates a packer neighbor graph of the pose
97
/// @details in every apply function and returns true if this graph
98
/// @details satisfies a specified connectivity
99
class
PackerNeighborGraphFilter
:
public
protocols::filters::Filter
{
100
101
public
:
102
103
PackerNeighborGraphFilter
(
104
core::pack::task::PackerTaskCOP
task,
105
core::scoring::ScoreFunctionCOP
sfxn
106
) :
task_
( task ),
sfxn_
( sfxn ),
task_invalidated_
( false ) {}
107
108
109
PackerNeighborGraphFilter
();
110
111
~PackerNeighborGraphFilter
();
112
113
114
filters::FilterOP
clone
()
const
{
115
return
new
PackerNeighborGraphFilter
( *
this
); }
116
117
filters::FilterOP
fresh_instance
()
const
{
118
return
new
PackerNeighborGraphFilter
(); }
119
120
121
122
/// @brief Returns true if the given pose passes the filter, false otherwise.
123
virtual
bool
apply
(
core::pose::Pose
const
& pose )
const
;
124
125
virtual
126
std::string
name
()
const
{
return
"PackerNeighborGraphFilter"
; }
127
128
void
129
set_task
(
core::pack::task::PackerTaskCOP
task ){
130
task_
= task; }
131
132
/// @brief note: will overwrite if information for this residue has already been entered
133
void
134
set_required_connections_for_residue
(
135
core::Size
residue,
136
core::Size
required_connections
137
);
138
139
/// @brief note: will increase required connections for this residue by 1
140
void
141
add_required_connection_for_residue
(
142
core::Size
residue
143
);
144
145
void
146
add_required_connections_between_regions
(
147
std::set< core::Size >
const
& region1,
148
std::set< core::Size >
const
& region2,
149
core::Size
required_connections
150
);
151
152
153
private
:
154
155
core::pack::task::PackerTaskCOP
task_
;
156
core::scoring::ScoreFunctionCOP
sfxn_
;
157
158
std::map< core::Size, core::Size >
required_connections_per_res_
;
159
160
utility::vector1< RegionalConnections >
required_connections_between_regions_
;
161
162
bool
task_invalidated_
;
163
164
};
165
166
167
typedef
utility::pointer::owning_ptr< PackerNeighborGraphFilter >
PackerNeighborGraphFilterOP
;
168
typedef
utility::pointer::owning_ptr< PackerNeighborGraphFilter const >
PackerNeighborGraphFilterCOP
;
169
170
}
// filters
171
}
// protocols
172
173
#endif
Generated on Sat Jun 1 2013 12:13:46 for Rosetta 3.5 by
1.8.4