> my exiting code:
Really....
http://www.daniweb.com/forums/post702120-2.html
Try to reply to existing threads which cover basically the same topic as before.
In your loop, having worked out the distance between
6.324 32.707 50.379
5.197 32.618 46.826
ie, lines 1 and 2
Would you then need to work out the distance between
5.197 32.618 46.826
4.020 36.132 46.259
ie, lines 2 and 3
Something like
my @old;
open (IN, "filename.pdb") or die "$!";
while (my $line = <IN>) {
chomp($line);
my @array = (split(/\s+/,$line))[6,7,8];
print "@array\n";
if ( $. > 1 ) {
# now work out distance between @old and @array
}
@old = @array;
}
close (IN);
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953