From: Axel Kohlmeyer (
Date: Mon Jan 23 2012 - 14:13:02 CST

On Mon, Jan 23, 2012 at 1:55 PM, jeela keel <> wrote:
> Hi Axel,
> added the missing things, it should be complete now. let me know what you
> think?

you better not ask me to write down my immediate
thoughts, as they would probably get me kicked off
this mailing list for life. ;-)

this script still has obvious errors (outside of your gofr issue).

why can't you just attach the entire script that you have?
what is the big secret that you are hiding? you are just
wasting your time and won't get proper help.

on top of that, you obviously didn't pay attention to what
i wrote before about the frame numbers being 0-based
and not 1-based. if you want all frames, why don't you
just use -1 as the "automatic" last frame number?

also, is there any reason that you are not using the
gofr gui plugin? as far as i can tell, there is nothing
in your script that the plugin does not do. why reinvent
a wheel, particularly one that doesn't go round?


>            set outfile [open gdr.dat w]
>             set  $number_frame  [molinfo top get numframes]

>          set sel1 [atomselect top "resname X"]
>         #set sel2 [atomselect top "resname SOL "]
>         set sel2 [atomselect top "resname SOL and pbwithin 4.00 of resname X
> "]
>         set gr1 [measure gofr $sel1 $sel2 delta .1 rmax 10.0 usepbc 1
> selupdate 1 first 1 last $number_frame step 1]
>         set r [lindex $gr1 0]
>         set gr2 [lindex $gr1 1]
>         set igr [lindex $gr1 2]
>         set i 0
>         foreach j $r k $gr2 l $igr {
>                puts $outfile1 "$j $k $l"
>              close $outfile
> jeela

Dr. Axel Kohlmeyer
College of Science and Technology
Temple University, Philadelphia PA, USA.