Coefficients for the various forms of Karplus equation come from Graf J, Nguyen PH, Stock G, Schwalbe H. (2007), with a correction for 3J(HN,C'). DFT1 and DFT2 variations come from Best RB, Buchete NV, Hummer G. (2008). These, in turn, come from Hu & Bax (1997), and Case, Scheurer, Brüschweiler (2000). See the source code at the end of this page for the actual equations used.
On the technical front proceed as follows:
#
#
# d
total 2335384
-r--r--r-- 1 glykos glykos 2391410376 Jul 19 16:25 my.dcd
-r--r--r-- 1 glykos glykos 17061 Jul 19 16:25 my.psf
#
#
# phi_psi_indeces < my.psf
Found 21 N-CA-C atoms ...
Will change order of atoms for residue 7
1 5 11 13 # psi for residue 1
11 13 15 21 # phi for residue 2
13 15 21 23 # psi for residue 2
21 23 25 31 # phi for residue 3
23 25 31 33 # psi for residue 3
31 33 35 41 # phi for residue 4
33 35 41 43 # psi for residue 4
41 43 45 51 # phi for residue 5
43 45 51 53 # psi for residue 5
51 53 55 61 # phi for residue 6
53 55 61 66 # psi for residue 6
61 66 68 63 # phi for residue 7
#
# cat > TORS
1 5 11 13 # psi for residue 1
11 13 15 21 # phi for residue 2
13 15 21 23 # psi for residue 2
21 23 25 31 # phi for residue 3
23 25 31 33 # psi for residue 3
31 33 35 41 # phi for residue 4
33 35 41 43 # psi for residue 4
41 43 45 51 # phi for residue 5
43 45 51 53 # psi for residue 5
51 53 55 61 # phi for residue 6
53 55 61 66 # psi for residue 6
61 66 68 63 # phi for residue 7
<CTRL-D>
#
#
# carma -v -atmid ALLID -tors TORS my.dcd my.psf
carma v.1.1____________________________________________________________________
73 atoms are declared in the PSF file.
It appears that this DCD file contains unit cell information.
Number of coordinate sets is 2501475
Starting timestep is 0
Timesteps between sets is 1
Titles :
Created by DCD plugin
REMARKS Created 12 February, 2011 at 16:26
Number of atoms in sets is 73
Read 12 tetraplets for torsion calculation.
Now processing frame 2501475
End of DCD reached. All done.
#
#
# d
total 2649540
-rw-r--r-- 1 glykos glykos 624 Jul 19 16:35 TORS
-rw-r--r-- 1 glykos glykos 321690276 Jul 19 16:36 carma.torsions
-r--r--r-- 1 glykos glykos 2391410376 Jul 19 16:25 my.dcd
-r--r--r-- 1 glykos glykos 17061 Jul 19 16:25 my.psf
#
#
# head carma.torsions
1 +119.1116 -154.1341 +169.6075 -156.5038 +157.8043 -148.7075 +160.3349 -163.0390 +150.4241 -158.0055 +151.2057 -127.3829
2 +124.7081 -164.5483 +173.3533 -153.6879 +158.6949 -136.3921 +179.3952 -147.6533 +155.4385 -150.3319 +136.0079 -128.1866
3 +123.2161 -163.0068 +172.6600 -152.3675 -179.0150 -156.5759 +178.1448 -149.4263 +157.2094 -153.1906 +163.2408 -149.4959
4 +121.3624 -131.8181 +163.1223 -151.3879 +178.8408 -153.5329 +174.0991 -153.3173 +147.1957 -147.5510 +171.6891 -151.6907
5 +170.5063 -159.6939 +162.9019 -144.1320 +172.4928 -174.2097 +153.6709 -146.6808 +151.7860 -169.9518 +146.4125 -130.3844
6 -178.9177 -137.4126 +175.3696 -167.0806 +170.9296 -165.3637 +156.4793 -142.1590 +135.5357 -157.0344 +169.0290 -142.6736
7 +178.0601 -157.5724 +165.5002 -161.5268 +159.9444 -150.7171 +152.1292 -140.1879 +141.9118 -165.7136 +170.0406 -151.4045
8 +177.1025 -104.5721 +153.9745 -153.8755 +161.7823 -162.8928 -178.2787 -170.5023 +146.8703 -168.1461 +167.5059 -137.1666
9 -167.6573 -138.4096 +179.0231 -164.8643 +151.3583 -163.1499 +163.1734 -146.7291 +164.1811 -161.1500 -178.7138 -164.8451
10 +165.8037 -147.2730 +134.5039 -147.0755 +151.9653 -153.4375 +149.0240 -93.9799 +152.5918 -156.1689 +155.8886 -170.5973
#
#
#
#
# calc_Jcouplings carma.torsions
Now processing line 2501475
Residue 2
-----------
3J(HN,HA) 6.511 ( 2.171)
3J(HN,HA) 6.325 ( 2.836) DFT1
3J(HN,HA) 6.676 ( 2.605) DFT2
3J(HN,C') 1.312 ( 0.938)
3J(HN,C') 1.404 ( 1.249) DFT1
3J(HN,C') 1.226 ( 1.284) DFT2
3J(HA,C') 2.173 ( 1.499)
3J(HA,C') 2.019 ( 1.545) DFT1
3J(HA,C') 2.213 ( 1.611) DFT2
3J(C',C') 1.001 ( 0.790)
3J(C',C') 0.969 ( 1.195) DFT1
3J(C',C') 1.046 ( 1.161) DFT2
3J(HN,CB) 1.568 ( 0.918)
3J(HN,CB) 2.838 ( 2.056) DFT1
3J(HN,CB) 2.245 ( 1.675) DFT2
1J(N,CA) 10.850 ( 0.948)
2J(N,AA) 8.585 ( 0.317)
3J(HN,CA) 0.598 ( 0.211)
Residue 3
-----------
3J(HN,HA) 6.563 ( 2.201)
3J(HN,HA) 6.387 ( 2.872) DFT1
3J(HN,HA) 6.798 ( 2.655) DFT2
3J(HN,C') 1.213 ( 0.915)
3J(HN,C') 1.270 ( 1.210) DFT1
3J(HN,C') 1.089 ( 1.228) DFT2
3J(HA,C') 2.147 ( 1.439)
3J(HA,C') 2.001 ( 1.496) DFT1
3J(HA,C') 2.202 ( 1.564) DFT2
3J(C',C') 0.946 ( 0.741)
3J(C',C') 0.880 ( 1.119) DFT1
3J(C',C') 0.953 ( 1.089) DFT2
3J(HN,CB) 1.614 ( 0.892)
3J(HN,CB) 2.961 ( 1.981) DFT1
3J(HN,CB) 2.336 ( 1.621) DFT2
1J(N,CA) 10.687 ( 0.910)
2J(N,AA) 7.628 ( 1.228)
3J(HN,CA) 0.528 ( 0.222)
Residue 4
-----------
3J(HN,HA) 6.771 ( 2.114)
3J(HN,HA) 6.675 ( 2.759) DFT1
3J(HN,HA) 6.996 ( 2.566) DFT2
3J(HN,C') 1.206 ( 0.941)
3J(HN,C') 1.271 ( 1.254) DFT1
3J(HN,C') 1.145 ( 1.290) DFT2
3J(HA,C') 2.344 ( 1.622)
3J(HA,C') 2.212 ( 1.641) DFT1
3J(HA,C') 2.422 ( 1.705) DFT2
3J(C',C') 0.994 ( 0.772)
3J(C',C') 0.949 ( 1.171) DFT1
3J(C',C') 1.019 ( 1.140) DFT2
3J(HN,CB) 1.533 ( 0.897)
3J(HN,CB) 2.738 ( 1.998) DFT1
3J(HN,CB) 2.158 ( 1.626) DFT2
1J(N,CA) 10.650 ( 0.906)
2J(N,AA) 7.370 ( 1.275)
3J(HN,CA) 0.504 ( 0.221)
Residue 5
-----------
3J(HN,HA) 6.947 ( 2.145)
3J(HN,HA) 6.883 ( 2.793) DFT1
3J(HN,HA) 7.283 ( 2.627) DFT2
3J(HN,C') 1.092 ( 0.943)
3J(HN,C') 1.128 ( 1.251) DFT1
3J(HN,C') 0.990 ( 1.261) DFT2
3J(HA,C') 2.229 ( 1.378)
3J(HA,C') 2.125 ( 1.428) DFT1
3J(HA,C') 2.345 ( 1.494) DFT2
3J(C',C') 0.981 ( 0.741)
3J(C',C') 0.920 ( 1.125) DFT1
3J(C',C') 0.979 ( 1.099) DFT2
3J(HN,CB) 1.530 ( 0.875)
3J(HN,CB) 2.797 ( 1.934) DFT1
3J(HN,CB) 2.187 ( 1.580) DFT2
1J(N,CA) 10.618 ( 0.867)
2J(N,AA) 7.252 ( 1.291)
3J(HN,CA) 0.499 ( 0.217)
Residue 6
-----------
3J(HN,HA) 7.282 ( 2.118)
3J(HN,HA) 7.335 ( 2.750) DFT1
3J(HN,HA) 7.563 ( 2.636) DFT2
3J(HN,C') 1.191 ( 1.008)
3J(HN,C') 1.282 ( 1.345) DFT1
3J(HN,C') 1.217 ( 1.353) DFT2
3J(HA,C') 2.444 ( 1.520)
3J(HA,C') 2.370 ( 1.534) DFT1
3J(HA,C') 2.595 ( 1.598) DFT2
3J(C',C') 1.139 ( 0.802)
3J(C',C') 1.157 ( 1.222) DFT1
3J(C',C') 1.215 ( 1.191) DFT2
3J(HN,CB) 1.319 ( 0.892)
3J(HN,CB) 2.300 ( 1.964) DFT1
3J(HN,CB) 1.786 ( 1.597) DFT2
1J(N,CA) 10.900 ( 0.885)
2J(N,AA) 7.131 ( 1.314)
3J(HN,CA) 0.513 ( 0.217)
Residue 7
-----------
3J(HN,HA) 8.142 ( 1.621)
3J(HN,HA) 8.396 ( 2.112) DFT1
3J(HN,HA) 8.942 ( 1.953) DFT2
3J(HN,C') 0.566 ( 0.764)
3J(HN,C') 0.480 ( 1.043) DFT1
3J(HN,C') 0.421 ( 1.036) DFT2
3J(HA,C') 2.221 ( 0.477)
3J(HA,C') 2.268 ( 0.650) DFT1
3J(HA,C') 2.549 ( 0.712) DFT2
3J(C',C') 0.994 ( 0.628)
3J(C',C') 0.886 ( 0.968) DFT1
3J(C',C') 0.899 ( 0.963) DFT2
3J(HN,CB) 1.365 ( 0.758)
3J(HN,CB) 2.610 ( 1.627) DFT1
3J(HN,CB) 1.962 ( 1.335) DFT2
1J(N,CA) 0.000 ( 0.000)
2J(N,AA) 7.536 ( 1.330)
3J(HN,CA) 0.590 ( 0.187)
#
#
#
and copy-paste the results to a file.
The programs (other than the latest β version of carma) that you need to make this happen live in /usr/local/bin. Their source code is :
phi_psi_indeces , a perl script to generate a list of atom indeces for φ, ψ angles suitable for carma
#!/usr/bin/perl -w
while ( $line = <STDIN> )
{
if ( $line =~ /(\d+) !NATOM/ )
{
$nofatm = $1;
last;
}
}
$tot = 0;
for ( $i = 0 ; $i < $nofatm ; $i++ )
{
$line = <STDIN>;
if ( $line =~ /(\d+)\s+\w+\s+(\d+)\s+\w+\s+(\w+)/ )
{
if ( $3 eq "N" || $3 eq "C" || $3 eq "CA" )
{
$at[ $tot ] = $1 . " " . $2 . " " . $3;
$tot++;
}
}
else
{
print "Unexpected line in PSF. Giving up ...\n";
print "$line\n";
exit;
}
}
print "Found $tot N-CA-C atoms ...\n";
if ( $tot % 3 != 0 )
{
print "... which is a strange number to find. Abort.\n";
exit;
}
for ( $i=0 ; $i < $tot ; $i += 3 )
{
if ( $at[ $i ] =~ /(\d+) (\d+) (\w+)/ )
{
$at1_num = $1;
$at1_res = $2;
$at1_nam = $3;
}
else
{
print "Something is wrong. Get help.\n";
exit;
}
if ( $at[ $i+1 ] =~ /(\d+) (\d+) (\w+)/ )
{
$at2_num = $1;
$at2_res = $2;
$at2_nam = $3;
}
else
{
print "Something is wrong. Get help.\n";
exit;
}
if ( $at[ $i+2 ] =~ /(\d+) (\d+) (\w+)/ )
{
$at3_num = $1;
$at3_res = $2;
$at3_nam = $3;
}
else
{
print "Something is wrong. Get help.\n";
exit;
}
if ( $at2_res ne $at1_res || $at2_res ne $at3_res || $at3_res ne $at1_res )
{
print "Panic. Get help.\n";
exit;
}
if ( $at1_nam ne "N" || $at2_nam ne "CA" || $at3_nam ne "C" )
{
print "Will change order of atoms for residue $at2_res\n";
if ( $at1_nam eq "N" )
{
$is_N = 0;
}
if ( $at1_nam eq "CA" )
{
$is_CA = 0;
}
if ( $at1_nam eq "C" )
{
$is_C = 0;
}
if ( $at2_nam eq "N" )
{
$is_N = 1;
}
if ( $at2_nam eq "CA" )
{
$is_CA = 1;
}
if ( $at2_nam eq "C" )
{
$is_C = 1;
}
if ( $at3_nam eq "N" )
{
$is_N = 2;
}
if ( $at3_nam eq "CA" )
{
$is_CA = 2;
}
if ( $at3_nam eq "C" )
{
$is_C = 2;
}
$N_line = $at[ $i + $is_N ];
$C_line = $at[ $i + $is_C ];
$CA_line = $at[ $i + $is_CA ];
$at[ $i ] = $N_line;
$at[ $i+1 ] = $CA_line;
$at[ $i+2 ] = $C_line;
}
}
for ( $i=0 ; $i <= ($tot / 3 - 2) ; $i++ )
{
$index1 = $i * 3;
$index2 = $i * 3 + 2;
if ( $at[ $index1 ] =~ /(\d+) (\d+) (\w+)/ )
{
$at1_num = $1;
$at1_res = $2;
$at1_nam = $3;
}
else
{
print "Something is wrong. Get help.\n";
exit;
}
if ( $at[ $index1+1 ] =~ /(\d+) (\d+) (\w+)/ )
{
$at2_num = $1;
$at2_res = $2;
$at2_nam = $3;
}
else
{
print "Something is wrong. Get help.\n";
exit;
}
if ( $at[ $index1+2 ] =~ /(\d+) (\d+) (\w+)/ )
{
$at3_num = $1;
$at3_res = $2;
$at3_nam = $3;
}
else
{
print "Something is wrong. Get help.\n";
exit;
}
if ( $at[ $index1+3 ] =~ /(\d+) (\d+) (\w+)/ )
{
$at4_num = $1;
$at4_res = $2;
$at4_nam = $3;
}
else
{
print "Something is wrong. Get help.\n";
exit;
}
printf "%6d %6d %6d %6d # psi for residue %4d\n", $at1_num, $at2_num, $at3_num, $at4_num, $at3_res;
if ( $at[ $index2 ] =~ /(\d+) (\d+) (\w+)/ )
{
$at1_num = $1;
$at1_res = $2;
$at1_nam = $3;
}
else
{
print "Something is wrong. Get help.\n";
exit;
}
if ( $at[ $index2+1 ] =~ /(\d+) (\d+) (\w+)/ )
{
$at2_num = $1;
$at2_res = $2;
$at2_nam = $3;
}
else
{
print "Something is wrong. Get help.\n";
exit;
}
if ( $at[ $index2+2 ] =~ /(\d+) (\d+) (\w+)/ )
{
$at3_num = $1;
$at3_res = $2;
$at3_nam = $3;
}
else
{
print "Something is wrong. Get help.\n";
exit;
}
if ( $at[ $index2+3 ] =~ /(\d+) (\d+) (\w+)/ )
{
$at4_num = $1;
$at4_res = $2;
$at4_nam = $3;
}
else
{
print "Something is wrong. Get help.\n";
exit;
}
printf "%6d %6d %6d %6d # phi for residue %4d\n", $at1_num, $at2_num, $at3_num, $at4_num, $at4_res;
}
calc_Jcouplings , a perl script to read a list of φ, ψ angles and calculate J-couplings
#!/usr/bin/perl -w
use constant PI => 3.1415926535897932384626433832795029;
(@ARGV == 1) or die "Usage: calc_couplings.pl <file with torsions from carma>\n";
open ( IN, $ARGV[0] ) or die "Can not open $ARGV[0]\n";
# How many angles are there ?
$line = <IN>;
@tors = split( ' ', $line );
$length = @tors;
seek( IN, 0, 0 );
# Initialize global matrices ...
$res = [];
for ( $resid=0 ; $resid <= ($length-1)/2+1 ; $resid++ )
{
for ( $coupl=0 ; $coupl < 18 ; $coupl++ )
{
$$res[ $resid ][ $coupl ] = 0.0;
}
}
$std = [];
for ( $resid=0 ; $resid <= ($length-1)/2+1 ; $resid++ )
{
for ( $coupl=0 ; $coupl < 18 ; $coupl++ )
{
$$std[ $resid ][ $coupl ] = 0.0;
}
}
print "Now processing line ";
$tot = 0;
while ( $line = <IN> )
{
$tot++;
@tors = split( ' ', $line );
# Start from phi of second residue
for ( $i = 2 ; $i < $length-1 ; $i += 2 )
{
$phi = PI * $tors[ $i ] / 180.0;
$psi = PI * $tors[ $i+1 ] / 180.0;
$psi_1 = PI * $tors[ $i-1 ] / 180.0;
$resid = $i / 2 + 1;
calc( $phi, $psi, $psi_1, $resid );
}
# C-terminal residue
$phi = PI * $tors[ $i ] / 180.0;
$psi = -100.0;
$psi_1 = PI * $tors[ $i-1 ] / 180.0;
$resid = $i / 2 + 1;
calc( $phi, $psi, $psi_1, $resid );
printf("HHHHHHHH%8d", $tot ); # These H's are backspaces ...
}
print "\n\n";
for ( $i=2 ; $i <= $resid ; $i++ )
{
print "Residue $i\n";
print "-----------\n";
printf "3J(HN,HA) %6.3f (%6.3f)\n", $$res[ $i ][ 0 ] / $tot, sqrt( $$std[$i][0]/$tot );
printf "3J(HN,HA) %6.3f (%6.3f) DFT1\n", $$res[ $i ][ 1 ] / $tot, sqrt( $$std[$i][1]/$tot );
printf "3J(HN,HA) %6.3f (%6.3f) DFT2\n", $$res[ $i ][ 2 ] / $tot, sqrt( $$std[$i][2]/$tot );
printf "3J(HN,C') %6.3f (%6.3f)\n", $$res[ $i ][ 3 ] / $tot, sqrt( $$std[$i][3]/$tot );
printf "3J(HN,C') %6.3f (%6.3f) DFT1\n", $$res[ $i ][ 4 ] / $tot, sqrt( $$std[$i][4]/$tot );
printf "3J(HN,C') %6.3f (%6.3f) DFT2\n", $$res[ $i ][ 5 ] / $tot, sqrt( $$std[$i][5]/$tot );
printf "3J(HA,C') %6.3f (%6.3f)\n", $$res[ $i ][ 6 ] / $tot, sqrt( $$std[$i][6]/$tot );
printf "3J(HA,C') %6.3f (%6.3f) DFT1\n", $$res[ $i ][ 7 ] / $tot, sqrt( $$std[$i][7]/$tot );
printf "3J(HA,C') %6.3f (%6.3f) DFT2\n", $$res[ $i ][ 8 ] / $tot, sqrt( $$std[$i][8]/$tot );
printf "3J(C',C') %6.3f (%6.3f)\n", $$res[ $i ][ 9 ] / $tot, sqrt( $$std[$i][9]/$tot );
printf "3J(C',C') %6.3f (%6.3f) DFT1\n", $$res[ $i ][ 10 ] / $tot, sqrt( $$std[$i][10]/$tot );
printf "3J(C',C') %6.3f (%6.3f) DFT2\n", $$res[ $i ][ 11 ] / $tot, sqrt( $$std[$i][11]/$tot );
printf "3J(HN,CB) %6.3f (%6.3f)\n", $$res[ $i ][ 12 ] / $tot, sqrt( $$std[$i][12]/$tot );
printf "3J(HN,CB) %6.3f (%6.3f) DFT1\n", $$res[ $i ][ 13 ] / $tot, sqrt( $$std[$i][13]/$tot );
printf "3J(HN,CB) %6.3f (%6.3f) DFT2\n", $$res[ $i ][ 14 ] / $tot, sqrt( $$std[$i][14]/$tot );
printf "1J(N,CA) %6.3f (%6.3f)\n", $$res[ $i ][ 15 ] / $tot, sqrt( $$std[$i][15]/$tot );
printf "2J(N,CA) %6.3f (%6.3f)\n", $$res[ $i ][ 16 ] / $tot, sqrt( $$std[$i][16]/$tot );
printf "3J(HN,CA) %6.3f (%6.3f)\n", $$res[ $i ][ 17 ] / $tot, sqrt( $$std[$i][17]/$tot );
print "\n\n";
}
exit;
########
#
#
# The actual calculation
#
#
########
sub calc
{
my $phi = $_[0];
my $psi = $_[1];
my $psi_1 = $_[2];
my $resid = $_[3];
# HNHA from Graf's S2 table
$new_value = 7.09 * cos( $phi - PI / 3.00 ) * cos( $phi - PI / 3.00 )
- 1.42 * cos( $phi - PI / 3.00 )
+ 1.55;
$mean = $$res[ $resid ][ 0 ] / $tot;
$delta = $new_value - $mean;
$mean = $mean + $delta / $tot;
$$res[ $resid ][ 0 ] += $new_value;
$$std[ $resid ][ 0 ] += $delta * ( $new_value - $mean );
# HNHA from Best's DFT1
$new_value = 9.44 * cos( $phi - PI / 3.00 ) * cos( $phi - PI / 3.00 )
- 1.53 * cos( $phi - PI / 3.00 )
- 0.07;
$mean = $$res[ $resid ][ 1 ] / $tot;
$delta = $new_value - $mean;
$mean = $mean + $delta / $tot;
$$res[ $resid ][ 1 ] += $new_value;
$$std[ $resid ][ 1 ] += $delta * ( $new_value - $mean );
# HNHA from Best's DFT2
$new_value = 9.14 * cos( $phi - PI * 64.51 / 180.0 ) * cos( $phi - PI * 64.51 / 180.0 )
- 2.28 * cos( $phi - PI * 64.51 / 180.0 )
- 0.29;
$mean = $$res[ $resid ][ 2 ] / $tot;
$delta = $new_value - $mean;
$mean = $mean + $delta / $tot;
$$res[ $resid ][ 2 ] += $new_value;
$$std[ $resid ][ 2 ] += $delta * ( $new_value - $mean );
# HNC' from Graf's S2 table ( CORRECTED )
$new_value = 4.29 * cos( $phi + PI ) * cos( $phi + PI )
- 1.01 * cos( $phi + PI );
$mean = $$res[ $resid ][ 3 ] / $tot;
$delta = $new_value - $mean;
$mean = $mean + $delta / $tot;
$$res[ $resid ][ 3 ] += $new_value;
$$std[ $resid ][ 3 ] += $delta * ( $new_value - $mean );
# HNC' from Best's DFT1
$new_value = 5.58 * cos( $phi + PI ) * cos( $phi + PI )
- 1.06 * cos( $phi + PI )
- 0.30;
$mean = $$res[ $resid ][ 4 ] / $tot;
$delta = $new_value - $mean;
$mean = $mean + $delta / $tot;
$$res[ $resid ][ 4 ] += $new_value;
$$std[ $resid ][ 4 ] += $delta * ( $new_value - $mean );
# HNC' from Best's DFT2
$new_value = 5.34 * cos( $phi + PI * 172.49 / 180.0) * cos( $phi + PI * 172.49 / 180.0)
- 1.46 * cos( $phi + PI * 172.49 / 180.0)
- 0.29;
$mean = $$res[ $resid ][ 5 ] / $tot;
$delta = $new_value - $mean;
$mean = $mean + $delta / $tot;
$$res[ $resid ][ 5 ] += $new_value;
$$std[ $resid ][ 5 ] += $delta * ( $new_value - $mean );
# HAC' from Graf's S2 table
$new_value = 3.72 * cos( $phi + 2.0 * PI / 3.0 ) * cos( $phi + 2.0 * PI / 3.0 )
- 2.18 * cos( $phi + 2.0 * PI / 3.0 )
+ 1.28;
$mean = $$res[ $resid ][ 6 ] / $tot;
$delta = $new_value - $mean;
$mean = $mean + $delta / $tot;
$$res[ $resid ][ 6 ] += $new_value;
$$std[ $resid ][ 6 ] += $delta * ( $new_value - $mean );
# HAC' from Best's DFT1
$new_value = 4.38 * cos( $phi + 2.0 * PI / 3.0 ) * cos( $phi + 2.0 * PI / 3.0 )
- 1.87 * cos( $phi + 2.0 * PI / 3.0 )
+ 0.56;
$mean = $$res[ $resid ][ 7 ] / $tot;
$delta = $new_value - $mean;
$mean = $mean + $delta / $tot;
$$res[ $resid ][ 7 ] += $new_value;
$$std[ $resid ][ 7 ] += $delta * ( $new_value - $mean );
# HAC' from Best's DFT2
$new_value = 4.77 * cos( $phi + PI * 118.61 / 180.0 ) * cos( $phi + PI * 118.61 / 180.0 )
- 1.85 * cos( $phi + PI * 118.61 / 180.0 )
+ 0.49;
$mean = $$res[ $resid ][ 8 ] / $tot;
$delta = $new_value - $mean;
$mean = $mean + $delta / $tot;
$$res[ $resid ][ 8 ] += $new_value;
$$std[ $resid ][ 8 ] += $delta * ( $new_value - $mean );
# C'C' from Graf's S2 table
$new_value = 1.36 * cos( $phi ) * cos( $phi )
- 0.93 * cos( $phi )
+ 0.60;
$mean = $$res[ $resid ][ 9 ] / $tot;
$delta = $new_value - $mean;
$mean = $mean + $delta / $tot;
$$res[ $resid ][ 9 ] += $new_value;
$$std[ $resid ][ 9 ] += $delta * ( $new_value - $mean );
# C'C' from Best's DFT1
$new_value = 2.39 * cos( $phi ) * cos( $phi )
- 1.25 * cos( $phi )
+ 0.26;
$mean = $$res[ $resid ][ 10 ] / $tot;
$delta = $new_value - $mean;
$mean = $mean + $delta / $tot;
$$res[ $resid ][ 10 ] += $new_value;
$$std[ $resid ][ 10 ] += $delta * ( $new_value - $mean );
# C'C' from Best's DFT2
$new_value = 2.71 * cos( $phi - PI * 2.56 / 180.0 ) * cos( $phi - PI * 2.56 / 180.0 )
- 0.91 * cos( $phi - PI * 2.56 / 180.0 )
+ 0.21;
$mean = $$res[ $resid ][ 11 ] / $tot;
$delta = $new_value - $mean;
$mean = $mean + $delta / $tot;
$$res[ $resid ][ 11 ] += $new_value;
$$std[ $resid ][ 11 ] += $delta * ( $new_value - $mean );
# HNCB from Graf's S2 table
$new_value = 3.06 * cos( $phi + PI / 3.00 ) * cos( $phi + PI / 3.00 )
- 0.74 * cos( $phi + PI / 3.00 )
+ 0.13;
$mean = $$res[ $resid ][ 12 ] / $tot;
$delta = $new_value - $mean;
$mean = $mean + $delta / $tot;
$$res[ $resid ][ 12 ] += $new_value;
$$std[ $resid ][ 12 ] += $delta * ( $new_value - $mean );
# HNCB from Best's DFT1
$new_value = 5.15 * cos( $phi + PI / 3.00 ) * cos( $phi + PI / 3.00 )
+ 0.01 * cos( $phi + PI / 3.00 )
- 0.32;
$mean = $$res[ $resid ][ 13 ] / $tot;
$delta = $new_value - $mean;
$mean = $mean + $delta / $tot;
$$res[ $resid ][ 13 ] += $new_value;
$$std[ $resid ][ 13 ] += $delta * ( $new_value - $mean );
# HNCB from Best's DFT2
$new_value = 4.58 * cos( $phi + PI * 58.18 / 180.0 ) * cos( $phi + PI * 58.18 / 180.0)
- 0.36 * cos( $phi + PI * 58.18 / 180.0)
- 0.31;
$mean = $$res[ $resid ][ 14 ] / $tot;
$delta = $new_value - $mean;
$mean = $mean + $delta / $tot;
$$res[ $resid ][ 14 ] += $new_value;
$$std[ $resid ][ 14 ] += $delta * ( $new_value - $mean );
if ( $psi > -90.0 )
{
# 1J(N,CA) from Graf's S2 table
$new_value = 1.70 * cos( $psi ) * cos( $psi )
- 0.98 * cos( $psi )
+ 9.51;
$mean = $$res[ $resid ][ 15 ] / $tot;
$delta = $new_value - $mean;
$mean = $mean + $delta / $tot;
$$res[ $resid ][ 15 ] += $new_value;
$$std[ $resid ][ 15 ] += $delta * ( $new_value - $mean );
}
# 2J(N,CA) from Graf's S2 table
$new_value = - 0.66 * cos( $psi_1 ) * cos( $psi_1 )
- 1.52 * cos( $psi_1 )
+ 7.85;
$mean = $$res[ $resid ][ 16 ] / $tot;
$delta = $new_value - $mean;
$mean = $mean + $delta / $tot;
$$res[ $resid ][ 16 ] += $new_value;
$$std[ $resid ][ 16 ] += $delta * ( $new_value - $mean );
# HNCA from Graf's S2 table
$new_value = - 0.23 * cos( $phi )
- 0.20 * cos( $psi_1 )
+ 0.07 * sin( $phi )
+ 0.08 * sin( $psi_1 )
+ 0.07 * cos( $phi ) * cos( $psi_1 )
+ 0.12 * cos( $phi ) * sin( $psi_1 )
- 0.08 * sin( $phi ) * cos( $psi_1 )
- 0.14 * sin( $phi ) * sin( $psi_1 )
+ 0.54;
$mean = $$res[ $resid ][ 17 ] / $tot;
$delta = $new_value - $mean;
$mean = $mean + $delta / $tot;
$$res[ $resid ][ 17 ] += $new_value;
$$std[ $resid ][ 17 ] += $delta * ( $new_value - $mean );
}