foreach my $i ( 0 .. 1520) { foreach my $j ( $i + 1 .. 1520 ) { my $dist = sqrt( ($arrayx[$i] - $arrayx[$j])**2 + ($arrayy[$i] - $arrayy[$j])**2 + ($arrayz[$i] - $arrayz[$j])**2 ); ## Adding $i and $j to your output will let you know what that print "$i <> $j : $dist\n"; } } exit 0;
In reply to Re^2: Calc distance between atoms in pdb file
by Anonymous Monk
in thread Calc distance between atoms in pdb file
by stellaparallax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |