Richard,
It's not GUI, but you could simply bind a function key such as F1 to
that command:
cmd.set_key('F1',lambda :cmd.label("(lb)",'"%s %s
%s"%(name,resn,resi)'))
You might then want to bind 'F2' to something which hides all labels.
cmd.set_key('F2',cmd.label)
Cheers,
Warren
--
mailto:[email protected]
Warren L. DeLano, Ph.D.
Principal Scientist
DeLano Scientific LLC
Voice (650)-346-1154
Fax (650)-593-4020
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> [email protected]
> Sent: Wednesday, October 29, 2003 5:14 PM
> To: [email protected]
> Subject: [PyMOL] labeling atoms in GUI
>
>
> Dear All,
>
> I want to look at my structure in PyMOL and, having centered
> on something defined by my selection script, pick atoms
> nearby and see what residues they belong to. That is, I want
> to pick select an atom with the mouse and have its name,
> residue name and residue number appear on screen, like it does in O.
>
> I figured out that [Ctrl] + Left-Mouse-Button selects the
> atom as "lb", and that the command 'label (lb),"%s %s %s" %
> (name,resn,resi)' gives me the label I want. Now how could I
> get something like that to appear as a menu function in the
> GUI so I don't have type it in all the time? Can it be a
> command executed as part of my startup script?
>
> Maybe some function like this already exists, otherwise I
> think it is a very useful thing.
>
> regards,
>
> Richard Baxter
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive? Does it
> help you create better code? SHARE THE LOVE, and help us help
> YOU! Click Here: http://sourceforge.net/donate/
> _______________________________________________
> PyMOL-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/p> ymol-users
>