From: Crystal Liu (sixian_at_ualberta.ca)
Date: Thu Aug 18 2016 - 17:00:29 CDT

Hi Olya,
Try using the command "serial" instead of index, in order to obtain obtain
atom numbers starting from zero.

Cheers,
Crystal

On Thursday, 18 August 2016, Olya Kravchenko <ovkrav_at_gmail.com> wrote:

> Hi all,
>
> this is probably a simple thing, but I can't figure out how to write a
> selection correctly. I would like to print out indices for all CA
> atoms in certain chains in my pdb file. Here is a selection that I
> make:
>
> set sel [atomselect top "chain A B C and name CA]
> $sel list
>
> (or $sel get index)
>
> Then when printed all indices are shifted by 1 from the number it
> supposed to be. The line in the pdb file looks like this:
>
> ATOM 5 CA THR A 1 60.252 86.999 118.788 0.00 0.00 A
> ..
> ..
> ATOM 19 CA SER A 2 62.852 89.569 117.619 0.00 0.00 A
>
> and so on, but the numbers I get printed out in the tcl shell are like
> this:
>
> 4 18 ... etc.
>
> So when I call list or index the atoms are numbered starting from 0.
>
> Is there a way to make atomselect print the actual index (in my case.
> 5, 19... and so on) ?
>
> Thanks in advance!
>
>
> Olga
>
>