From: J. Rui Rodrigues (joaquim.rodrigues_at_estg.ipleiria.pt)
Date: Wed Apr 22 2009 - 13:52:07 CDT

Hi,

It should work and indeed it works for me:

vmd > set sel [atomselect top all]
atomselect0
vmd > set x [$sel get x]
12.557000160217285 13.237000465393066 12.70199966430664 11.204000473022461
11.133000373840332 13.10200023651123 13.505000114440918 13.784000396728516
13.553999900817871 13.701000213623047 13.12399959564209 13.390000343322754
14.135000228881836 12.986000061035156 12.812000274658203 14.23799991607666
14.350000381469727 10.718999862670898 9.791999816894531 12.61400032043457 12.88700008392334
14.199999809265137 15.277999877929688 14.515999794006348 13.720000267028809
13.409000396728516 14.256999969482422 14.23900032043457 14.019000053405762
11.902999877929688 10.61400032043457 10.887999534606934
vmd > set p [atomselect top "x = 12.70199966430664"]
atomselect1
vmd > $p num
1
vmd > $p get index
2

That's strange... Maybe you should double-check your sequence of commands?

Rui Rodrigues

On Wed, 22 Apr 2009 13:09:16 +0200, Max wrote
> Hi all,
>
> I tried to select atom indexes from their coordinates (x) but I could not.
> Am I doing anything wrong?
> Here's an example:
>
> >% set sel [atomselect 1 all]
> atomselect32
> >% set x [$sel get {x}]
> -9.0 -8.36200046539 -9.02799987793 -10.0799999237 -9.35200023651
> -10.7600002289 -10.4099998474 -12.0799999237 -11.1099996567 -13.029999733
> -12.7399997711 -10.3599996567 -11.9200000763
>
> Now I tried to select the atom index from one of its coordinates and got
> nothing.
>
> >% set p [atomselect 1 "x = -8.36200046539"]
> atomselect33
> >% $p get index
> >%
>
> Thanks
>
> Max

--
Webmail ESTG de Leiria (http://webmail.estg.ipleiria.pt)