From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Jun 21 2004 - 13:59:02 CDT

Han,
  There isn't a built-in method for labelling residues, but you
can do that sort of thing (and any other similar labelling) with
scripting commands. Since we didn't have a nice example of this
sort of thing, I just took a few minutes and wrote a small script
that does something along the lines of what you have in mind:

proc labelresidue { residueselection labeltext } {
  set sel [atomselect top "$residueselection and name CA"]
  set positions [$sel get {x y z}]
  set num [$sel num]
  for {set i 0} {$i < $num} {incr i} {
    draw text [lindex $positions $i] $labeltext
  }
  $sel delete
}

To use it, you'd call it like this:
  labelresidue "resid 1 to 30" "My label text"

Clearly this leaves something to be desired as far as
autmatic generation of meaningful labelbs, but that
shouldn't be difficult to add with this code as a starting point.

Enjoy,
  John Stone
  vmd_at_ks.uiuc.edu

On Mon, May 24, 2004 at 05:57:42PM +0900, Han Choe wrote:
> Dear all,
>
> VMD has menus for labeling atom, bond, angle, and dihedral but not a
> residue, as far as I know. Is there a way to do it?
>
> Cheers,
> Han Choe, PhD
> Department of Physiology
> University of Ulsan, College of Medicine
> Songpagoo Poongnapdong 388-1
> Seoul 138-736, Korea

-- 
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