#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
Go to the source code of this file.
Data Structures | |
struct | s_amino_a |
Defines | |
#define | M_NB_AA 20 |
#define | M_ALA_IDX 0 |
#define | M_CYS_IDX 1 |
#define | M_ASP_IDX 2 |
#define | M_GLU_IDX 3 |
#define | M_PHE_IDX 4 |
#define | M_GLY_IDX 5 |
#define | M_HIS_IDX 6 |
#define | M_ILE_IDX 7 |
#define | M_LYS_IDX 8 |
#define | M_LEU_IDX 9 |
#define | M_MET_IDX 10 |
#define | M_ASN_IDX 11 |
#define | M_PRO_IDX 12 |
#define | M_GLN_IDX 13 |
#define | M_ARG_IDX 14 |
#define | M_SER_IDX 15 |
#define | M_THR_IDX 16 |
#define | M_VAL_IDX 17 |
#define | M_TRP_IDX 18 |
#define | M_TYR_IDX 19 |
Functions | |
int | get_aa_index (const char *name) |
char * | get_aa_name3 (const int index) |
float | get_aa_mw (const char *name) |
float | get_aa_volume_score (const char *name) |
float | get_aa_hydrophobicity_score (const char *name) |
int | get_aa_charge (const char *name) |
int | get_aa_polarity (const char *name) |
int | get_aa_func_grp (const char *name) |
float | get_volume_score_from_idx (int aa_index) |
float | get_hydrophobicity_score_from_idx (int aa_index) |
int | get_charge_from_idx (int aa_index) |
int | get_polarity_from_idx (int aa_index) |
int | get_func_grp_from_idx (int aa_index) |
#define M_ALA_IDX 0 |
#define M_ARG_IDX 14 |
#define M_ASN_IDX 11 |
#define M_ASP_IDX 2 |
#define M_CYS_IDX 1 |
#define M_GLN_IDX 13 |
#define M_GLU_IDX 3 |
#define M_GLY_IDX 5 |
#define M_HIS_IDX 6 |
#define M_ILE_IDX 7 |
#define M_LEU_IDX 9 |
#define M_LYS_IDX 8 |
#define M_MET_IDX 10 |
#define M_NB_AA 20 |
number of amino acid macros
Definition at line 43 of file aa.h.
Referenced by get_aa_index(), and print_pocket().
#define M_PHE_IDX 4 |
#define M_PRO_IDX 12 |
#define M_SER_IDX 15 |
#define M_THR_IDX 16 |
#define M_TRP_IDX 18 |
#define M_TYR_IDX 19 |
#define M_VAL_IDX 17 |
int get_aa_charge | ( | const char * | name | ) |
## FUNCTION: get_aa_charge
## SPECIFICATION: Return the charge score of given amino acid
## PARAMETRES: const char *name: Amno acid name (3 letter code representation)
## RETURN: charge (positiv, negativ, neutral, see header for more details), 0 if aa not found in the tab
Definition at line 258 of file aa.c.
References s_amino_a::charge, and get_aa_index().
00259 { 00260 int aa_index = get_aa_index(name) ; 00261 00262 if(aa_index != -1) { 00263 return ST_aa[aa_index].charge ; 00264 }/* 00265 else { 00266 fprintf(stderr, "! Amino acid '%s' could not be found in property table...\n", name); 00267 }*/ 00268 00269 return 0 ; 00270 }
int get_aa_func_grp | ( | const char * | name | ) |
## FUNCTION: get_func_grp_from_idx
## SPECIFICATION: Return the functional group type of the given amino acid
## PARAMETRES: @ const char *name: Amno acid name (3 letter code representation)
## RETURN: int: functional group id
Definition at line 314 of file aa.c.
References s_amino_a::func_grp, and get_aa_index().
00315 { 00316 int aa_index = get_aa_index(name) ; 00317 00318 if(aa_index != -1) { 00319 return ST_aa[aa_index].func_grp ; 00320 }/* 00321 else { 00322 fprintf(stderr, "! Amino acid '%s' could not be found in property table...\n", name); 00323 }*/ 00324 00325 return -1 ; 00326 }
float get_aa_hydrophobicity_score | ( | const char * | name | ) |
## FUNCTION: get_aa_hydrophobicity_score
## SPECIFICATION: Return the hydrophobicity score of given amino acid
## PARAMETRES: @ const char *name: Amno acid name (3 letter code representation)
## RETURN: float: hydrophobicity score, -1 if aa not found in the tab
Definition at line 229 of file aa.c.
References get_aa_index(), and s_amino_a::hydrophobicity.
00230 { 00231 int aa_index = get_aa_index(name) ; 00232 00233 if(aa_index != -1) { 00234 return ST_aa[aa_index].hydrophobicity ; 00235 }/* 00236 else { 00237 fprintf(stderr, "! Amino acid '%s' could not be found in property table...\n", name); 00238 }*/ 00239 00240 return -1.0 ; 00241 }
int get_aa_index | ( | const char * | name | ) |
## FUNCTION: get_aa_index
## SPECIFICATION: Return the index of AA given in argument (3letter code representation) in the static AA tab.
## PARAMETRES: @ const char *name: Amno acid name (3 letter code representation)
## RETURN: int: index of the given amino acid, -1 if not found in the tab
Definition at line 140 of file aa.c.
References M_NB_AA.
Referenced by get_aa_charge(), get_aa_func_grp(), get_aa_hydrophobicity_score(), get_aa_mw(), get_aa_polarity(), and get_aa_volume_score().
00141 { 00142 int i, 00143 aa_index = -1 ; 00144 00145 for(i = 0 ; i < M_NB_AA ; i++) { 00146 if(toupper(name[0]) == ST_aa[i].name3[0] && toupper(name[1]) == ST_aa[i].name3[1] 00147 && toupper(name[2]) == ST_aa[i].name3[2] ) { 00148 aa_index = i ; 00149 break ; 00150 } 00151 } 00152 00153 return aa_index ; 00154 }
float get_aa_mw | ( | const char * | name | ) |
## FUNCTION: get_aa_mw
## SPECIFICATION: Return the molecular weight of AA given in argument
## PARAMETRES: @ const int index: Index of the AA in the tab
## RETURN: float: Molecular weight if the index is valid, NULL if not.
Definition at line 173 of file aa.c.
References get_aa_index(), and s_amino_a::mw.
00174 { 00175 int aa_index = get_aa_index(name) ; 00176 00177 if(aa_index != -1) { 00178 return ST_aa[aa_index].mw ; 00179 }/* 00180 else { 00181 fprintf(stderr, "! Amino acid '%s' could not be found in property table...\n", name); 00182 }*/ 00183 00184 return -1.0 ; 00185 }
char* get_aa_name3 | ( | const int | index | ) |
## FUNCTION: get_aa_name3
## SPECIFICATION: Return the name of AA given in argument (index in the static table)
## PARAMETRES: @ const int index: Index of the AA in the tab
## RETURN: char *: Name if index is valid, NULL if not.
Definition at line 117 of file aa.c.
References s_amino_a::name3.
Referenced by dpocket(), and mdpocket_characterize().
00118 { 00119 if(index < M_NB_AA && index >= 0) { 00120 return (char*)ST_aa[index].name3 ; 00121 } 00122 return NULL ; 00123 }
int get_aa_polarity | ( | const char * | name | ) |
## FUNCTION: get_aa_polarity
## SPECIFICATION: Return the polarity score of given amino acid
## PARAMETRES: @ const char *name: Amno acid name (3 letter code representation)
## RETURN: int polarity (polar, apolar), 0 if aa not found in the tab
Definition at line 286 of file aa.c.
References get_aa_index(), and s_amino_a::polarity.
00287 { 00288 int aa_index = get_aa_index(name) ; 00289 00290 if(aa_index != -1) { 00291 return ST_aa[aa_index].polarity ; 00292 }/* 00293 else { 00294 fprintf(stderr, "! Amino acid '%s' could not be found in property table...\n", name); 00295 }*/ 00296 00297 return -1 ; 00298 }
float get_aa_volume_score | ( | const char * | name | ) |
## FUNCTION: get_aa_volume_score
## SPECIFICATION: Return the volume score of given amino acid (very approximative...)
## PARAMETRES: @ const char *name: Amno acid name (3 letter code representation)
## RETURN: float: volume score, -1 if aa not found in the tab
Definition at line 201 of file aa.c.
References get_aa_index(), and s_amino_a::volume.
00202 { 00203 int aa_index = get_aa_index(name) ; 00204 00205 if(aa_index != -1) { 00206 return ST_aa[aa_index].volume ; 00207 }/* 00208 else { 00209 fprintf(stderr, "! Amino acid '%s' could not be found in property table...\n", name); 00210 }*/ 00211 00212 return -1.0 ; 00213 }
int get_charge_from_idx | ( | int | aa_index | ) |
## FUNCTION: get_charge_from_idx
## SPECIFICATION: Return the charge score of given amino acid
## PARAMETRES: @ int aa_index: Index of the amino acid in the tab
## RETURN: int charge (positiv, negativ, neutral, see header for more details), 0 if aa not found in the tab
Definition at line 399 of file aa.c.
References s_amino_a::charge.
Referenced by set_aa_desc().
00400 { 00401 if(aa_index < M_NB_AA && aa_index >= 0){ 00402 return ST_aa[aa_index].charge ; 00403 }/* 00404 else { 00405 fprintf(stderr, "! Amino acid %d could not be found in property table...\n", aa_index); 00406 }*/ 00407 00408 return 0 ; 00409 }
int get_func_grp_from_idx | ( | int | aa_index | ) |
## FUNCTION: get_func_grp_from_idx
## SPECIFICATION: Return the functional group type of the given amino acid
## PARAMETRES: @ int aa_index: Index of the amino acid in the tab
## RETURN: int: functional group id
Definition at line 451 of file aa.c.
References s_amino_a::func_grp.
00452 { 00453 if(aa_index < M_NB_AA && aa_index >= 0) { 00454 return ST_aa[aa_index].func_grp ; 00455 }/* 00456 else { 00457 fprintf(stderr, "! Amino acid %d could not be found in property table...\n", aa_index); 00458 }*/ 00459 00460 return -1 ; 00461 }
float get_hydrophobicity_score_from_idx | ( | int | aa_index | ) |
## FUNCTION: get_hydrophobicity_score_from_idx
## SPECIFICATION: Return the hydrophobicity score of given amino acid
## PARAMETRES: @ int aa_index: Index of the amino acid in the tab
## RETURN: float hydrophobicity score, -1 if aa not found in the tab
Definition at line 372 of file aa.c.
References s_amino_a::hydrophobicity.
Referenced by set_aa_desc().
00373 { 00374 if(aa_index < M_NB_AA && aa_index >= 0) { 00375 return ST_aa[aa_index].hydrophobicity ; 00376 }/* 00377 else { 00378 fprintf(stderr, "! Amino acid %d could not be found in property table...\n", aa_index); 00379 }*/ 00380 00381 return -1.0 ; 00382 }
int get_polarity_from_idx | ( | int | aa_index | ) |
## FUNCTION: get_polarity_from_idx
## SPECIFICATION: Return the polarity score of given amino acid
## PARAMETRES: @ int aa_index: Index of the amino acid in the tab
## RETURN: int: polarity (polar, apolar), -1 if aa not found in the tab
Definition at line 425 of file aa.c.
References s_amino_a::polarity.
Referenced by set_aa_desc().
00426 { 00427 if(aa_index < M_NB_AA && aa_index >= 0) { 00428 return ST_aa[aa_index].polarity ; 00429 }/* 00430 else { 00431 fprintf(stderr, "! Amino acid %d could not be found in property table...\n", aa_index); 00432 }*/ 00433 00434 return -1 ; 00435 }
float get_volume_score_from_idx | ( | int | aa_index | ) |
## FUNCTION: get_volume_score_from_idx
## SPECIFICATION: Return the volume score of given amino acid
## PARAMETRES: @ int aa_index: Index of the amino acid in the tab
## RETURN: float: volume score, -1 if aa not found in the tab
Definition at line 346 of file aa.c.
References s_amino_a::volume.
Referenced by set_aa_desc().
00347 { 00348 if(aa_index < M_NB_AA && aa_index >= 0){ 00349 return ST_aa[aa_index].volume ; 00350 }/* 00351 else { 00352 fprintf(stderr, "! Amino acid %d could not be found in property table...\n", aa_index); 00353 }*/ 00354 00355 return -1.0 ; 00356 }