IMP  2.0.1
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-2013 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_BEGIN_NAMESPACE
16 #if IMP_HAS_DEPRECATED
17 //! Write geometry to a python file for Chimera to read
18 /** The writer writes a python file which can handle markers, edges
19  and surfaces. Since these are native chimera objects, they are
20  handled a bit better than vrml ones.
21 
22  This format creates one file per frame. So if you want to use frames
23  and save them all, make sure there is a "%1%" in the file name string
24  passed to the constructor.
25 
26  \deprecated Use IMP::rmf instead when interfacing with Chimera.
27  */
28 class IMPDISPLAYEXPORT ChimeraWriter: public TextWriter
29 {
30  void cleanup(std::string name,
31  bool need_ms, bool need_surf=false);
32  bool handle_sphere(SphereGeometry *g,
33  Color color, std::string name);
34  bool handle_cylinder(CylinderGeometry *g,
35  Color color, std::string name);
36  bool handle_point(PointGeometry *g,
37  Color color, std::string name);
38  bool handle_segment(SegmentGeometry *g,
39  Color color, std::string name);
40  bool handle_polygon(PolygonGeometry *g,
41  Color color, std::string name);
42  bool handle_triangle(TriangleGeometry *g,
43  Color color, std::string name);
44  bool handle_ellipsoid(EllipsoidGeometry *g,
45  Color color, std::string name);
46 public:
48 
49  //! Add some arbitrary python code to the chimera file
50  /** You should import the bits of Chimera that you need.
51  At the moment, you should not name a variable surf_sets
52  or marker_sets.
53  */
54  void add_python_code(std::string code);
55 };
56 #endif
57 
58 IMPDISPLAY_END_NAMESPACE
59 
60 #endif /* IMPDISPLAY_CHIMERA_WRITER_H */