From: Maxim Belkin (mbelkin_at_ks.uiuc.edu)
Date: Sat Aug 16 2014 - 03:36:23 CDT

Ashar, this thread is not related to your problem... unless you are trying to change labels in VMD while creating a psf file.

Maxim

On Aug 16, 2014, at 3:24 AM, Ashar Malik <asharjm_at_gmail.com> wrote:

> I am not sure how this applies to my problem. Can you explain a bit please.
>
>
> On Sat, Aug 16, 2014 at 7:48 PM, Maxim Belkin <mbelkin_at_ks.uiuc.edu> wrote:
> Here is a recipe that you can use to cook up the labels to your liking:
>
> ###
> set labelsToCook [llength [label list Atoms]]
>
> for {set label 0} {$label < $labelsToCook} {incr label} {
> label textformat Atoms $label {%i}
> }
> ###
>
> Maxim
>
>
> On Aug 15, 2014, at 4:46 PM, Andrew DeYoung <adeyoung_at_andrew.cmu.edu> wrote:
>
> > Hi,
> >
> > In an archived message on this mailing list (
> > http://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/9356.html ), there is
> > a recipe by John Stone for labeling all atoms of a molecule:
> >
> > 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
> > }
> >
> > which John Stone explains can be called with:
> >
> > set molid [molinfo top]
> > label_atoms $molid "name CA"
> >
> > When I use this recipe, the labels appear to be the residue and atom names.
> > How can I modify the above recipe so that the atom indices (e.g., 0, 1, 2,
> > ..) -- which, according to "Selections" in the "Graphical Representations"
> > window, are referred to by "index" -- are displayed instead?
> >
> > Thank you very much for your time!
> >
> > Andrew DeYoung
> > Carnegie Mellon University
>
>
>
>
>
> --
> Best,
> /A