Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
viewers.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_viewers_hh
15 #define INCLUDED_protocols_viewer_viewers_hh
16 
17 // Unit headers
18 
19 // Package headers
20 #include <core/types.hh>
21 #include <core/id/AtomID.fwd.hh>
22 #include <core/pose/Pose.fwd.hh>
25 
29 
30 // Project headers
31 #include <utility/vector1.hh>
32 
33 // C++ Headers
34 #include <string>
35 
36 #include <platform/types.hh>
37 #include <utility/down_cast.hh>
38 #include <utility/exit.hh>
39 #include <utility/vector1.fwd.hh>
40 #include <utility/vector1_bool.hh>
41 #include <utility/vectorL.fwd.hh>
42 #include <utility/vectorL.hh>
43 #include <utility/vectorL_Selector.hh>
44 #include <utility/vectorL_bool.hh>
45 #include <utility/pointer/access_ptr.fwd.hh>
46 #include <utility/pointer/access_ptr.hh>
47 #include <utility/pointer/owning_ptr.functions.hh>
48 #include <utility/pointer/owning_ptr.fwd.hh>
49 #include <utility/pointer/owning_ptr.hh>
50 #include <numeric/numeric.functions.hh>
51 #include <numeric/sphericalVector.fwd.hh>
52 #include <numeric/trig.functions.hh>
53 #include <numeric/xyz.functions.fwd.hh>
54 #include <numeric/xyzMatrix.fwd.hh>
55 #include <numeric/xyzVector.fwd.hh>
56 #include <numeric/xyzVector.hh>
57 #include <algorithm>
58 #include <cassert>
59 #include <cmath>
60 #include <cstddef>
61 #include <cstdlib>
62 #include <iomanip>
63 #include <iosfwd>
64 #include <iostream>
65 #include <limits>
66 #include <vector>
67 
68 
69 namespace protocols {
70 namespace viewer {
71 
72 typedef void* (*VoidFunc)(void*);
73 
74 static std::string empty_string("");
75 
76 #ifndef GL_GRAPHICS ///////////////////////////////////////////////////////
77 
78 inline
79 void
82  std::string const = empty_string,
83  int const = 900,
84  int const = 900,
85  bool = false
86 )
87 {
88 }
89 
90 inline
91 void
94  std::string const = empty_string,
95  int const = 900,
96  int const = 900,
97  bool = false
98 )
99 {
100 }
101 
102 inline
103 int
104 viewer_main( VoidFunc worker_main ){ worker_main(NULL); return 0; }
105 
106 void set_bg_color( core::Vector new_bg_color );
107 
108 #else // GL_GRAPHICS ////////////////////////////////////////////////////
109 
110 void
112  core::conformation::Conformation & conformation,
113  std::string const name_in = empty_string,
114  int const length = 900,
115  int const width = 900,
116  bool debug_pause=false
117 );
118 
119 void
121  moves::MonteCarlo & mc,
122  std::string const name_in = empty_string,
123  int const length = 900,
124  int const width = 900,
125  bool debug_pause=false
126 );
127 
128 
129 int
130 viewer_main( VoidFunc worker_main );
131 
132 #endif
133 
134 #if defined GL_GRAPHICS || BOINC_GRAPHICS
135 
136 void
137 display_residues(
139  core::id::AtomID const & anchor_id
140 );
141 
142 //void
143 //display_residues_wireframe(
144 // utility::vector1< core::conformation::ResidueCOP > const & residues,
145 // core::id::AtomID const & anchor_id
146 //);
147 
148 void
149 display_residues_wireframe(
150  GraphicsState & gs,
152  core::Vector const & center
153  );
154 
155 void set_bg_color( core::Vector new_bg_color );
156 
157 
158 void draw_pose(const core::pose::Pose & pose,
159  GraphicsState & gs, bool centered);
160 
161 void draw_conformation( utility::vector1< core::conformation::ResidueCOP > const & residues,
162  utility::vector1< char > const & ss,
163  GraphicsState & gs, core::Vector const & center);
164 
165 void
166 render_density(
167  GraphicsState &gs,
168  utility::vector1< triangle > &triangles );
169 
170 void
171 display_density(
172  GraphicsState &gs,
173  utility::vector1< triangle > &triangles ) ;
174 
175 void
176 draw_conformation_and_density(
178  utility::vector1< char > const & ss,
179  utility::vector1< triangle > &triangles,
180  GraphicsState & gs,
181  core::Vector const & center);
182 
183 #endif ////////////////////////////////////////////////////////////////
184 
185 void
187  moves::MonteCarlo & mc,
188  std::string const name_in,
189  bool fullatom
190 );
191 
192 /// @brief Allows for graceful exit of graphics viewers.
193 void
195 
196 void
198 
199 
200 } // viewer
201 } // protocols
202 
203 
204 #endif