Package Scientific :: Package Visualization :: Module PyMOL
[hide private]
[frames] | no frames]

Module PyMOL



Definitions of simple 3D graphics objects and scenes containing them, in a form that can be fed to the molecular visualization program PyMOL

Scripts that use this module, directly or indirectly, must be run from inside PyMOL, otherwise they will terminate with an error message.

This module is almost compatible with the modules VRML and VRML2, which provide visualization by VRML browsers. There are no Polygon objects, and the only material attribute supported is diffuse_color.

Example:
 >>> from Scientific.Visualization.PyMOL import *
 >>> scene = Scene([])
 >>> scale = ColorScale(10.)
 >>> for x in range(11):
 >>>     color = scale(x)
 >>>     scene.addObject(Cube(Vector(x, 0., 0.), 0.2,
 >>>                          material=Material(diffuse_color = color)))
 >>> scene.view()


Classes [hide private]
  Arrow
Arrow
  Cone
Cone
  Cube
Cube
  Cylinder
Cylinder
  Group
Base class for composite objects
  Line
Line
  Material
Material specification for graphics objects
  Molecules
Molecules from a PDB file
  PyMOLObject
Graphics object for PyMOL
  Scene
PyMOL scene
  ShapeObject
Graphics objects representing geometrical shapes
  Sphere
Sphere

Functions [hide private]
Material DiffuseMaterial(color)
Returns a material with the 'diffuse color' attribute set to color
Material EmissiveMaterial(color)
Returns a material with the 'diffuse color' attribute set to color
  isGroup(x)

Variables [hide private]
  _diffuse_material_dict = {}

Function Details [hide private]

DiffuseMaterial(color)

 
Parameters:
  • color (Color or str) - a color object or a predefined color name
Returns: Material
a material with the 'diffuse color' attribute set to color

EmissiveMaterial(color)

 
Parameters:
  • color (Color or str) - a color object or a predefined color name
Returns: Material
a material with the 'diffuse color' attribute set to color

isGroup(x)

 

Variables Details [hide private]

_diffuse_material_dict

Value:
{}