From: Joaquim Rui de Castro Rodrigues (joaquim.rodrigues_at_ipleiria.pt)
Date: Tue Jun 16 2015 - 12:56:15 CDT

Hi,

Use lsort to sort the list in increasing order; and then lindex to retrieve the first item.

HTH,
J Rui Rodrigues

________________________________________
De: owner-vmd-l_at_ks.uiuc.edu [owner-vmd-l_at_ks.uiuc.edu] Em Nome De Mehdi Bagherpour [mehdi.bpour_at_gmail.com]
Enviado: terça-feira, 16 de Junho de 2015 17:01
Para: vmd-l_at_ks.uiuc.edu
Assunto: vmd-l: minimum value of index numbers

Dear vmd users,

I want to find minimum value of index of my selected atom atoms

for {set x 0} {$x <= 334} {incr x} {
set sel1 [atomselect top "name P and within 6 of index $x"]

set sel2 [$sel1 get index]