Hello,
I have a file with the data as shown below:
ATOM 2 CA ARG A 1 6.324 32.707 50.379
ATOM 13 CA THR A 2 5.197 32.618 46.826
ATOM 20 CA ASP A 3 4.020 36.132 46.259
ATOM 28 CA CYS A 4 7.131 38.210 45.919
I am a beginner in perl and i wrote a program to retrieve the last three columns and putting them in an array in order to calculate the distance
open (IN, "out.pl");
my $file = ' ';
while (<IN>) {
chomp($file);
my @array = /\d+\.\d+\s+\d+\.\d+\s+\d+\.\d+/
.....
am stuck.
for(#calculate distance){
}
}
close (IN);
I would like to know the script to match the three columns and putting them in an array and writng a for loop to calculate the distance between the four atoms given in the file.
Thank you,