From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Jun 13 2007 - 02:52:12 CDT

Hi,
  You can see all of the values associated with the built-in atom
selection keywords for a particular structure by looking at the
"selections" tab of the graphicsl representations window.
The VMD User's Guide should be a complete reference for detailed
questions you may have about available atom selection keywords,
and so on, though it is often easy just to explore the data you're
working with using the "selections" tab as I mention above.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Wed, Jun 06, 2007 at 05:24:47PM +0200, Petrica GASCA wrote:
> After a few days of experimenting with scripts I managed to do some useful
> operations with it. The one that got me to write on the forum in the first
> place remains unsolved.
>
> Actually, what I want (need) to do is to show the index number for each atom
> in my (POSCAR) files as a sort of label. And I suppose it's one of the
> properties of an atom selection (index?), but I cannot find the right syntax
> for it.
>
> I take advantage of this post to ask again if there is a more complete
> documentation of the VMD text commands and the procedures already included
> in the last distribution of the software somewhere.
>
> Thanks again,
>
> 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/ 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