From: amit dong (amitdong_at_gmail.com)
Date: Fri Apr 13 2007 - 15:53:24 CDT

Hi,
I need to calculate contacts for all the residues for a full trajectory. I
can calculate it for a single frame, but I a not able to extend it to whole
trajectory. Can anyone shed some light on this. I will be grateful.
Thanks
Amit

The script for single frame:

set mol 0
set minA 1
set maxA 76
set file [ open output.dat w]

set nf [ molinfo $mol get numframes]

for {set j $minA} {$j <= $maxA} {incr j} {
 set con [atomselect $mol "alpha and (within 8 of resid $j and alpha)"]
 set a [$con get resid]
 puts $file "$j $a"
 }

close $file