From: jeela keel (
Date: Mon Jan 23 2012 - 12:55:54 CST

Hi Axel,

added the missing things, it should be complete now. let me know what you
           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