From: JC Gumbart (gumbart_at_ks.uiuc.edu)
Date: Thu Sep 08 2005 - 11:37:27 CDT

If I understand you correctly, my solution would be the following:

> set number_frames [molinfo top get numframes]
> set selection [atomselect top "exwithin 3 of protein"]
> for {set i 0} {$i < $number_frames} {incr i} {
       set outfile [open output$i.dat w]
> $selection frame i
> $selection update
       puts $outfile [$selection get index]
       close $outfile
> }

On Sep 8, 2005, at 3:38 AM, VISWANADHA SRIDHARA wrote:

> Hi VMD users,
>
> set number_frames [molinfo top get numframes]
> set selection [atomselect top "exwithin 3 of protein"]
> for {set i 0} {$i < $number_frames} {incr i} {
> $selection frame i
> $selection update
> set frame_index($i) [$selection get index]
> }
>
> This will give the index of the atoms around 3 angst. from protein,
> excluding protein atoms, for each frame in the loaded traj., and will
> save
> index values of those select atoms to the array frame_index().
> I was wondering how to store this array, and how to use it.
> Is it a .dat file?
> Can I get the indexes or write indexes of each trajectory(at a
> particular
> time step) into separate file....In other words, can I write indexes at
> t=1ps in seperate file, and for t=2ps and so on.
> I want to use this information somewhere else.
>
> Best Regards,
> -V.