
lifesaver
Novice
Dec 19, 2009, 8:58 AM
Post #4 of 4
(5068 views)
|
Re: [Vindhyaauri1] Co-ordinate distance calculation
[In reply to]
|
Can't Post
|
|
Haha!! thats a lot of money!! Actually have tried to get some part of it ... use strict; my @pdb=(); my @atoms; open(IN, "/home/subs/vindytest/PDB.pl") or die "Could not open file!"; while (my $line = <IN>) { my @array = (split (/\s+/, $line))[6, 7, 8]; print ("@array\n"); push @pdb,[@array] ; } close (IN); for my $i1 ( 0 .. $#pdb-1 ){ my ( $x1, $y1, $z1 ) = @{ $pdb[$i1] }; for my $i2 ( 1 .. $#pdb ){ my ( $x2, $y2, $z2 ) = @{ $pdb[$i2] }; my $dist = sqrt( ($x2-$x1)**2 + ($y2-$y1)**2 + ($z2-$z1)**2 ); print "distance from ( $x1, $y1, $z1 ) to ( $x2, $y2, $z2 ) is $dist\n"; } } Im completely stuck when it comes to picking all the elements in a row from file A and B ... i mean since i am picking from 6,7,8 only.. also the output should have all the details... Im new to perl and just so lost!! Any help would be really appreciated We can do it within your budget,if interested contact our programmer live or put your requirement in our messegebord @ http://www.livefreelancer.net/
|