VMD-L Mailing List
From: Subramanian Vaitheeswaran (vaithee_at_umd.edu)
Date: Wed Nov 05 2008 - 14:29:24 CST
- Next message: Robert Brunner: "Re: Sequentially numbering atom names in pdb file"
- Previous message: Anirban Ghosh: "CG Map Tool Syntax Error"
- Next in thread: Robert Brunner: "Re: Sequentially numbering atom names in pdb file"
- Reply: Robert Brunner: "Re: Sequentially numbering atom names in pdb file"
- Reply: Axel Kohlmeyer: "Re: Sequentially numbering atom names in pdb file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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
============================================
- Next message: Robert Brunner: "Re: Sequentially numbering atom names in pdb file"
- Previous message: Anirban Ghosh: "CG Map Tool Syntax Error"
- Next in thread: Robert Brunner: "Re: Sequentially numbering atom names in pdb file"
- Reply: Robert Brunner: "Re: Sequentially numbering atom names in pdb file"
- Reply: Axel Kohlmeyer: "Re: Sequentially numbering atom names in pdb file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]