| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Angle::Omega; |
|
2
|
1
|
|
|
1
|
|
20038
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
31
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
513
|
|
|
4
|
|
|
|
|
|
|
require Exporter; |
|
5
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
|
6
|
|
|
|
|
|
|
our @EXPORT = qw(omega); |
|
7
|
|
|
|
|
|
|
=head1 NAME |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Angle::Omega -A perl module to calculate omega angles for the input Protein Data Bank (PDB) file. |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 VERSION |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Version 1.00 |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=cut |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = '1.00'; |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
use Angle::Omega; |
|
23
|
|
|
|
|
|
|
my @foo = omega("input_filename"); |
|
24
|
|
|
|
|
|
|
foreach(@foo) { print;} |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 omega |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=cut |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub omega { |
|
33
|
0
|
|
|
0
|
1
|
|
my $input=$_[0]; |
|
34
|
0
|
0
|
|
|
|
|
open(ID,"$input")or die "Could not open $input: $!"; |
|
35
|
0
|
|
|
|
|
|
my @N;my @CA;my @C; |
|
|
0
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
while() |
|
37
|
|
|
|
|
|
|
{ |
|
38
|
0
|
0
|
|
|
|
|
if($_=~/^ATOM/) |
|
39
|
|
|
|
|
|
|
{ |
|
40
|
0
|
|
|
|
|
|
my $c=substr($_,13,4);$c=~s/\s//g; |
|
|
0
|
|
|
|
|
|
|
|
41
|
0
|
0
|
|
|
|
|
if ($c eq 'N') { push(@N,$_);} |
|
|
0
|
|
|
|
|
|
|
|
42
|
0
|
0
|
|
|
|
|
if ($c eq 'CA') { push(@CA,$_);} |
|
|
0
|
|
|
|
|
|
|
|
43
|
0
|
0
|
|
|
|
|
if ($c eq 'C') { push(@C,$_);} |
|
|
0
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
} |
|
45
|
0
|
0
|
|
|
|
|
if ($_=~/^ENDMDL/) {last;} |
|
|
0
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
} |
|
47
|
0
|
|
|
|
|
|
my $k=0; |
|
48
|
0
|
|
|
|
|
|
print "###RESIDUE_NAME CHAIN OMEGA (in degrees)###\n"; |
|
49
|
0
|
|
|
|
|
|
foreach(@N) |
|
50
|
|
|
|
|
|
|
{ |
|
51
|
0
|
|
|
|
|
|
my $d4=substr($N[$k-1],17,3);$d4=~s/\s//g; |
|
|
0
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
my $ud =find_omega(substr($CA[$k-1],30,8),substr($CA[$k-1],38,8),substr($CA[$k-1],46,8),substr($C[$k-1],30,8),substr($C[$k-1],38,8),substr($C[$k-1],46,8),substr($N[$k],30,8),substr($N[$k],38,8),substr($N[$k],46,8),substr($CA[$k],30,8),substr($CA[$k],38,8),substr($CA[$k],46,8)); |
|
53
|
0
|
|
|
|
|
|
$ud=sprintf("%0.1f", $ud); |
|
54
|
0
|
0
|
|
|
|
|
if(substr($N[$k-1],21,1) ne substr($N[$k],21,1)) {$ud=360.0;} |
|
|
0
|
|
|
|
|
|
|
|
55
|
0
|
0
|
|
|
|
|
if ($k>0) {print "$d4\t".substr($N[$k-1],21,1)."\t$ud\n";} |
|
|
0
|
|
|
|
|
|
|
|
56
|
0
|
0
|
|
|
|
|
if ($k == $#N) { print substr($N[$#N],17,3)."\t".substr($N[$#N],21,1)."\t360.0\n";} |
|
|
0
|
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
$k++; |
|
58
|
|
|
|
|
|
|
} |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub find_omega |
|
61
|
|
|
|
|
|
|
{ |
|
62
|
1
|
|
|
1
|
|
1715
|
use Math::Trig; |
|
|
1
|
|
|
|
|
20177
|
|
|
|
1
|
|
|
|
|
553
|
|
|
63
|
0
|
|
|
0
|
0
|
|
my $answer=10000; |
|
64
|
0
|
|
|
|
|
|
my $x1 = $_[3]-$_[0]; |
|
65
|
0
|
|
|
|
|
|
my $y1 = $_[4]-$_[1]; |
|
66
|
0
|
|
|
|
|
|
my $z1 = $_[5]-$_[2]; |
|
67
|
0
|
|
|
|
|
|
my $x2 = $_[3]-$_[6]; |
|
68
|
0
|
|
|
|
|
|
my $y2 = $_[4]-$_[7]; |
|
69
|
0
|
|
|
|
|
|
my $z2 = $_[5]-$_[8]; |
|
70
|
0
|
|
|
|
|
|
my $x3 = $_[6]-$_[9]; |
|
71
|
0
|
|
|
|
|
|
my $y3 = $_[7]-$_[10]; |
|
72
|
0
|
|
|
|
|
|
my $z3 = $_[8]-$_[11]; |
|
73
|
|
|
|
|
|
|
|
|
74
|
0
|
|
|
|
|
|
my $axbbxc = ((($y1*$z2-$z1*$y2)*($y2*$z3-$z2*$y3))+ |
|
75
|
|
|
|
|
|
|
(($x2*$z1-$x1*$z2)*($x3*$z2-$x2*$z3))+ |
|
76
|
|
|
|
|
|
|
(($x1*$y2-$x2*$y1)*($x2*$y3-$x3*$y2))); |
|
77
|
0
|
|
|
|
|
|
my $vaxb = ((($y1*$z2-$z1*$y2)*($y1*$z2-$z1*$y2))+ |
|
78
|
|
|
|
|
|
|
(($x2*$z1-$x1*$z2)*($x2*$z1-$x1*$z2))+ |
|
79
|
|
|
|
|
|
|
(($x1*$y2-$x2*$y1)*($x1*$y2-$x2*$y1))); |
|
80
|
0
|
|
|
|
|
|
my $vbxc = ((($y2*$z3-$z2*$y3)*($y2*$z3-$z2*$y3))+ |
|
81
|
|
|
|
|
|
|
(($x3*$z2-$x2*$z3)*($x3*$z2-$x2*$z3))+ |
|
82
|
|
|
|
|
|
|
(($x2*$y3-$x3*$y2)*($x2*$y3-$x3*$y2))); |
|
83
|
0
|
|
|
|
|
|
$answer = ($axbbxc/sqrt($vaxb*$vbxc)); |
|
84
|
0
|
|
|
|
|
|
$answer = (180*(acos($answer)/3.14)); |
|
85
|
0
|
|
|
|
|
|
my $sign = (($x1*($y2*$z3-$y3*$z2))-($y1*($x2*$z3-$x3*$z2))+($z1*($x2*$y3-$x3*$y2))); |
|
86
|
0
|
0
|
|
|
|
|
if($sign>=0) |
|
87
|
|
|
|
|
|
|
{ |
|
88
|
0
|
0
|
|
|
|
|
if ($answer>0){ $answer=$answer}; |
|
|
0
|
|
|
|
|
|
|
|
89
|
0
|
0
|
|
|
|
|
if ($answer<0) {$answer=-$answer}; |
|
|
0
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
} |
|
91
|
0
|
0
|
|
|
|
|
if($sign<0) |
|
92
|
|
|
|
|
|
|
{ |
|
93
|
0
|
0
|
|
|
|
|
if ($answer>=0) {$answer=-$answer}; |
|
|
0
|
|
|
|
|
|
|
|
94
|
0
|
0
|
|
|
|
|
if ($answer<0) {$answer=$answer}; |
|
|
0
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
} |
|
96
|
0
|
0
|
|
|
|
|
if($answer>0){ |
|
|
0
|
|
|
|
|
|
|
|
97
|
0
|
|
|
|
|
|
$answer=180-$answer; |
|
98
|
0
|
|
|
|
|
|
$answer*=(-1);} |
|
99
|
|
|
|
|
|
|
else{$answer=180+$answer;} |
|
100
|
0
|
0
|
|
|
|
|
if($answer<0){$answer*=(-1);} |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
else{$answer*=(-1);} |
|
102
|
0
|
|
|
|
|
|
return($answer); |
|
103
|
|
|
|
|
|
|
} |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
} |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Omega angle is one among the dihedral angles of proteins, which controls the Calpha - Calpha distance. The Omega angle tends to be planar due to delocalization of the carbonyl pi electrons and the nitrogen lone pair. Omega is notable for the cis/trans conformations. |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 AUTHOR |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
Shankar M, C<< >> |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head1 BUGS |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
Please report any bugs or feature requests to C |
|
118
|
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
Saravanan S E and Sabarinathan Radhakrishnan, for all their valuable thoughts and care. |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
Copyright 2011 Shankar M. |
|
126
|
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=cut |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
# End of Angle::Omega |