Mado,

PyMOL's current labeling is inflexible.  The only way to change position
automatically is to insert spaces at the front of the label:

label (name ca),"   %s-%s"%(resn,resi)

The font selections are limited:

normal: set label_font_id, 0
bigger: set label_font_id, 1
smaller: set label_font_id, 2
proprtional-spacedd:  set label_font_id, 3
large & heavy:  set label_font_id, 4

But at least they can now be raytraced : ).

I am hoping to implement significantly enhanced label control (truetype
fonts & arbitrary positioning) for the next release.

NOTE that there is a "hack" you can currently use in order to position
labels arbitrarily in PyMOL, but it does take a little bit of work:  

(1) make a copy of your object
(2) show the copy in some unobtrusive "pickable" representation
(3) show labels on the copy 
(4) mask the original object
(5) enable editing mode(
(6) drag atoms on the copy (ctrl-shift-left-click-and-drag) the label comes
along for the ride...
(7) hide the pickable representation on the copy
(8) render

For example:

load my_mol.pdb
create cpy, my_mol
hide everything,cpy
set sphere_scale,0.05,cpy
show spheres,cpy and name ca
label cpy and name ca, "%s-%s"%(resn,resi)
mask my_mol
edit_mode

(now move atoms in copy in order to position the labels -- you'll need to
ctrl-shift-left-click-and-drag on the "sphere" at the lower-left corner of
the label)

(when you're satisfied with the positions:)

hide spheres, cpy
ray

Cheers,
Warren

> -----Original Message-----
> From: pymol-users-ad...@lists.sourceforge.net 
> [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of 
> Mads Gabrielsen
> Sent: Monday, April 05, 2004 3:40 AM
> To: pymol-users@lists.sourceforge.net
> Subject: [PyMOL] [Fwd: labels]
> 
> OK, I think I might have figured the label thing out.
> What I don't get is how to change color/font/size etc of the 
> label, and if there is command corresponding to LABELOFFSET 
> in Molscript.
> 
> Cheers,
> 
> Mads Gabrielsen
> 
> -------- Original Message --------
> Subject:      labels
> Date:         Mon, 05 Apr 2004 11:26:29 +0100
> From:         Mads Gabrielsen <m.gabriel...@dundee.ac.uk>
> To:   pymol-users@lists.sourceforge.net
> 
> 
> 
> I have just installed the new release of PyMol and was 
> particularly pleased that labels can now be rendered. Then it 
> occured to me that I actually don't know how to label a 
> residue Tyr84 (or whatever) and have the label positioned 
> next to the residue.
> Any hints would be appreciated.
> 
> Also, am I the only one who can't access the mail-list archives?
> 
> Cheers,
> Mads Gabrielsen
> 
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials Free 
> Linux tutorial presented by Daniel Robbins, President and CEO 
> of GenToo technologies. Learn everything from fundamentals to 
> system 
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
> 



Reply via email to