[Chimera-users] 3D custom residue labels

Elaine Meng meng at cgl.ucsf.edu
Mon Nov 21 10:00:12 PST 2011


Hi Mathy,
There are a few issues with what you tried...
(1) The "labelopt resinfo" capability is new in Chimera 1.6, thus only available in the daily builds.

(2)  The syntax was not quite right, should be:
labelopt resinfo ARG 167

(3)  However... "labelopt" is mainly intended for labeling with attribute values, not just an arbitrary string.  If only an arbitrary string, then all labels shown after that "labelopt" command would be identical. If the actual residue numbers match what you want to show as the label (as opposed to your labeling residue 151 as 167), for unique labels you would use:
labelopt resinfo %(name)s %(number)

Since you are specifying arbitrary text alone, without residue attribute values, you could instead use "setattr" which would also work in Chimera 1.5.3:

setattr r label "ARG 167" :151

If you want the residue labels to be placed relative to the alpha-carbon instead of centroid of displayed atoms, you could also use:

setattr m residueLabelPos 2

Regarding the offset, in the current daily build you would not need to use it, since the labels are drawn "always in front."  However, this is somewhat experimental and there are a few glitches, for example sometimes surfaces are drawn in front of the labels, and we haven't settled for certain whether this behavior will be retained in future releases.   

Conversely, consider that large Z-offsets can be problematic:
(A) with perspective, large-Z-offset labels may appear shifted away from the labeled atom unless that atom is near the center of view.  Perspective is used by default, although it could be turned off by using orthographic projection (see Camera tool or command: set projection orthographic).
(B) large-Z-offset labels can be clipped away by the front clipping plane.

As you can tell, I've struggled with these issues myself, and I do like the current "mostly always in front" labeling for certain purposes, if you need the 3D labels that move along with the structure.  In other cases where I've settled on a particular view for a figure, I would use 2D Labels instead.

Regarding the man pages, you were probably looking under 
http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/
... the development version of the manual that goes with the daily builds, whereas the manual for 1.5.3 would be available from the Help menu of that version of Chimera, or on our website under 
http://www.cgl.ucsf.edu/chimera/1.5.3/docs/UsersGuide/

I hope this helps,
Elaine
----------
Elaine C. Meng, Ph.D. 
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
Department of Pharmaceutical Chemistry
University of California, San Francisco

On Nov 21, 2011, at 8:08 AM, matheus froeyen wrote:

> Hi
> I tried the command mode options to generate a custom hard coded 3D residue label:
> 
> labelopt resinfo "ARG 167"
> rlabel offset 0.,0.,20. :151
> 
> however get an error in the labelopt command: "resinfo" keyword does not exist
> (although it is described in the chimera man pages)
> 
> Then I tried to bypass this by using the atom labeling
> 
> labelopt info "ARG 167"
> label offset 0.,0.,20. :151 at CA
> 
> but again no luck, then is displayed the label "none" in the 3D window
> 
> the default residue labeling works however.
> How can I use custom labels without using the menus?
> 
> I use chimera 1.5.3 build 33475 on mac osx.
> best regards
> mathy





More information about the Chimera-users mailing list