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
viewer
ConformationViewer.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
11
/// @brief
12
/// @author
13
14
#ifndef INCLUDED_protocols_viewer_ConformationViewer_hh
15
#define INCLUDED_protocols_viewer_ConformationViewer_hh
16
17
18
// Unit headers
19
#include <
protocols/viewer/ConformationViewer.fwd.hh
>
20
21
// Package headers
22
#include <
core/conformation/Conformation.fwd.hh
>
23
#include <
core/conformation/Residue.fwd.hh
>
24
#include <
core/conformation/signals/ConnectionEvent.fwd.hh
>
25
#include <
core/conformation/signals/XYZEvent.fwd.hh
>
26
#include <
core/id/AtomID.hh
>
27
28
// Project headers
29
30
#include <utility/pointer/owning_ptr.hh>
31
#include <utility/pointer/ReferenceCount.hh>
32
#include <utility/signals/Link.hh>
33
// AUTO-REMOVED #include <utility/vector1.hh>
34
35
#include <
protocols/viewer/GraphicsState.hh
>
36
#include <
protocols/viewer/triangle.hh
>
37
38
#include <utility/vector1_bool.hh>
39
40
//Auto Headers
41
42
43
44
// C++ Headers
45
46
#ifdef GL_GRAPHICS
47
#include <pthread.h>
48
#endif
49
50
namespace
protocols {
51
namespace
viewer {
52
53
/// @brief observer that attaches to a Conformation and displays graphics
54
class
ConformationViewer
:
public
utility::pointer::ReferenceCount
{
55
56
private
:
// typedefs
57
58
typedef
utility::pointer::ReferenceCount
Super
;
59
60
public
:
// typedefs
61
62
typedef
utility::vector1< core::conformation::ResidueCOP >
ResidueCOPs
;
63
64
public
:
// construct/destruct
65
66
/// @brief default constructor
67
ConformationViewer
();
68
69
/// @brief constructor
70
ConformationViewer
(
std::string
const
&
name
);
71
72
/// @brief constructor
73
ConformationViewer
(
std::string
const
&
name
,
int
length,
int
width,
bool
debug_pause );
74
75
// @brief default destructor
76
~ConformationViewer
();
77
78
79
private
:
// disallow copy
80
81
/// @brief disallow copy constructor
82
// NOTE: if implementing copy constructor, remember to set 'conf_' to NULL
83
// as there is no transferal of subject Conformation on copy construct
84
ConformationViewer
(
ConformationViewer
const
& rval );
85
86
/// @brief disallow copy assignment
87
// NOTE: if ConformationViewer copy assignment, remember to leave 'conf_' untouched
88
// as any current subject Conformation is kept on copy assign
89
ConformationViewer
&
operator =
(
ConformationViewer
const
& rval );
90
91
92
public
:
// window management
93
94
/// called by glutDisplayFunc
95
void
96
display_func
();
97
98
/// called by glutIdleFunc
99
void
100
display_if_necessary
();
101
102
///
103
int
104
window
()
const
105
{
106
return
my_window_
;
107
}
108
109
///
110
void
111
window
(
int
const
setting )
112
{
113
my_window_
= setting;
114
}
115
116
int
117
get_width
()
const
118
{
119
return
width_
;
120
}
121
122
int
123
get_length
()
const
124
{
125
return
length_
;
126
}
127
128
protocols::viewer::GraphicsState
&
129
get_gs
() {
130
return
current_gs_
;
131
}
132
133
///
134
std::string
const
&
135
name
()
const
136
{
137
return
name_
;
138
}
139
140
public
:
// observer interface
141
142
/// @brief is currently observing a Conformation?
143
/// @return the Conformation, otherwise NULL
144
core::conformation::Conformation
const
*
145
is_observing
()
const
;
146
147
/// @brief attach to Conformation
148
void
149
attach_to
(
core::conformation::Conformation
const
& conf );
150
151
/// @brief detach from Conformation
152
void
153
detach_from
();
154
155
/// @brief upon receiving a ConnectionEvent do...
156
void
157
on_connection_change
(
core::conformation::signals::ConnectionEvent
const
& event );
158
159
/// @brief upon receiving a GeneralEvent update the residues and atom tree root
160
void
161
on_xyz_change
(
core::conformation::signals::XYZEvent
const
& event );
162
163
private
:
164
ResidueCOPs
residues_
;
165
utility::vector1< char >
secstruct_
;
166
protocols::viewer::GraphicsState
current_gs_
;
167
168
// density isosurface
169
utility::vector1< triangle >
triangles_
;
170
171
core::id::AtomID
anchor_id_
;
172
173
std::string
const
name_
;
174
175
bool
new_conformation_
;
176
177
int
my_window_
;
178
int
length_
;
179
int
width_
;
180
181
bool
use_debug_pause_
;
182
183
utility::signals::Link
connection_event_link_
;
184
utility::signals::Link
xyz_event_link_
;
185
186
/// @brief the Conformation being observed, we need this to ensure
187
/// debug_pause is reset upon detachment
188
core::conformation::Conformation
const
*
conf_
;
189
190
#ifdef GL_GRAPHICS
191
pthread_mutex_t residues_mut_;
192
#endif
193
194
};
195
196
}
// viewer
197
}
// protocols
198
199
200
#endif
Generated on Sat Jun 1 2013 12:25:09 for Rosetta 3.5 by
1.8.4