From: KIRTANA S (skirtana4_at_gmail.com)
Date: Wed Jul 06 2011 - 17:04:29 CDT

All,

I am using the following script , the loop does not move to the next vakue
of i (which is my residue number ). It takes i value at 1 throughout the
run.Please suggest where I am going wrong

set nf [molinfo top get numframes]
for {set x 0} {$x < $nf} {incr x} {
set j 2
for {set i 1} {$i < 4} {incr i} {
set sel1 [atomselect top "resid $i"]
while {$j <= 3 } {
$sel1 frame $x
$sel1 update
set sel2 [atomselect top "resid $j"]
$sel2 frame $x
$sel2 update
set com1 [measure center $sel1 weight mass]
set com2 [measure center $sel2 weight mass]
set comdist [vecdist $com1 $com2]
puts "COM distance for frame $x between $i $j $comdist"
incr j $i
}
}
}