From: Guo Zhi (gzgzgz_at_gmail.com)
Date: Thu Mar 15 2007 - 19:51:04 CDT

Thanks, John, it is useful. I just now solved it with a tcl procedure.

2007/3/16, John Stone <johns_at_ks.uiuc.edu>:
> Hi,
> You cannot alter the atom indices used by VMD for two reasons:
>
> 1) The indices used internally by VMD are fixed and cannot be changed, as
> they are fundamental to its internal data structures.
>
> 2) VMD completely ignores the index values in PDB files, since many
> people use variants of the PDB format which are technically illegal,
> in order to run large simulations in MD programs that use PDB as input.
> Thus, a large percentage of PDB files people use with VMD actually violate
> the strict PDB file format specification, so we've designed the VMD PDB
> reader/writer plugin to ignore the atom indices in the file entirely.
>
> For your specific case, it may be better to perform your atom index range
> remapping using a PDB text filtering tool like pdbcat:
> http://www.ks.uiuc.edu/Development/MDTools/pdbcat/
> a Perl or Python script, or some other PDB index remapping
> script/tool.
>
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Wed, Mar 14, 2007 at 11:33:57PM +0800, Guo Zhi wrote:
> > Dear all VMD users,
> > I wish to redefine the range of my atom index in a pdb file, for eg:
> [.....]
> >
> > Yes, most of the other items are fine, but the atom indice are changed
> > after saving. En...at least I want to preserve the original index (and
> > to begin with arbitrary number i would like to define will be even
> > better).
> > I tried to use the following commands in order to make the atom index
> > begin with 30
> >
> > set sel [atomselect top all]
> > set sel_index [$sel get index]
> > set my_index {}
> > foreach ele_index $sel_index {
> > lappend my_index [expr $ele_index+30]
> > }
> > $sel set index $my_index
> >
> > Then VMD tell me that it is not legal to save index...
> > "atomsel object: set: data not modifiable: index"
> > Seems that this property is only readable and not for my purpose...
> >
> > Anyone could give me some help?
> >
> > Guo Zhi
>
> --
> 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
>

-- 
Guo Zhi