From: Subramanian Vaitheeswaran (vaithee_at_umd.edu)
Date: Wed Nov 05 2008 - 14:29:24 CST

Hi all,

I want to rename the atoms in a pdb file as C1, C2, C3 etc. I use the following script:
*******************************
# sets unique atom names
mol load pdb tmp.pdb
set var [atomselect top all]
set at [$var get serial]
for {set i 0} {$i < $at} {incr i} {
  $var set name C$i
}
$var writepdb rename.pdb
exit
*******************************
But, this renames all atoms as C1. How can I increment the index i for each line in the pdb file? I'd appreciate any help in fixing this seemingly simple problem.

thanks,
Vaithee
============================================
S. Vaitheeswaran
Post-doctoral Research Associate
Institute for Physical Science & Technology
Rm 2116, Bldg. 85
University of Maryland
College Park MD 20742
email: vaithee_at_umd.edu
Phone: 301-405-7568
============================================