IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
IMP::display Namespace Reference

Output IMP model data in various file formats. More...

Detailed Description

Output IMP model data in various file formats.

The IMP::display::Writer class provides the base class for objects which write to specific file formats and the IMP::display::Geometry class provides a means of describing geometry. Currently it supports output to

And display of boxes, points, spheres, segments, ellipsoids are supported.

You should probably check out IMP::rmf for a more general file format and one that is read natively by both IMP and Chimera.

Info

Author(s): Daniel Russel

Maintainer: benmwebb

License: LGPL This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Publications:

Classes

class  BoundingBoxGeometry
 Display a bounding box. More...
class  Color
 Represent an RGB color. More...
class  Colored
 A particle with a color. More...
class  CylinderGeometry
 Display a cylinder. More...
class  EllipsoidGeometry
 Display a ellipsoid. More...
class  FilterGeometry
 Remove geometry which is not above a plane. More...
class  Geometry
 The base class for geometry. More...
class  GeometryProcessor
 Provide a standard geometry processing framework. More...
class  GeometrySet
 Group of set of geometric elements. More...
class  IsosurfaceGeometry
 Display an isosurface of a density map. More...
class  LabelGeometry
 A text label for a ball in space. More...
class  PairGeometry
 A base class for geometry contained in particles. More...
class  PairsGeometry
 A base class for geometry from a set of particles. More...
class  PivyWriter
class  PlaneGeometry
 Display a plane as truncated to a bounding box. More...
class  PointGeometry
 Display a point. More...
class  PolygonGeometry
class  PymolWriter
 Write a CGO file with the geometry. More...
class  ReferenceFrameGeometry
 Display a reference frame. More...
class  RestraintGeometry
 Try to draw some stuff for a generic restraint. More...
class  RestraintSetGeometry
 Geometry for a whole set of restraints. More...
class  SegmentGeometry
 Display a segment. More...
class  SingletonGeometry
 A base class for geometry contained in particles. More...
class  SingletonsGeometry
 A base class for geometry from a set of particles. More...
class  SkinSurfaceGeometry
 Display an isosurface of a density map. More...
class  SphereGeometry
 Display a sphere. More...
class  SurfaceMeshGeometry
 Display a surface mesh. More...
class  TextWriter
class  TriangleGeometry
 Display a triangle. More...
class  WriteOptimizerState
class  Writer
 Base class for writing geometry to a file. More...
class  WriterAdaptor

Typedefs

typedef IMP::Vector< Colored > Coloreds
typedef IMP::Vector< Color > Colors
typedef IMP::Vector< IMP::Pointer< Geometry > > Geometries
typedef IMP::Vector< IMP::WeakPointer< Geometry > > GeometriesTemp
typedef IMP::Vector< IMP::Pointer< TextWriter > > TextWriters
typedef IMP::Vector< IMP::WeakPointer< TextWriter > > TextWritersTemp
typedef IMP::Vector< WriterAdaptor > WriterAdaptors
typedef IMP::Vector< IMP::Pointer< Writer > > Writers
typedef IMP::Vector< IMP::WeakPointer< Writer > > WritersTemp

Functions

BoundingBoxGeometry * create_geometry (const algebra::BoundingBoxD< 3 > &t, std::string name="algebra::BoundingBoxD<3>"+"%1" "%")
CylinderGeometry * create_geometry (const algebra::Cylinder3D &t, std::string name="algebra::Cylinder3D"+"%1" "%")
EllipsoidGeometry * create_geometry (const algebra::Ellipsoid3D &t, std::string name="algebra::Ellipsoid3D"+"%1" "%")
ReferenceFrameGeometry * create_geometry (const algebra::ReferenceFrame3D &t, std::string name="algebra::ReferenceFrame3D"+"%1" "%")
SegmentGeometry * create_geometry (const algebra::Segment3D &t, std::string name="algebra::Segment3D"+"%1" "%")
SphereGeometry * create_geometry (const algebra::Sphere3D &t, std::string name="algebra::Sphere3D"+"%1" "%")
TriangleGeometry * create_geometry (const algebra::Triangle3D &t, std::string name="algebra::Triangle3D"+"%1" "%")
PointGeometry * create_geometry (const algebra::Vector3D &t, std::string name="algebra::Vector3D"+"%1" "%")
PolygonGeometry * create_geometry (const algebra::Vector3Ds &t, std::string name="algebra::Vector3Ds"+"%1" "%")
Writer * create_writer (std::string filename)
Color get_display_color (unsigned int i)
Color get_interpolated_rgb (const Color &a, const Color &b, double f)
 Return a color interpolated between a and b in RGB space.
double get_linear_color_map_value (double min, double max, double value)

Colormaps

These functions map a number in the interval [0,1] to a color using some color map.

Color get_jet_color (double f)
 Return the color for f from the jet color map.
Color get_hot_color (double f)
 Return the color for f from the hot color map.
Color get_rgb_color (double f)
 Return the color for f from the RGB color map.
Color get_gray_color (double f)
 Return the a grayscale value for f.
Color get_gnuplot_color (double f)
 Return colors using the gnuplot default color map.

Standard module functions

All IMP modules have a set of standard functions to help get information about the module and about files associated with the module.

std::string get_module_version ()
std::string get_module_name ()
std::string get_data_path (std::string file_name)
 Return the full path to one of this module's data files.
std::string get_example_path (std::string file_name)
 Return the full path to one of this module's example files.

Typedef Documentation

◆ Coloreds

typedef IMP::Vector<Colored> IMP::display::Coloreds

Definition at line 65 of file Colored.h.

◆ Colors

Pass or store a set of Color.

Definition at line 196 of file Color.h.

◆ Geometries

A vector of reference-counting object pointers.

Definition at line 19 of file declare_Geometry.h.

◆ GeometriesTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
Geometry

Definition at line 19 of file declare_Geometry.h.

◆ TextWriters

A vector of reference-counting object pointers.

Definition at line 137 of file Writer.h.

◆ TextWritersTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
TextWriter

Definition at line 137 of file Writer.h.

◆ WriterAdaptors

Pass or store a set of WriterAdaptor.

Definition at line 158 of file Writer.h.

◆ Writers

A vector of reference-counting object pointers.

Definition at line 136 of file Writer.h.

◆ WritersTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
Writer

Definition at line 136 of file Writer.h.

Function Documentation

◆ create_geometry() [1/9]

BoundingBoxGeometry * IMP::display::create_geometry ( const algebra::BoundingBoxD< 3 > & t,
std::string name = "algebra::BoundingBoxD<3>"+"%1" "%" )

Create a Geometry with the passed primitive.

◆ create_geometry() [2/9]

CylinderGeometry * IMP::display::create_geometry ( const algebra::Cylinder3D & t,
std::string name = "algebra::Cylinder3D"+"%1" "%" )

Create a Geometry with the passed primitive.

◆ create_geometry() [3/9]

EllipsoidGeometry * IMP::display::create_geometry ( const algebra::Ellipsoid3D & t,
std::string name = "algebra::Ellipsoid3D"+"%1" "%" )

Create a Geometry with the passed primitive.

◆ create_geometry() [4/9]

ReferenceFrameGeometry * IMP::display::create_geometry ( const algebra::ReferenceFrame3D & t,
std::string name = "algebra::ReferenceFrame3D"+"%1" "%" )

Create a Geometry with the passed primitive.

◆ create_geometry() [5/9]

SegmentGeometry * IMP::display::create_geometry ( const algebra::Segment3D & t,
std::string name = "algebra::Segment3D"+"%1" "%" )

Create a Geometry with the passed primitive.

◆ create_geometry() [6/9]

SphereGeometry * IMP::display::create_geometry ( const algebra::Sphere3D & t,
std::string name = "algebra::Sphere3D"+"%1" "%" )

Create a Geometry with the passed primitive.

◆ create_geometry() [7/9]

TriangleGeometry * IMP::display::create_geometry ( const algebra::Triangle3D & t,
std::string name = "algebra::Triangle3D"+"%1" "%" )

Create a Geometry with the passed primitive.

◆ create_geometry() [8/9]

PointGeometry * IMP::display::create_geometry ( const algebra::Vector3D & t,
std::string name = "algebra::Vector3D"+"%1" "%" )

Create a Geometry with the passed primitive.

◆ create_geometry() [9/9]

PolygonGeometry * IMP::display::create_geometry ( const algebra::Vector3Ds & t,
std::string name = "algebra::Vector3Ds"+"%1" "%" )

Create a Geometry with the passed primitive.

◆ create_writer()

Writer * IMP::display::create_writer ( std::string filename)

Create an appropriate writer based on the file suffix.

Here is the call graph for this function:

◆ get_data_path()

std::string IMP::display::get_data_path ( std::string file_name)

Return the full path to one of this module's data files.

To read the data file "data_library" that was placed in the data directory of this module, do something like

std::ifstream in(IMP::display::get_data_path("data_library"));
std::string get_data_path(std::string file_name)
Return the full path to one of this module's data files.

This will ensure that the code works both when IMP is installed or if used via the setup_environment.sh script.

Note
Each module has its own data directory, so be sure to use this function from the correct module.
Here is the call graph for this function:

◆ get_display_color()

Color IMP::display::get_display_color ( unsigned int i)

Produce a color that is attempted to be contrasting with the i-1 previous colors. Currently, they recycle after 11, but they can be darkened instead. Just ask.

Here is the call graph for this function:

◆ get_example_path()

std::string IMP::display::get_example_path ( std::string file_name)

Return the full path to one of this module's example files.

To read the example file "example_protein.pdb" that was placed in the examples directory of this module, do something like

std::ifstream in(IMP::display::get_example_path("example_protein.pdb"));
std::string get_example_path(std::string file_name)
Return the full path to one of this module's example files.

This will ensure that the code works both when IMP is installed or if used via the setup_environment.sh script.

Note
Each module has its own example directory, so be sure to use this function from the correct module.
Here is the call graph for this function:

◆ get_gnuplot_color()

Color IMP::display::get_gnuplot_color ( double f)

Return colors using the gnuplot default color map.

See also
Color
Here is the call graph for this function:

◆ get_gray_color()

Color IMP::display::get_gray_color ( double f)

Return the a grayscale value for f.

See also
Color
Here is the call graph for this function:

◆ get_hot_color()

Color IMP::display::get_hot_color ( double f)

Return the color for f from the hot color map.

See also
Color
Here is the call graph for this function:

◆ get_interpolated_rgb()

Color IMP::display::get_interpolated_rgb ( const Color & a,
const Color & b,
double f )

Return a color interpolated between a and b in RGB space.

If f is 0, then a is returned, if f is 1, b is returned.

See also
Color

Definition at line 151 of file Color.h.

Here is the call graph for this function:

◆ get_jet_color()

Color IMP::display::get_jet_color ( double f)

Return the color for f from the jet color map.

See also
Color
Here is the call graph for this function:

◆ get_linear_color_map_value()

double IMP::display::get_linear_color_map_value ( double min,
double max,
double value )

Return a number suitable for being passed to a color map that is gotten by linearly scaling between the passed min and max (and truncating values that are out of range).

Here is the call graph for this function:

◆ get_module_name()

std::string IMP::display::get_module_name ( )

Definition at line 130 of file display_config.h.

◆ get_rgb_color()

Color IMP::display::get_rgb_color ( double f)

Return the color for f from the RGB color map.

See also
Color
Here is the call graph for this function: