From: Monika Madhavi (monikamadhavi_at_gmail.com)
Date: Thu Jan 28 2016 - 23:11:57 CST

Dear all,

I want to select few atoms first (of which indices are stored in a list)
and select each atom in the list from the trajectory. I wrote this tcl code

set atomlist [read $input]
set len [llength $atomlist]

for {set i 0} {$i <= $len} {incr i} {
set ind1 [lindex $atomlist $i]

set mol [mol new mypsf.psf type psf waitfor all]
for {set frm 0} {$frm <= $n} {incr frm} {
mol addfile mydcd.dcd type dcd first $frm last $frm waitfor all molid $mol

set sel [atomselect $mol "index $ind1" frame $frm]
}
}

when the same code is written without the loop to select "ind1" the code
works fine. But when I try this it says "atomselect: cannot parse selection
text: index"

Any help to solve this problem is much appreciated.

Thank you.
Monika

-- 
W.A.Monika Madhavi
Lecturer (Probation),
Department of Physics,
University of Colombo.