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
TwelveANeighborGraph.cc
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/TwelveANeighborGraph.cc
11
/// @brief Neighbor graph to represent for each residue the number of other residues within 12 Angstroms
12
/// @author Mike Tyka mtyka@u.washington.edu
13
14
// Unit Headers
15
#include <
core/scoring/TwelveANeighborGraph.hh
>
16
17
#include <utility/vector1.hh>
18
19
20
21
namespace
core {
22
namespace
scoring {
23
24
///////////////////////////////
25
// class TwelveANeighborNode ///
26
///////////////////////////////
27
28
TwelveANeighborNode::~TwelveANeighborNode
() {}
29
30
TwelveANeighborNode::TwelveANeighborNode
(
graph::Graph
* owner,
Size
node_id )
31
:
32
parent
( owner, node_id )
33
{}
34
35
void
36
TwelveANeighborNode::copy_from
(
Node
const
*
/*source*/
)
37
{
38
//assert( dynamic_cast< TwelveANeighborNode const * > (source) );
39
}
40
41
Size
42
TwelveANeighborNode::count_static_memory
()
const
{
43
return
sizeof
(
TwelveANeighborNode
);
44
}
45
46
47
Size
48
TwelveANeighborNode::count_dynamic_memory
()
const
{
49
return
parent::count_dynamic_memory
();
50
}
51
52
///////////////////////////////
53
// class TwelveANeighborEdge ///
54
///////////////////////////////
55
56
TwelveANeighborEdge::~TwelveANeighborEdge
() {}
57
58
TwelveANeighborEdge::TwelveANeighborEdge
(
59
graph::Graph
* owner,
60
Size
first_node_ind,
61
Size
second_node_ind )
62
:
63
parent
( owner, first_node_ind, second_node_ind )
64
{}
65
66
void
TwelveANeighborEdge::copy_from
(
Edge
const
*
/*source*/
)
67
{
68
//assert( dynamic_cast< TwelveNeighborEdge const * > ( source ) );
69
}
70
71
Size
TwelveANeighborEdge::count_static_memory
()
const
72
{
73
return
sizeof
(
TwelveANeighborEdge
);
74
}
75
76
Size
TwelveANeighborEdge::count_dynamic_memory
()
const
77
{
78
return
parent::count_dynamic_memory
();
79
}
80
81
///////////////////////////////
82
// class TwelveANeighborGraph ///
83
///////////////////////////////
84
85
/// @details -- 12 A between nbr_atoms, + 6.12 A to the tip of arginine
86
Distance
const
TwelveANeighborGraph::twelveA_
( 18.21 );
87
88
DistanceSquared
const
TwelveANeighborGraph::twelveA_squared_
( twelveA_ * twelveA_);
89
90
TwelveANeighborGraph::~TwelveANeighborGraph
() {
delete_everything
(); }
91
92
TwelveANeighborGraph::TwelveANeighborGraph
()
93
:
94
parent
()
95
{}
96
97
TwelveANeighborGraph::TwelveANeighborGraph
(
Size
num_nodes )
98
:
99
parent
()
100
{
101
set_num_nodes
( num_nodes );
102
}
103
104
TwelveANeighborGraph::TwelveANeighborGraph
(
TwelveANeighborGraph
const
& source )
105
:
106
parent
( source )
107
{
108
operator =
( source );
109
}
110
111
112
TwelveANeighborGraph
&
113
TwelveANeighborGraph::operator =
(
TwelveANeighborGraph
const
& source )
114
{
115
return
static_cast<
TwelveANeighborGraph
&
>
(
parent::operator =
( source ));
116
}
117
118
Distance
119
TwelveANeighborGraph::neighbor_cutoff
()
const
120
{
121
return
twelveA_
;
122
}
123
124
void
125
TwelveANeighborGraph::conditionally_add_edge
(
126
Size
lower_node_id,
127
Size
upper_node_id,
128
DistanceSquared
dsq
129
)
130
{
131
if
( dsq <
twelveA_squared_
)
add_edge
( lower_node_id, upper_node_id );
132
}
133
134
ContextGraphOP
135
TwelveANeighborGraph::clone
()
const
136
{
137
return
new
TwelveANeighborGraph
( *
this
);
138
}
139
140
void
141
TwelveANeighborGraph::update_from_pose
(
142
pose::Pose
const
&
/*pose*/
143
)
144
{}
145
146
Size
147
TwelveANeighborGraph::count_static_memory
()
const
{
148
return
sizeof
(
TwelveANeighborGraph
);
149
}
150
151
Size
152
TwelveANeighborGraph::count_dynamic_memory
()
const
{
153
return
parent::count_dynamic_memory
();
154
}
155
156
void
TwelveANeighborGraph::delete_edge
(
graph::Edge
* edge )
157
{
158
delete
edge;
159
}
160
161
graph::Node
*
162
TwelveANeighborGraph::create_new_node
(
Size
node_index ) {
163
return
new
TwelveANeighborNode
(
this
, node_index );
164
}
165
166
graph::Edge
*
167
TwelveANeighborGraph::create_new_edge
(
Size
index1,
Size
index2)
168
{
169
return
new
TwelveANeighborEdge
(
this
, index1, index2 );
170
}
171
172
graph::Edge
*
173
TwelveANeighborGraph::create_new_edge
(
graph::Edge
const
* example_edge )
174
{
175
return
new
TwelveANeighborEdge
(
176
this
,
177
example_edge->
get_first_node_ind
(),
178
example_edge->
get_second_node_ind
()
179
);
180
}
181
182
183
}
// scoring
184
}
// core
185
Generated on Sat Jun 1 2013 11:40:20 for Rosetta 3.5 by
1.8.4