From: John Stone (johns_at_ks.uiuc.edu)
Date: Fri Jun 22 2007 - 13:03:41 CDT

Hi,
  The problem is much more complex than one might think.
The major issue is that most of the external renderers cannot
actually draw a "line", and so we have to emulate lines with
cylinders. This can work ok if you have a few lines and you can
adjust the thickness to make them look reasonable. In the case
of the text rendering, it's even trickier because the line segments
are very short, and some of the text file formats lack sufficient
floating point precision to get the line endpoints to match up
perfectly. That said, I do have a partial implementation which wasn't
finished soon enough for VMD 1.8.6, but I do hope to have the basics
working for the next version. In the mean time, tools like photoshop
and GIMP are a good way to draw nice text labels on your figures. The
main reason people have any interest in having the external renderers
display the text in the first place (despite the obvious problems and
limitations) is for the case of movie making where manually labelling
things isn't practical. I'll let you know when I have a test version
that addresses this issue.

  John Stone
  vmd_at_ks.uiuc.edu

On Fri, Jun 22, 2007 at 04:28:57PM +0200, Petrica GASCA wrote:
> Hi,
>
> This problem appears in the mailing list as being unsolved in 2003, but
> being worked on. As I encountered it today, I suppose that it's still
> unsolved.
>
> Is there any other way to render high quality images with embedded text
> labels for atoms for example, or any other text inputed with a graphics
> command?
>
> Thanks you,
>
> Petrica GASCA
>
>
>
> On 5/11/07, John Stone <johns_at_ks.uiuc.edu> wrote:
> >
> >
> >Hi,
> > If I understand your question correctly, you wish to display the text
> >labels
> >for all atoms?
> >
> >If so, you can use a simple script like this one, to add labels
> >for any selection you like:
> >
> >proc label_atoms { molid seltext } {
> > set sel [atomselect $molid $seltext]
> > set atomlist [$sel list]
> > foreach {atom} $atomlist {
> > set atomlabel [format "%d/%d" $molid $atom]
> > label add Atoms $atomlabel
> > }
> > $sel delete
> >}
> >
> >You'd call this with something like:
> > set molid [molinfo top]
> > label_atoms $molid "name CA"
> >
> >If you want to draw your own text labels for each of the atoms
> >(rather than using the built-in labeling feature) you can also
> >devise a script that does this, for example:
> >
> >proc show_partial_charge { selection } {
> > set sel [atomselect top $selection]
> > foreach q [$sel get charge] pos [$sel get {x y z}] {
> > set qstr [format %4.3f $q]
> > graphics 0 text $pos $qstr
> > }
> >}
> >
> >You'd call this with something like:
> > show_partial_charge "residue 0"
> >
> >You can of course modify this to do anything you like.
> >
> > John Stone
> > vmd_at_ks.uiuc.edu
> >
> >On Fri, May 11, 2007 at 01:49:10PM +0200, Petrica GASCA wrote:
> >> Hello,
> >>
> >> I am a new user of VMD and I am trying to get used to it on a Linux
> >machine.
> >> What is really important for my work is to see atom numbers (the index
> >field
> >> from the Labels window).
> >>
> >> Is there any possibility to show them as atom labels the same way that
> >we
> >> can see the name of the atom when we select them manually?
> >>
> >> Thanks in advance.
> >
> >--
> >NIH Resource for Macromolecular Modeling and Bioinformatics
> >Beckman Institute for Advanced Science and Technology
> >University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> >Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> > WWW: http://www.ks.uiuc.edu/~johns/ <http://www.ks.uiuc.edu/%7Ejohns/>
> > Fax:
> >217-244-6078
> >

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078