|
From: DeLano, W. <wa...@su...> - 2002-04-15 23:04:08
|
> From: Byron DeLaBarre [mailto:by...@SL...]
> Subject: [PyMOL] color association with state?
> Do any pymolers out there know how to associate the color of=20
> a single object
> with its state?
Sorry, this can't be done with the current versions -- colors are either =
atomic or whole-object properties (with a couple of minor exceptions). =
The only way around this right now is to distribute the states you want =
to show over a set of objects with different colors:
isomesh m1,map1,1.0,state=3D1
isomesh m2,map2,1.0,state=3D2
isomesh m3,map3,1.0,state=3D3
color red,m1
color blue,m2
color green,m3
> I have a multi-state map that I want to color as it moves through the
> different states in a movie. I want the colors to be associated with
> specific states. I only know how to color the entire=20
> collection of states a
> single color. (something like: color =3D red, object)
> Alternatively, how could I associate a number of text objects=20
> (you can do
> those in pymol, right?) with individual states within the=20
> collection of
> states.
Text objects are brand new, and can only be built right now using =
compiled graphics objects (CGOs).
CGOs are always associated with specific states, so adding a label which =
changes during the course of a movie would be straightforward, except =
that text objects are completely undocumented. Here is a start:
# REQUIRES PyMOL 0.80
# save as cgo_3Dtext01.py
from pymol import cmd
from pymol.cgo import *
from pymol.vfont import plain
cgo =3D []
axes =3D [[2.0,0.0,0.0],[0.0,2.0,0.0],[0.0,0.0,2.0]]
pos =3D [0.0,0.0,0.0]
wire_text(cgo,plain,pos,'Hello World',axes)
pos =3D [0.0,-3.0,0.0]
cyl_text(cgo,plain,pos,'Hello Universe',0.10,axes=3Daxes)
cmd.set("cgo_line_radius",0.03)
cmd.load_cgo(cgo,'txt')
cmd.zoom("all",2.0)
- Warren
mailto:wa...@su...
Warren L. DeLano, Ph.D.
|