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
constraints
ConstraintEnergyContainer.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/constraints/ConstraintsEnergyContainer.hh
11
/// @brief Constraints Energy Container class declaration
12
/// @author Andrew Leaver-Fay
13
14
#ifndef INCLUDED_core_scoring_constraints_ConstraintEnergyContainer_hh
15
#define INCLUDED_core_scoring_constraints_ConstraintEnergyContainer_hh
16
17
// Unit headers
18
#include <
core/scoring/constraints/ConstraintEnergyContainer.fwd.hh
>
19
20
// Package headers
21
#include <
core/scoring/LREnergyContainer.hh
>
22
#include <
core/scoring/constraints/ConstraintGraph.fwd.hh
>
23
#include <
core/scoring/constraints/ConstraintSet.fwd.hh
>
24
25
#include <
core/scoring/EnergyMap.fwd.hh
>
26
// AUTO-REMOVED #include <core/scoring/ScoreFunction.fwd.hh>
27
28
// AUTO-REMOVED #include <core/scoring/ScoreType.hh>
29
30
// Project headers
31
#include <
core/pose/Pose.fwd.hh
>
32
#include <
core/graph/Graph.hh
>
33
34
#include <utility/vector1.hh>
35
#include <iostream>
36
37
38
namespace
core {
39
namespace
scoring {
40
namespace
constraints {
41
42
class
CstResNeighbIterator
:
public
ResidueNeighborIterator
{
43
public
:
44
typedef
graph::Node::EdgeListIter
EdgeListIter
;
45
46
public
:
47
48
CstResNeighbIterator
(
Size
focused_node,
EdgeListIter
edge_iter);
49
50
virtual
~CstResNeighbIterator
();
51
52
virtual
ResidueNeighborIterator
const
&
operator =
(
ResidueNeighborIterator
const
& );
53
virtual
ResidueNeighborIterator
const
&
operator ++
();
54
virtual
bool
operator ==
(
ResidueNeighborIterator
const
& )
const
;
55
virtual
bool
operator !=
(
ResidueNeighborIterator
const
& )
const
;
56
57
virtual
Size
upper_neighbor_id
()
const
;
58
virtual
Size
lower_neighbor_id
()
const
;
59
60
virtual
Size
residue_iterated_on
()
const
;
61
virtual
Size
neighbor_id
()
const
;
62
63
virtual
void
save_energy
(
EnergyMap
const
& );
64
virtual
void
retrieve_energy
(
EnergyMap
& )
const
;
65
virtual
void
accumulate_energy
(
EnergyMap
& )
const
;
66
67
virtual
void
mark_energy_computed
();
68
virtual
void
mark_energy_uncomputed
();
69
70
virtual
bool
energy_computed
()
const
;
71
protected
:
72
73
static
ConstraintEdge
*
downcast_cstedge
(
graph::Edge
* );
74
75
private
:
76
Size
focused_node_
;
77
EdgeListIter
edge_iter_
;
78
79
};
80
81
class
CstResNeighbConstIterator
:
public
ResidueNeighborConstIterator
{
82
public
:
83
typedef
graph::Node::EdgeListConstIter
EdgeListConstIter
;
84
85
public
:
86
CstResNeighbConstIterator
(
Size
focused_node,
EdgeListConstIter
edge_iter);
87
88
virtual
~CstResNeighbConstIterator
();
89
90
virtual
ResidueNeighborConstIterator
const
&
operator =
(
ResidueNeighborConstIterator
const
& );
91
virtual
ResidueNeighborConstIterator
const
&
operator ++
();
92
virtual
bool
operator ==
(
ResidueNeighborConstIterator
const
& )
const
;
93
virtual
bool
operator !=
(
ResidueNeighborConstIterator
const
& )
const
;
94
95
virtual
Size
upper_neighbor_id
()
const
;
96
virtual
Size
lower_neighbor_id
()
const
;
97
98
virtual
Size
residue_iterated_on
()
const
;
99
virtual
Size
neighbor_id
()
const
;
100
101
virtual
void
retrieve_energy
(
EnergyMap
& )
const
;
102
virtual
void
accumulate_energy
(
EnergyMap
& )
const
;
103
104
virtual
bool
energy_computed
()
const
;
105
106
protected
:
107
static
ConstraintEdge
const
*
downcast_cstedge
(
graph::Edge
const
* );
108
109
private
:
110
Size
focused_node_
;
111
graph::Node::EdgeListConstIter
edge_iter_
;
// no need to store a const iterator if this class guarantees that no non-const methods are called
112
113
};
114
115
class
CstEnergyContainer
:
public
LREnergyContainer
{
116
117
public
:
118
CstEnergyContainer
();
119
120
CstEnergyContainer
(
pose::Pose
const
& );
121
122
virtual
123
~CstEnergyContainer
();
124
125
virtual
126
bool
empty
()
const
;
127
128
virtual
129
LREnergyContainerOP
clone
()
const
;
130
131
virtual
132
void
133
set_num_nodes
(
Size
);
134
135
virtual
136
ResidueNeighborConstIteratorOP
137
const_neighbor_iterator_begin
(
int
resid )
const
;
138
139
virtual
140
ResidueNeighborConstIteratorOP
141
const_neighbor_iterator_end
(
int
resid )
const
;
142
143
virtual
144
ResidueNeighborConstIteratorOP
145
const_upper_neighbor_iterator_begin
(
int
resid )
const
;
146
147
virtual
148
ResidueNeighborConstIteratorOP
149
const_upper_neighbor_iterator_end
(
int
resid )
const
;
150
151
virtual
152
ResidueNeighborIteratorOP
153
neighbor_iterator_begin
(
int
resid );
154
155
virtual
156
ResidueNeighborIteratorOP
157
neighbor_iterator_end
(
int
resid );
158
159
virtual
160
ResidueNeighborIteratorOP
161
upper_neighbor_iterator_begin
(
int
resid );
162
163
virtual
164
ResidueNeighborIteratorOP
165
upper_neighbor_iterator_end
(
int
resid );
166
167
/// Does the constraint graph that this CEC defines match up with the constraint set stored
168
/// in the pose?
169
bool
170
matches
(
ConstraintSetCOP
cst_set );
171
172
private
:
173
ConstraintGraphOP
cst_graph_
;
174
175
Size
cst_set_revision_id_
;
176
ConstraintSetCOP
constraint_set_
;
177
178
};
179
180
}
181
}
182
}
183
184
#endif
Generated on Sat Jun 1 2013 11:35:13 for Rosetta 3.5 by
1.8.4