in reply to Re: Calc distance between atoms in pdb file
in thread Calc distance between atoms in pdb file
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Calc distance between atoms in pdb file
by soonix (Chancellor) on Nov 14, 2016 at 11:17 UTC | |
by Anonymous Monk on Nov 14, 2016 at 15:57 UTC |