~ubuntu-branches/ubuntu/wily/openms/wily

« back to all changes in this revision

Viewing changes to include/OpenMS/CHEMISTRY/AAIndex.h

  • Committer: Package Import Robot
  • Author(s): Filippo Rusconi
  • Date: 2012-11-12 15:58:12 UTC
  • Revision ID: package-import@ubuntu.com-20121112155812-vr15wtg9b50cuesg
Tags: upstream-1.9.0
ImportĀ upstreamĀ versionĀ 1.9.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- mode: C++; tab-width: 2; -*-
 
2
// vi: set ts=2:
 
3
//
 
4
// --------------------------------------------------------------------------
 
5
//                   OpenMS Mass Spectrometry Framework
 
6
// --------------------------------------------------------------------------
 
7
//  Copyright (C) 2003-2011 -- Oliver Kohlbacher, Knut Reinert
 
8
//
 
9
//  This library is free software; you can redistribute it and/or
 
10
//  modify it under the terms of the GNU Lesser General Public
 
11
//  License as published by the Free Software Foundation; either
 
12
//  version 2.1 of the License, or (at your option) any later version.
 
13
//
 
14
//  This library is distributed in the hope that it will be useful,
 
15
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
17
//  Lesser General Public License for more details.
 
18
//
 
19
//  You should have received a copy of the GNU Lesser General Public
 
20
//  License along with this library; if not, write to the Free Software
 
21
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
22
//
 
23
// --------------------------------------------------------------------------
 
24
// $Maintainer: Alexandra Scherbart $
 
25
// $Authors: $
 
26
// --------------------------------------------------------------------------
 
27
 
 
28
#ifndef OPENMS_CHEMISTRY_AAINDEX_H
 
29
#define OPENMS_CHEMISTRY_AAINDEX_H
 
30
 
 
31
#include <OpenMS/CONCEPT/Exception.h>
 
32
#include <OpenMS/CONCEPT/Constants.h>
 
33
 
 
34
#include <cmath>
 
35
 
 
36
namespace OpenMS
 
37
{
 
38
        /**
 
39
                @brief Representation of selected %AAIndex properties
 
40
 
 
41
                The literature that describe the indices can be found with:
 
42
                @n Kawashima, S., Ogata, H., and Kanehisa, M. (1999).
 
43
                @n <em>AAindex: Amino Acid Index Database</em>, 
 
44
                @n Nucleic Acids Res, 27(1), 368&ndash;369.
 
45
                                
 
46
                The provided values are:
 
47
                - GB500      Estimated gas-phase basicity at 500 K,         
 
48
                - VASM830103 Relative population of conformational state E,
 
49
                - NADH010106 Hydropathy scale (36% accessibility),
 
50
                - FAUJ880111 Positive charge,
 
51
                - WILM950102 Hydrophobicity coefficient in RP-HPLC, C8 with 0.1%TFA/MeCN/H2 O,
 
52
        - OOBM850104 Optimized average non-bonded energy per atom,
 
53
                - KHAG800101 The Kerr-constant increments,
 
54
                - NADH010107 Hydropathy scale (50% accessibility),
 
55
                - ROBB760107 Information measure for extended without H-bond,
 
56
                - FINA770101 Helix-coil equilibrium constant,
 
57
                - ARGP820102 Signal sequence helical potential.
 
58
 
 
59
                Upper-case one-letter-code can be used to access the properties of a single amino acid.
 
60
                
 
61
                @ingroup Chemistry
 
62
        */
 
63
        class OPENMS_DLLAPI AAIndex
 
64
        {
 
65
                public:
 
66
                        
 
67
                        /// Returns if the residue is aliphatic (1.0 or 0.0)
 
68
                        static DoubleReal aliphatic(char aa) 
 
69
                        {
 
70
                                if( aa == 'A' || aa == 'G' || aa == 'F' || aa == 'I' || aa == 'M' || aa == 'L' || aa == 'P' || aa == 'V' ) 
 
71
                                {
 
72
                                        return 1.0;
 
73
                                } 
 
74
                                else 
 
75
                                {
 
76
                                        return 0.0;
 
77
                                }
 
78
                        }
 
79
                
 
80
                        /// Returns if the residue is acidic (1.0 or 0.0)
 
81
                        static DoubleReal acidic(char aa) 
 
82
                        {
 
83
                                if( aa == 'D' || aa == 'E' ) 
 
84
                                {
 
85
                                        return 1.0;
 
86
                                }
 
87
                                else 
 
88
                                {
 
89
                                        return 0.0;
 
90
                                }
 
91
                        }
 
92
                        
 
93
                        /// Returns if the residue is basic (1.0 or 0.0)
 
94
                        static DoubleReal basic(char aa) 
 
95
                        {
 
96
                                if( aa == 'K' || aa == 'R' || aa == 'H' || aa == 'W' ) 
 
97
                                {
 
98
                                        return 1.0;
 
99
                                }
 
100
                                else 
 
101
                                {
 
102
                                        return 0.0;
 
103
                                }
 
104
                        }
 
105
        
 
106
                        /// Returns if the residue is polar (1.0 or 0.0)
 
107
                        static DoubleReal polar(char aa) 
 
108
                        {
 
109
                                if( aa == 'S' || aa == 'T' || aa == 'Y' || aa == 'H' || aa == 'C' || aa == 'N' || aa == 'Q' || aa == 'W' ) 
 
110
                                {
 
111
                                        return 1.0;
 
112
                                } 
 
113
                                else
 
114
                                {
 
115
                                        return 0.0;
 
116
                                }
 
117
                        }
 
118
 
 
119
                        //I    A/L     R/K     N/M     D/F     C/P     Q/S     E/T     G/W     H/Y     I/V
 
120
                        //49.1    133.    -3.6      0.      0.     20.      0.    64.6    75.7    18.9
 
121
                        //15.6      0.     6.8    54.7    43.8    44.4    31.0    70.5      0.    29.5          
 
122
                        /**
 
123
                                @brief The Kerr-constant increments (Khanarian-Moore, 1980)
 
124
                                
 
125
                                LIT:0611050b<br>
 
126
                                Khanarian, G. and Moore, W.J.<br>
 
127
                                The Kerr effect of amino acids in water<br>
 
128
                                Aust. J. Chem. 33, 1727-1741 (1980) (Cys Lys Tyr !)
 
129
                                
 
130
                                @exception InvalidValue is thrown if an undefined one-letter-code is used
 
131
                        */
 
132
                        static DoubleReal getKHAG800101(char aa) 
 
133
                        {
 
134
                                switch(aa) 
 
135
                                {
 
136
                                        case 'A':
 
137
                                                return 49.1;
 
138
                                                break;
 
139
                                        case 'R':
 
140
                                                return 133.;
 
141
                                                break;
 
142
                                        case 'N':
 
143
                                                return  -3.6;
 
144
                                                break;
 
145
                                        case 'D':
 
146
                                                return 0.;
 
147
                                                break;
 
148
                                        case 'C':
 
149
                                                return 0.;
 
150
                                                break;
 
151
                                        case 'Q':
 
152
                                                return 20.;
 
153
                                                break;
 
154
                                        case 'E':
 
155
                                                return 0.;
 
156
                                                break;
 
157
                                        case 'G':
 
158
                                                return 64.6;
 
159
                                                break;
 
160
                                        case 'H':
 
161
                                                return 75.7;
 
162
                                                break;
 
163
                                        case 'I':
 
164
                                                return  18.9;
 
165
                                                break;
 
166
                                        case 'L':
 
167
                                                return 15.6;
 
168
                                                break;
 
169
                                        case 'K':
 
170
                                                return 0.;
 
171
                                                break;
 
172
                                        case 'M':
 
173
                                                return 6.8;
 
174
                                                break;
 
175
                                        case 'F':
 
176
                                                return 54.7;
 
177
                                                break;
 
178
                                        case 'P':
 
179
                                                return 43.8;
 
180
                                                break;
 
181
                                        case 'S':
 
182
                                                return 44.4;
 
183
                                                break;
 
184
                                        case 'T':
 
185
                                                return 31.0;
 
186
                                                break;
 
187
                                        case 'W':
 
188
                                                return 70.5;
 
189
                                                break;
 
190
                                        case 'Y':
 
191
                                                return 0.;
 
192
                                                break;
 
193
                                        case 'V':
 
194
                                                return 29.5;
 
195
                                                break;
 
196
                                        default:                
 
197
                                                throw Exception::InvalidValue(__FILE__,__LINE__,__PRETTY_FUNCTION__, "Unkown amino acid one-letter-code",String(aa));
 
198
                                }
 
199
                        }
 
200
                
 
201
                        //I    A/L     R/K     N/M     D/F     C/P     Q/S     E/T     G/W     H/Y     I/V
 
202
                        //0.159   0.194   0.385   0.283   0.187   0.236   0.206   0.049   0.233   0.581
 
203
                        //0.083   0.159   0.198   0.682   0.366   0.150   0.074   0.463   0.737   0.301 
 
204
        
 
205
                        /**
 
206
                                @brief Relative population of conformational state E (Vasquez et al., 1983)
 
207
                                
 
208
                                LIT:0908110<br>
 
209
                                Vasquez, M., Nemethy, G. and Scheraga, H.A.<br>
 
210
                                Computed conformational states of the 20 naturally occurring amino acid
 
211
                                residues and of the prototype residue alpha-aminobutyric acid<br>
 
212
                                Macromolecules 16, 1043-1049 (1983) (Pro !)                             
 
213
                                
 
214
                                @exception InvalidValue is thrown if an undefined one-letter-code is used
 
215
                        */
 
216
                        static DoubleReal getVASM830103(char aa) 
 
217
                        {
 
218
                                switch(aa) 
 
219
                                {
 
220
                                        case 'A':
 
221
                                                return 0.159;
 
222
                                                break;
 
223
                                        case 'R':
 
224
                                                return 0.194;
 
225
                                                break;
 
226
                                        case 'N':
 
227
                                                return 0.385;
 
228
                                                break;
 
229
                                        case 'D':
 
230
                                                return 0.283;
 
231
                                                break;
 
232
                                        case 'C':
 
233
                                                return 0.187;
 
234
                                                break;
 
235
                                        case 'Q':
 
236
                                                return 0.236;
 
237
                                                break;
 
238
                                        case 'E':
 
239
                                                return 0.206;
 
240
                                                break;
 
241
                                        case 'G':
 
242
                                                return 0.049;
 
243
                                                break;
 
244
                                        case 'H':
 
245
                                                return 0.233;
 
246
                                                break;
 
247
                                        case 'I':
 
248
                                                return 0.581;
 
249
                                                break;
 
250
                                        case 'L':
 
251
                                                return 0.083;
 
252
                                                break;
 
253
                                        case 'K':
 
254
                                                return 0.159;
 
255
                                                break;
 
256
                                        case 'M':
 
257
                                                return 0.198;
 
258
                                                break;
 
259
                                        case 'F':
 
260
                                                return 0.682;
 
261
                                                break;
 
262
                                        case 'P':
 
263
                                                return 0.366;
 
264
                                                break;
 
265
                                        case 'S':
 
266
                                                return 0.150;
 
267
                                                break;
 
268
                                        case 'T':
 
269
                                                return 0.074;
 
270
                                                break;
 
271
                                        case 'W':
 
272
                                                return 0.463;
 
273
                                                break;
 
274
                                        case 'Y':
 
275
                                                return 0.737;
 
276
                                                break;
 
277
                                        case 'V':
 
278
                                                return 0.301;
 
279
                                                break;  
 
280
                                        default:                
 
281
                                                throw Exception::InvalidValue(__FILE__,__LINE__,__PRETTY_FUNCTION__, "Unkown amino acid one-letter-code",String(aa));
 
282
                                }
 
283
                        }
 
284
                
 
285
                        
 
286
                        //NADH010105    0.958  NADH010104    0.914  NADH010103    0.881<br>
 
287
                        //ZHOH040103    0.819  NADH010107    0.811  BAEK050101    0.809<br>
 
288
                        //NADH010102    0.808  PONP800103    0.803  VINM940103   -0.813<br>
 
289
                        //KRIW710101   -0.846  KRIW790101   -0.861
 
290
                        //I    A/L     R/K     N/M     D/F     C/P     Q/S     E/T     G/W     H/Y     I/V
 
291
                        //5     -57     -77      45     224     -67      -8     -47     -50      83
 
292
                        //82     -38      83     117    -103     -41      79     130      27     117
 
293
        
 
294
                        /**
 
295
                                @brief Hydropathy scale based on self-information values in the two-state model (36% accessibility) (Naderi-Manesh et al., 2001)
 
296
                                
 
297
                                PMID:11170200<br>
 
298
                                Naderi-Manesh, H., Sadeghi, M., Arab, S. and Moosavi Movahedi, A.A.<br>
 
299
                                Prediction of protein surface accessibility with information theory<br>
 
300
                                Proteins. 42, 452-459 (2001)
 
301
                                
 
302
                                @exception InvalidValue is thrown if an undefined one-letter-code is used
 
303
                        */
 
304
                        static DoubleReal getNADH010106(char aa) 
 
305
                        {
 
306
                                switch(aa) 
 
307
                                {
 
308
                                        case 'A':
 
309
                                                return 5;
 
310
                                                break;
 
311
                                        case 'R':
 
312
                                                return -57;
 
313
                                                break;
 
314
                                        case 'N':
 
315
                                                return -77;
 
316
                                                break;
 
317
                                        case 'D':
 
318
                                                return 45;
 
319
                                                break;
 
320
                                        case 'C':
 
321
                                                return 224;
 
322
                                                break;
 
323
                                        case 'Q':
 
324
                                                return -67;
 
325
                                                break;
 
326
                                        case 'E':
 
327
                                                return -8;
 
328
                                                break;
 
329
                                        case 'G':
 
330
                                                return -47;
 
331
                                                break;
 
332
                                        case 'H':
 
333
                                                return -50;
 
334
                                                break;
 
335
                                        case 'I':
 
336
                                                return 83;
 
337
                                                break;
 
338
                                        case 'L':
 
339
                                                return 82;
 
340
                                                break;
 
341
                                        case 'K':
 
342
                                                return -38;
 
343
                                                break;
 
344
                                        case 'M':
 
345
                                                return 83;
 
346
                                                break;
 
347
                                        case 'F':
 
348
                                                return 117;
 
349
                                                break;
 
350
                                        case 'P':
 
351
                                                return -103;
 
352
                                                break;
 
353
                                        case 'S':
 
354
                                                return -41;
 
355
                                                break;
 
356
                                        case 'T':
 
357
                                                return 79;
 
358
                                                break;
 
359
                                        case 'W':
 
360
                                                return 130;
 
361
                                                break;
 
362
                                        case 'Y':
 
363
                                                return 27;
 
364
                                                break;
 
365
                                        case 'V':
 
366
                                                return 117;
 
367
                                                break;  
 
368
                                        default:                
 
369
                                                throw Exception::InvalidValue(__FILE__,__LINE__,__PRETTY_FUNCTION__, "Unkown amino acid one-letter-code",String(aa));
 
370
                                }
 
371
                        }
 
372
                
 
373
                        //NADH010106    0.811
 
374
                        //I    A/L     R/K     N/M     D/F     C/P     Q/S     E/T     G/W     H/Y     I/V
 
375
                        //-2     -41     -97     248     329     -37     117     -66     -70      28
 
376
                        //36     115      62     120    -132     -52     174     179      -7     114  
 
377
        
 
378
                        /**
 
379
                                @brief Hydropathy scale based on self-information values in the two-state model (50% accessibility) (Naderi-Manesh et al., 2001)
 
380
 
 
381
                                PMID:11170200<br>
 
382
                                Naderi-Manesh, H., Sadeghi, M., Arab, S. and Moosavi Movahedi, A.A.<br>
 
383
                                Prediction of protein surface accessibility with information theory<br>
 
384
                                Proteins. 42, 452-459 (2001)
 
385
 
 
386
                                @exception InvalidValue is thrown if an undefined one-letter-code is used
 
387
                        */      
 
388
                        static DoubleReal getNADH010107(char aa) 
 
389
                        {
 
390
                                switch(aa) 
 
391
                                {
 
392
                                        case 'A':
 
393
                                                return -2;
 
394
                                                break;
 
395
                                        case 'R':
 
396
                                                return -41;
 
397
                                                break;
 
398
                                        case 'N':
 
399
                                                return -97;
 
400
                                                break;
 
401
                                        case 'D':
 
402
                                                return 248;
 
403
                                                break;
 
404
                                        case 'C':
 
405
                                                return 329;
 
406
                                                break;
 
407
                                        case 'Q':
 
408
                                                return -37;
 
409
                                                break;
 
410
                                        case 'E':
 
411
                                                return 117;
 
412
                                                break;
 
413
                                        case 'G':
 
414
                                                return -66;
 
415
                                                break;
 
416
                                        case 'H':
 
417
                                                return -70;
 
418
                                                break;
 
419
                                        case 'I':
 
420
                                                return 28;
 
421
                                                break;
 
422
                                        case 'L':
 
423
                                                return 36;
 
424
                                                break;
 
425
                                        case 'K':
 
426
                                                return 115;
 
427
                                                break;
 
428
                                        case 'M':
 
429
                                                return 62;
 
430
                                                break;
 
431
                                        case 'F':
 
432
                                                return 120;
 
433
                                                break;
 
434
                                        case 'P':
 
435
                                                return -132;
 
436
                                                break;
 
437
                                        case 'S':
 
438
                                                return -52;
 
439
                                                break;
 
440
                                        case 'T':
 
441
                                                return 174;
 
442
                                                break;
 
443
                                        case 'W':
 
444
                                                return 179;
 
445
                                                break;
 
446
                                        case 'Y':
 
447
                                                return -7;
 
448
                                                break;
 
449
                                        case 'V':
 
450
                                                return 114;
 
451
                                                break;  
 
452
                                        default:                
 
453
                                                throw Exception::InvalidValue(__FILE__,__LINE__,__PRETTY_FUNCTION__, "Unkown amino acid one-letter-code",String(aa));
 
454
                                }
 
455
                        }
 
456
                
 
457
                        //WILM950101    0.838  MEEJ810102    0.809
 
458
                        //I    A/L     R/K     N/M     D/F     C/P     Q/S     E/T     G/W     H/Y     I/V
 
459
                        //2.62    1.26   -1.27   -2.84    0.73   -1.69   -0.45   -1.15   -0.74    4.38
 
460
                        //6.57   -2.78   -3.12    9.14   -0.12   -1.39    1.81    5.91    1.39    2.30          
 
461
        
 
462
                        /**
 
463
                                @brief Hydrophobicity coefficient in RP-HPLC, C8 with 0.1%TFA/MeCN/H2O (Wilce et al. 1995)
 
464
 
 
465
                                Wilce, M.C., Aguilar, M.I. and Hearn, M.T.<br>
 
466
                                Physicochemical basis of amino acid hydrophobicity scales: evaluation of four
 
467
                                new scales of amino acid hydrophobicity coefficients derived from RP-HPLC of 
 
468
                                peptides<br>
 
469
                                Anal Chem. 67, 1210-1219 (1995)
 
470
                                                        
 
471
                                @exception InvalidValue is thrown if an undefined one-letter-code is used
 
472
                        */
 
473
                        static DoubleReal getWILM950102(char aa) 
 
474
                        {
 
475
                                switch(aa) 
 
476
                                {
 
477
                                        case 'A':
 
478
                                                return 2.62;
 
479
                                                break;
 
480
                                        case 'R':
 
481
                                                return 1.26;
 
482
                                                break;
 
483
                                        case 'N':
 
484
                                                return -1.27;
 
485
                                                break;
 
486
                                        case 'D':
 
487
                                                return -2.84;
 
488
                                                break;
 
489
                                        case 'C':
 
490
                                                return 0.73;
 
491
                                                break;
 
492
                                        case 'Q':
 
493
                                                return -1.69;
 
494
                                                break;
 
495
                                        case 'E':
 
496
                                                return -0.45;
 
497
                                                break;
 
498
                                        case 'G':
 
499
                                                return -1.15;
 
500
                                                break;
 
501
                                        case 'H':
 
502
                                                return -0.74;
 
503
                                                break;
 
504
                                        case 'I':
 
505
                                                return 4.38;
 
506
                                                break;
 
507
                                        case 'L':
 
508
                                                return 6.57;
 
509
                                                break;
 
510
                                        case 'K':
 
511
                                                return -2.78;
 
512
                                                break;
 
513
                                        case 'M':
 
514
                                                return -3.12;
 
515
                                                break;
 
516
                                        case 'F':
 
517
                                                return 9.14;
 
518
                                                break;
 
519
                                        case 'P':
 
520
                                                return -0.12;
 
521
                                                break;
 
522
                                        case 'S':
 
523
                                                return -1.39;
 
524
                                                break;
 
525
                                        case 'T':
 
526
                                                return 1.81;
 
527
                                                break;
 
528
                                        case 'W':
 
529
                                                return 5.91;
 
530
                                                break;
 
531
                                        case 'Y':
 
532
                                                return 1.39;
 
533
                                                break;
 
534
                                        case 'V':
 
535
                                                return 2.30;
 
536
                                                break;  
 
537
                                        default:                
 
538
                                                throw Exception::InvalidValue(__FILE__,__LINE__,__PRETTY_FUNCTION__, "Unkown amino acid one-letter-code",String(aa));
 
539
                                }
 
540
                        }       
 
541
                
 
542
 
 
543
                        //I    A/L     R/K     N/M     D/F     C/P     Q/S     E/T     G/W     H/Y     I/V
 
544
                        //0.0     1.1    -2.0    -2.6     5.4     2.4     3.1    -3.4     0.8    -0.1
 
545
                        //-3.7    -3.1    -2.1     0.7     7.4     1.3     0.0    -3.4     4.8     2.7
 
546
        
 
547
                        /**
 
548
                                @brief Information measure for extended without H-bond (Robson-Suzuki, 1976)
 
549
 
 
550
                                PMID:1003471<br>
 
551
                                Robson, B. and Suzuki, E.<br>
 
552
                                Conformational properties of amino acid residues in globular proteins<br>
 
553
                                J. Mol. Biol. 107, 327-356 (1976)
 
554
                                                        
 
555
                                @exception InvalidValue is thrown if an undefined one-letter-code is used
 
556
                        */
 
557
                        static DoubleReal getROBB760107(char aa) 
 
558
                        {
 
559
                                switch(aa) 
 
560
                                {
 
561
                                        case 'A':
 
562
                                                return 0.0;
 
563
                                                break;
 
564
                                        case 'R':
 
565
                                                return 1.1;
 
566
                                                break;
 
567
                                        case 'N':
 
568
                                                return -2.0;
 
569
                                                break;
 
570
                                        case 'D':
 
571
                                                return -2.6;
 
572
                                                break;
 
573
                                        case 'C':
 
574
                                                return 5.4;
 
575
                                                break;
 
576
                                        case 'Q':
 
577
                                                return 2.4;
 
578
                                                break;
 
579
                                        case 'E':
 
580
                                                return 3.1;
 
581
                                                break;
 
582
                                        case 'G':
 
583
                                                return -3.4;
 
584
                                                break;
 
585
                                        case 'H':
 
586
                                                return 0.8;
 
587
                                                break;
 
588
                                        case 'I':
 
589
                                                return -0.1;
 
590
                                                break;
 
591
                                        case 'L':
 
592
                                                return -3.7;
 
593
                                                break;
 
594
                                        case 'K':
 
595
                                                return -3.1;
 
596
                                                break;
 
597
                                        case 'M':
 
598
                                                return -2.1;
 
599
                                                break;
 
600
                                        case 'F':
 
601
                                                return 0.7;
 
602
                                                break;
 
603
                                        case 'P':
 
604
                                                return 7.4;
 
605
                                                break;
 
606
                                        case 'S':
 
607
                                                return 1.3;
 
608
                                                break;
 
609
                                        case 'T':
 
610
                                                return 0.0;
 
611
                                                break;
 
612
                                        case 'W':
 
613
                                                return -3.4;
 
614
                                                break;
 
615
                                        case 'Y':
 
616
                                                return 4.8;
 
617
                                                break;
 
618
                                        case 'V':
 
619
                                                return 2.7;
 
620
                                                break;  
 
621
                                        default:                
 
622
                                                throw Exception::InvalidValue(__FILE__,__LINE__,__PRETTY_FUNCTION__, "Unkown amino acid one-letter-code",String(aa));
 
623
                                }
 
624
                        }
 
625
                
 
626
                
 
627
                        //I    A/L     R/K     N/M     D/F     C/P     Q/S     E/T     G/W     H/Y     I/V
 
628
                        //-2.49    2.55    2.27    8.86   -3.13    1.79    4.04   -0.56    4.22  -10.87
 
629
                        //-7.16   -9.97   -4.96   -6.64    5.19   -1.60   -4.75  -17.84    9.25   -3.97  
 
630
        
 
631
                        /**
 
632
                                @brief Optimized average non-bonded energy per atom (Oobatake et al., 1985)
 
633
                                
 
634
                                LIT:1207075b<br>
 
635
                                Oobatake, M., Kubota, Y. and Ooi, T.<br>
 
636
                                Optimization of amino acid parameters for correspondence of sequence to
 
637
                                tertiary structures of proteuins<br>
 
638
                                Bull. Inst. Chem. Res., Kyoto Univ. 63, 82-94 (1985)
 
639
                                                        
 
640
                                @exception InvalidValue is thrown if an undefined one-letter-code is used
 
641
                        */
 
642
                        static DoubleReal getOOBM850104(char aa) 
 
643
                        {
 
644
                                switch(aa) 
 
645
                                {
 
646
                                        case 'A':
 
647
                                                return -2.49;
 
648
                                                break;
 
649
                                        case 'R':
 
650
                                                return 2.55;
 
651
                                                break;
 
652
                                        case 'N':
 
653
                                                return 2.27;
 
654
                                                break;
 
655
                                        case 'D':
 
656
                                                return 8.86;
 
657
                                                break;
 
658
                                        case 'C':
 
659
                                                return -3.13;
 
660
                                                break;
 
661
                                        case 'Q':
 
662
                                                return 1.79;
 
663
                                                break;
 
664
                                        case 'E':
 
665
                                                return 4.04;
 
666
                                                break;
 
667
                                        case 'G':
 
668
                                                return -0.56;
 
669
                                                break;
 
670
                                        case 'H':
 
671
                                                return 4.22;
 
672
                                                break;
 
673
                                        case 'I':
 
674
                                                return -10.87;
 
675
                                                break;
 
676
                                        case 'L':
 
677
                                                return -7.16;
 
678
                                                break;
 
679
                                        case 'K':
 
680
                                                return -9.97;
 
681
                                                break;
 
682
                                        case 'M':
 
683
                                                return -4.96;
 
684
                                                break;
 
685
                                        case 'F':
 
686
                                                return -6.64;
 
687
                                                break;
 
688
                                        case 'P':
 
689
                                                return 5.19;
 
690
                                                break;
 
691
                                        case 'S':
 
692
                                                return -1.60;
 
693
                                                break;
 
694
                                        case 'T':
 
695
                                                return -4.75;
 
696
                                                break;
 
697
                                        case 'W':
 
698
                                                return -17.84;
 
699
                                                break;
 
700
                                        case 'Y':
 
701
                                                return 9.25;
 
702
                                                break;
 
703
                                        case 'V':
 
704
                                                return -3.97;
 
705
                                                break;  
 
706
                                        default:                
 
707
                                                throw Exception::InvalidValue(__FILE__,__LINE__,__PRETTY_FUNCTION__, "Unkown amino acid one-letter-code",String(aa));
 
708
                                }
 
709
                        }
 
710
                
 
711
                        //ZIMJ680104    0.813
 
712
                        //I    A/L     R/K     N/M     D/F     C/P     Q/S     E/T     G/W     H/Y     I/V
 
713
                        //0.      1.      0.      0.      0.      0.      0.      0.      1.      0.
 
714
                        //0.      1.      0.      0.      0.      0.      0.      0.      0.      0.
 
715
        
 
716
                        /**
 
717
                                @brief Positive charge (Fauchere et al., 1988)
 
718
 
 
719
                                LIT:1414114 PMID:3209351<br>
 
720
                                Fauchere, J.L., Charton, M., Kier, L.B., Verloop, A. and Pliska, V.<br>
 
721
                                Amino acid side chain parameters for correlation studies in biology and 
 
722
                                pharmacology<br>
 
723
                                Int. J. Peptide Protein Res. 32, 269-278 (1988)
 
724
                                
 
725
                                @exception InvalidValue is thrown if an undefined one-letter-code is used
 
726
                        */
 
727
                        static DoubleReal getFAUJ880111(char aa) 
 
728
                        {
 
729
                                switch(aa) 
 
730
                                {
 
731
                                        case 'A':
 
732
                                                return 0.;
 
733
                                                break;
 
734
                                        case 'R':
 
735
                                                return 1.;
 
736
                                                break;
 
737
                                        case 'N':
 
738
                                                return 0.;
 
739
                                                break;
 
740
                                        case 'D':
 
741
                                                return 0.;
 
742
                                                break;
 
743
                                        case 'C':
 
744
                                                return 0.;
 
745
                                                break;
 
746
                                        case 'Q':
 
747
                                                return 0.;
 
748
                                                break;
 
749
                                        case 'E':
 
750
                                                return 0.;
 
751
                                                break;
 
752
                                        case 'G':
 
753
                                                return 0.;
 
754
                                                break;
 
755
                                        case 'H':
 
756
                                                return 1.;
 
757
                                                break;
 
758
                                        case 'I':
 
759
                                                return 0.;
 
760
                                                break;
 
761
                                        case 'L':
 
762
                                                return 0.;
 
763
                                                break;
 
764
                                        case 'K':
 
765
                                                return 1.;
 
766
                                                break;
 
767
                                        case 'M':
 
768
                                                return 0.;
 
769
                                                break;
 
770
                                        case 'F':
 
771
                                                return 0.;
 
772
                                                break;
 
773
                                        case 'P':
 
774
                                                return 0.;
 
775
                                                break;
 
776
                                        case 'S':
 
777
                                                return 0.;
 
778
                                                break;
 
779
                                        case 'T':
 
780
                                                return 0.;
 
781
                                                break;
 
782
                                        case 'W':
 
783
                                                return 0.;
 
784
                                                break;
 
785
                                        case 'Y':
 
786
                                                return 0.;
 
787
                                                break;
 
788
                                        case 'V':
 
789
                                                return 0.;
 
790
                                                break;  
 
791
                                        default:                
 
792
                                                throw Exception::InvalidValue(__FILE__,__LINE__,__PRETTY_FUNCTION__, "Unkown amino acid one-letter-code",String(aa));
 
793
                                }
 
794
                        }
 
795
                
 
796
                        //SUEM840101    0.883  AURR980114    0.875  AURR980113    0.849<br>
 
797
                        //PTIO830101    0.826  KANM800103    0.823  QIAN880107    0.814<br>
 
798
                        //QIAN880106    0.810  MAXF760101    0.810  AURR980109    0.802
 
799
                        //I    A/L     R/K     N/M     D/F     C/P     Q/S     E/T     G/W     H/Y     I/V
 
800
                        //1.08    1.05    0.85    0.85    0.95    0.95    1.15    0.55    1.00    1.05
 
801
                        //1.25    1.15    1.15    1.10    0.71    0.75    0.75    1.10    1.10    0.95
 
802
        
 
803
                        /**
 
804
                                @brief Helix-coil equilibrium constant (Finkelstein-Ptitsyn, 1977)
 
805
                                
 
806
                                LIT:2004052b PMID:843599<br>
 
807
                                Finkelstein, A.V. and Ptitsyn, O.B.<br>
 
808
                                Theory of protein molecule self-organization. II. A comparison of calculated 
 
809
                                thermodynamic parameters of local secondary structures with experiments<br>
 
810
                                Biopolymers 16, 497-524 (1977) (Pro 0.096)
 
811
                         
 
812
                                @exception InvalidValue is thrown if an undefined one-letter-code is used
 
813
                        */
 
814
                        static DoubleReal getFINA770101(char aa) 
 
815
                        {
 
816
                                switch(aa) 
 
817
                                {
 
818
                                        case 'A':
 
819
                                                return 1.08;
 
820
                                                break;
 
821
                                        case 'R':
 
822
                                                return 1.05;
 
823
                                                break;
 
824
                                        case 'N':
 
825
                                                return 0.85;
 
826
                                                break;
 
827
                                        case 'D':
 
828
                                                return 0.85;
 
829
                                                break;
 
830
                                        case 'C':
 
831
                                                return 0.95;
 
832
                                                break;
 
833
                                        case 'Q':
 
834
                                                return 0.95;
 
835
                                                break;
 
836
                                        case 'E':
 
837
                                                return 1.15;
 
838
                                                break;
 
839
                                        case 'G':
 
840
                                                return 0.55;
 
841
                                                break;
 
842
                                        case 'H':
 
843
                                                return 1.00;
 
844
                                                break;
 
845
                                        case 'I':
 
846
                                                return 1.05;
 
847
                                                break;
 
848
                                        case 'L':
 
849
                                                return 1.25;
 
850
                                                break;
 
851
                                        case 'K':
 
852
                                                return 1.15;
 
853
                                                break;
 
854
                                        case 'M':
 
855
                                                return 1.15;
 
856
                                                break;
 
857
                                        case 'F':
 
858
                                                return 1.10;
 
859
                                                break;
 
860
                                        case 'P':
 
861
                                                return 0.71;
 
862
                                                break;
 
863
                                        case 'S':
 
864
                                                return 0.75;
 
865
                                                break;
 
866
                                        case 'T':
 
867
                                                return 0.75;
 
868
                                                break;
 
869
                                        case 'W':
 
870
                                                return 1.10;
 
871
                                                break;
 
872
                                        case 'Y':
 
873
                                                return 1.10;
 
874
                                                break;
 
875
                                        case 'V':
 
876
                                                return 0.95;
 
877
                                                break;  
 
878
                                        default:                
 
879
                                                throw Exception::InvalidValue(__FILE__,__LINE__,__PRETTY_FUNCTION__, "Unkown amino acid one-letter-code",String(aa));
 
880
                                }
 
881
                        }
 
882
                
 
883
                        //ARGP820103    0.961  KYTJ820101    0.803  JURD980101    0.802
 
884
                        //I    A/L     R/K     N/M     D/F     C/P     Q/S     E/T     G/W     H/Y     I/V
 
885
                        //1.18    0.20    0.23    0.05    1.89    0.72    0.11    0.49    0.31    1.45
 
886
                        //3.23    0.06    2.67    1.96    0.76    0.97    0.84    0.77    0.39    1.08
 
887
        
 
888
                        /**
 
889
                                @brief Signal sequence helical potential (Argos et al., 1982)
 
890
                                
 
891
                                LIT:0901079b PMID:7151796<br>
 
892
                                Argos, P., Rao, J.K.M. and Hargrave, P.A.<br>
 
893
                                Structural prediction of membrane-bound proteins<br>
 
894
                                Eur. J. Biochem. 128, 565-575 (1982)
 
895
                        
 
896
                                @exception InvalidValue is thrown if an undefined one-letter-code is used
 
897
                        */
 
898
                        static DoubleReal getARGP820102(char aa) 
 
899
                        {
 
900
                                switch(aa) 
 
901
                                {
 
902
                                        case 'A':
 
903
                                                return 1.18;
 
904
                                                break;
 
905
                                        case 'R':
 
906
                                                return 0.20;
 
907
                                                break;
 
908
                                        case 'N':
 
909
                                                return 0.23;
 
910
                                                break;
 
911
                                        case 'D':
 
912
                                                return 0.05;
 
913
                                                break;
 
914
                                        case 'C':
 
915
                                                return 1.89;
 
916
                                                break;
 
917
                                        case 'Q':
 
918
                                                return 0.72;
 
919
                                                break;
 
920
                                        case 'E':
 
921
                                                return 0.11;
 
922
                                                break;
 
923
                                        case 'G':
 
924
                                                return 0.49;
 
925
                                                break;
 
926
                                        case 'H':
 
927
                                                return 0.31;
 
928
                                                break;
 
929
                                        case 'I':
 
930
                                                return 1.45;
 
931
                                                break;
 
932
                                        case 'L':
 
933
                                                return 3.23;
 
934
                                                break;
 
935
                                        case 'K':
 
936
                                                return 0.06;
 
937
                                                break;
 
938
                                        case 'M':
 
939
                                                return 2.67;
 
940
                                                break;
 
941
                                        case 'F':
 
942
                                                return 1.96;
 
943
                                                break;
 
944
                                        case 'P':
 
945
                                                return 0.76;
 
946
                                                break;
 
947
                                        case 'S':
 
948
                                                return 0.97;
 
949
                                                break;
 
950
                                        case 'T':
 
951
                                                return 0.84;
 
952
                                                break;
 
953
                                        case 'W':
 
954
                                                return 0.77;
 
955
                                                break;
 
956
                                        case 'Y':
 
957
                                                return 0.39;
 
958
                                                break;
 
959
                                        case 'V':
 
960
                                                return 1.08;
 
961
                                                break;  
 
962
                                        default:                
 
963
                                                throw Exception::InvalidValue(__FILE__,__LINE__,__PRETTY_FUNCTION__, "Unkown amino acid one-letter-code",String(aa));
 
964
                                }
 
965
                        }
 
966
                        
 
967
                        /**
 
968
                                @brief Calculates an estimated gas-phase basicity for an amino acid sequence at a given temperature
 
969
                                
 
970
                                Energy level E at each protonation site i is -GB(i) fractional proton population of a microstate k is <br>
 
971
                                P_k = exp (- E_k/(RT)) / ( sum_i exp (- E_i/(RT))) <br>
 
972
                                The apparent proton association constant K_app: K_app = sum_i GB(i)/(RT)<br>
 
973
                                Then the apparent GB is GB_app^ion = R * T * ln(K_app)
 
974
                                
 
975
                                @exception InvalidValue is thrown if an undefined one-letter-code is used
 
976
                        */
 
977
                        static DoubleReal calculateGB(const AASequence& seq, DoubleReal T=500.0) 
 
978
                        {
 
979
                                                
 
980
                                DoubleReal R = Constants::GAS_CONSTANT/1000.0; // ideal gas constant in kj/(K*mol)
 
981
                                        
 
982
                                char left = '>';
 
983
                                char right;
 
984
                                
 
985
                                DoubleReal k_app = 0.0; // apparent proton association constant
 
986
                                        
 
987
                                // energy level E at each protonation site i is -GB(i)
 
988
                                // fractional proton population of a microstate k is 
 
989
                                // P_k = exp (- E_k/(RT)) / ( sum_i exp (- E_i/(RT))) 
 
990
                                // the apparent proton association constant k_app:
 
991
                                // k_app = sum_i GB(i)/(RT)
 
992
                                // then the apparent GB is GB_app^ion = R * T * ln(k_app)
 
993
                                for (Size i = 0; i <= seq.size(); i++) 
 
994
                                {
 
995
                                        // aa left to current one
 
996
                                        if(i > 0) 
 
997
                                        {
 
998
                                                Residue leftchar = seq[i-1];
 
999
                                                left = leftchar.getOneLetterCode()[0];          
 
1000
                                        } 
 
1001
                                                
 
1002
                                        // aa right to current one
 
1003
                                        if(i == seq.size()) 
 
1004
                                        {
 
1005
                                                right = '<';
 
1006
                                        } 
 
1007
                                        else 
 
1008
                                        {
 
1009
                                                Residue rightchar = seq[i];
 
1010
                                                right = rightchar.getOneLetterCode()[0];
 
1011
                                        }
 
1012
                                        DoubleReal contrib = exp((GBleft_(left) + GBdeltaright_(right))/(R*T));
 
1013
                                        if(i > 0 && i < seq.size()) 
 
1014
                                        {
 
1015
                                                contrib += exp(GBsidechain_(right)/(R*T));
 
1016
                                        }
 
1017
                                        k_app += contrib;
 
1018
                                }
 
1019
                                // calculate apparent GB
 
1020
                                return R * T * log(k_app)/log(2.0);
 
1021
                        }
 
1022
                
 
1023
                protected:
 
1024
                        
 
1025
                        /**
 
1026
                                @brief Calculates part of the gas-phase basicity
 
1027
                                
 
1028
                                For a detailed description see @ref calculateGB(const AASequence&, DoubleReal) .
 
1029
                                
 
1030
                                @exception InvalidValue is thrown if an undefined one-letter-code is used
 
1031
                        */
 
1032
                        static DoubleReal GBsidechain_(char aa)
 
1033
                        {
 
1034
                                switch(aa) 
 
1035
                                {
 
1036
                                        case 'A': 
 
1037
                                                return 0.0;
 
1038
                                          break;
 
1039
                                        case 'C':
 
1040
                                                return 0.0;
 
1041
                                          break;
 
1042
                                        case 'D':
 
1043
                                                return 784.0;
 
1044
                                          break;
 
1045
                                        case 'E':
 
1046
                                                return 790.0;
 
1047
                                          break;
 
1048
                                        case 'F':
 
1049
                                                return 0.0;
 
1050
                                          break;
 
1051
                                        case 'G':
 
1052
                                                return 0.0;
 
1053
                                          break;
 
1054
                                        case 'H':
 
1055
                                                return 927.84;
 
1056
                                          break;
 
1057
                                        case 'I':
 
1058
                                                return 0.0;
 
1059
                                          break;
 
1060
                                        case 'K':
 
1061
                                                return 926.74;
 
1062
                                          break;
 
1063
                                        case 'L':
 
1064
                                                return 0.0;
 
1065
                                          break;
 
1066
                                        case 'M':
 
1067
                                                return 830.0;
 
1068
                                          break;
 
1069
                                        case 'N':
 
1070
                                                return 864.94;
 
1071
                                          break;
 
1072
                                        case 'P':
 
1073
                                                return 0.0;
 
1074
                                          break;
 
1075
                                        case 'Q':
 
1076
                                                return 865.25;
 
1077
                                          break;
 
1078
                                        case 'R':
 
1079
                                                return 1000.0;
 
1080
                                          break;
 
1081
                                        case 'S':
 
1082
                                                return 775.0;
 
1083
                                          break;
 
1084
                                        case 'T':
 
1085
                                                return 780.0;
 
1086
                                          break;
 
1087
                                        case 'V':
 
1088
                                                return 0.0;
 
1089
                                          break;
 
1090
                                        case 'W':
 
1091
                                                return 909.53;
 
1092
                                          break;
 
1093
                                        case 'Y':
 
1094
                                                return 790.0;
 
1095
                                          break;
 
1096
                                        default:                        
 
1097
                                                throw Exception::InvalidValue(__FILE__,__LINE__,__PRETTY_FUNCTION__, "Unkown amino acid one-letter-code",String(aa));
 
1098
                                }
 
1099
                                
 
1100
                                return 0.0; //this should never be reached, but is necessary to suppress compiler warngins on older compilers
 
1101
                        }
 
1102
                
 
1103
                
 
1104
                        /**
 
1105
                                @brief Calculates part of the gas-phase basicity
 
1106
                                
 
1107
                                For a detailed description see @ref calculateGB(const AASequence&, DoubleReal) .
 
1108
                                
 
1109
                                @exception InvalidValue is thrown if an undefined one-letter-code is used
 
1110
                        */
 
1111
                        static DoubleReal GBleft_(char aa) 
 
1112
                        {
 
1113
                                switch(aa) 
 
1114
                                {
 
1115
                                        case 'A':
 
1116
                                                return 881.82;
 
1117
                                                break;
 
1118
                                        case 'C':
 
1119
                                                return 881.15;
 
1120
                                                break;
 
1121
                                        case 'D':
 
1122
                                                return 880.02;
 
1123
                                                break;
 
1124
                                        case 'E':
 
1125
                                                return 880.10;
 
1126
                                                break;
 
1127
                                        case 'F':
 
1128
                                                return 881.08;
 
1129
                                                break;
 
1130
                                        case 'G':
 
1131
                                                return 881.17;
 
1132
                                                break;
 
1133
                                        case 'H':
 
1134
                                                return 881.27;
 
1135
                                                break;
 
1136
                                        case 'I':
 
1137
                                                return 880.99;
 
1138
                                                break;
 
1139
                                        case 'K':
 
1140
                                                return 880.06;
 
1141
                                                break;
 
1142
                                        case 'L':
 
1143
                                                return 881.88;
 
1144
                                                break;
 
1145
                                        case 'M':
 
1146
                                                return 881.38;
 
1147
                                                break;
 
1148
                                        case 'N':
 
1149
                                                return 881.18;
 
1150
                                                break;
 
1151
                                        case 'P':
 
1152
                                                return 881.25;
 
1153
                                                break;
 
1154
                                        case 'Q':
 
1155
                                                return 881.50;
 
1156
                                                break;
 
1157
                                        case 'R':
 
1158
                                                return 882.98;
 
1159
                                                break;
 
1160
                                        case 'S':
 
1161
                                                return 881.08;
 
1162
                                                break;
 
1163
                                        case 'T':
 
1164
                                                return 881.14;
 
1165
                                                break;
 
1166
                                        case 'V':
 
1167
                                                return 881.17;
 
1168
                                                break;
 
1169
                                        case 'W':
 
1170
                                                return 881.31;
 
1171
                                                break;
 
1172
                                        case 'Y':
 
1173
                                                return 881.20;
 
1174
                                                break;
 
1175
                                        case '>': //NH2
 
1176
                                                return 916.84;
 
1177
                                                break;
 
1178
                                        default:                
 
1179
                                                throw Exception::InvalidValue(__FILE__,__LINE__,__PRETTY_FUNCTION__, "Unkown amino acid one-letter-code",String(aa));
 
1180
        
 
1181
                                }
 
1182
                                
 
1183
                                return 0.0; //this should never be reached, but is necessary to suppress compiler warngins on older compilers
 
1184
                        }
 
1185
                
 
1186
                        /**
 
1187
                                @brief Calculates part of the gas-phase basicity
 
1188
                                
 
1189
                                For a detailed description see @ref calculateGB(const AASequence&, DoubleReal) .
 
1190
                                
 
1191
                                @exception InvalidValue is thrown if an undefined one-letter-code is used
 
1192
                        */
 
1193
                        static DoubleReal GBdeltaright_(char aa) 
 
1194
                        {
 
1195
                                switch(aa) 
 
1196
                                {
 
1197
                                        case 'A':
 
1198
                                                return 0.0;
 
1199
                                                break;
 
1200
                                        case 'C':
 
1201
                                                return -0.69;
 
1202
                                                break;
 
1203
                                        case 'D':
 
1204
                                                return -0.63;
 
1205
                                                break;
 
1206
                                        case 'E':
 
1207
                                                return -0.39;
 
1208
                                                break;
 
1209
                                        case 'F':
 
1210
                                                return 0.03;
 
1211
                                                break;
 
1212
                                        case 'G':
 
1213
                                                return 0.92;
 
1214
                                                break;
 
1215
                                        case 'H':
 
1216
                                                return -0.19;
 
1217
                                                break;
 
1218
                                        case 'I':
 
1219
                                                return -1.17;
 
1220
                                                break;
 
1221
                                        case 'K':
 
1222
                                                return -0.71;
 
1223
                                                break;
 
1224
                                        case 'L':
 
1225
                                                return -0.09;
 
1226
                                                break;
 
1227
                                        case 'M':
 
1228
                                                return 0.30;
 
1229
                                                break;
 
1230
                                        case 'N':
 
1231
                                                return 1.56;
 
1232
                                                break;
 
1233
                                        case 'P':
 
1234
                                                return 11.75;
 
1235
                                                break;
 
1236
                                        case 'Q':
 
1237
                                                return 4.10;
 
1238
                                                break;
 
1239
                                        case 'R':
 
1240
                                                return 6.28;
 
1241
                                                break;
 
1242
                                        case 'S':
 
1243
                                                return 0.98;
 
1244
                                                break;
 
1245
                                        case 'T':
 
1246
                                                return 1.21;
 
1247
                                                break;
 
1248
                                        case 'V':
 
1249
                                                return -0.90;
 
1250
                                                break;
 
1251
                                        case 'W':
 
1252
                                                return 0.10;
 
1253
                                                break;
 
1254
                                        case 'Y':
 
1255
                                                return -0.38;
 
1256
                                                break;
 
1257
                                        case '<': //COOH
 
1258
                                                return -95.82;
 
1259
                                                break;
 
1260
                                        default:                
 
1261
                                                throw Exception::InvalidValue(__FILE__,__LINE__,__PRETTY_FUNCTION__, "Unkown amino acid one-letter-code",String(aa));
 
1262
                                }
 
1263
 
 
1264
                                return 0.0; //this should never be reached, but is necessary to suppress compiler warngins on older compilers
 
1265
                        }
 
1266
                
 
1267
                private:
 
1268
                        
 
1269
                        ///Constructor not implemented => private
 
1270
                        AAIndex();
 
1271
        };
 
1272
        
 
1273
}
 
1274
#endif 
 
1275