IMP  2.3.0
The Integrative Modeling Platform
ChimeraWriter.h
Go to the documentation of this file.
1 /**
2  * \file IMP/display/ChimeraWriter.h
3  * \brief A writer for Chimera Python files.
4  *
5  * Copyright 2007-2014 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPDISPLAY_CHIMERA_WRITER_H
9 #define IMPDISPLAY_CHIMERA_WRITER_H
10 
11 #include <IMP/display/display_config.h>
12 #include <IMP/display/Writer.h>
14 
15 IMPDISPLAY_DEPRECATED_HEADER(2.1, "Use IMP.rmf")
16 
17 IMPDISPLAY_BEGIN_NAMESPACE
18 //! Write geometry to a Python file for Chimera to read
19 /** The writer writes a Python file which can handle markers, edges
20  and surfaces. Since these are native chimera objects, they are
21  handled a bit better than VRML ones.
22 
23  This format creates one file per frame. So if you want to use frames
24  and save them all, make sure there is a "%1%" in the file name string
25  passed to the constructor.
26 
27  \deprecated_at{2.1} Use IMP::rmf instead when interfacing with Chimera.
28  */
29 class IMPDISPLAYEXPORT ChimeraWriter : public TextWriter {
30  void cleanup(std::string name, bool need_ms, bool need_surf = false);
31  bool handle_sphere(SphereGeometry *g, Color color, std::string name);
32  bool handle_cylinder(CylinderGeometry *g, Color color, std::string name);
33  bool handle_point(PointGeometry *g, Color color, std::string name);
34  bool handle_segment(SegmentGeometry *g, Color color, std::string name);
35  bool handle_polygon(PolygonGeometry *g, Color color, std::string name);
36  bool handle_triangle(TriangleGeometry *g, Color color, std::string name);
37  bool handle_ellipsoid(EllipsoidGeometry *g, Color color, std::string name);
38 
39  public:
40  IMPDISPLAY_DEPRECATED_OBJECT_DECL(2.1)
42 
43  //! Add some arbitrary Python code to the chimera file
44  /** You should import the bits of Chimera that you need.
45  At the moment, you should not name a variable surf_sets
46  or marker_sets.
47  */
48  void add_python_code(std::string code);
49 };
50 
51 IMPDISPLAY_END_NAMESPACE
52 
53 #endif /* IMPDISPLAY_CHIMERA_WRITER_H */
Represent an RGB color.
Definition: Color.h:24
Write geometry to a Python file for Chimera to read.
Definition: ChimeraWriter.h:29
macros for display classes
Base class for writing geometry to a file.
#define IMP_TEXT_WRITER(Name)
Define information for an TextWriter object.
Definition: writer_macros.h:18