From: Chitrak Gupta (chgupta_at_mix.wvu.edu)
Date: Mon Oct 19 2015 - 16:36:15 CDT

Hi Daniela,

I believe something like this would work.

set wat [atomselect top "water and same residue as within $dist of resid
$res"]
for {set i 0} {$i < $numframes} {incr i 1} {
          animate goto $i
          $wat frame $i
          $wat update
          puts [expr [$wat num]/3]
}

Best,
Chitrak.

On Mon, Oct 19, 2015 at 4:05 PM, Daniela Rivas <dani.rivas.r_at_gmail.com>
wrote:

> Hi,
>
> I have a trajectory file and I would like to plot the number of water
> molecules within a distance from a residue in time. I've been trying to
> figure out how to do it but I couldn't find anything.
>
> I hope you can help me.
>
> Thanks,
> Daniela.
>