From: Olya Kravchenko (ovkrav_at_gmail.com)
Date: Thu Aug 18 2016 - 15:37:55 CDT

I found the answer in the manual for colvars. In case somebody needs it:

to get VMD internal numbering correspond to colvars numbering one needs to type:

<selection> get serial

so in my case it would be

$sel get serial

Sorry for cluttering, hope somebody finds it useful!

Olga

On Thu, Aug 18, 2016 at 3:54 PM, 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
>