#include "aas.h" // if unknown, return -1 int aastr2int(char* name) { if (strncmp(name,"ALA",3)==0) return 0; if (strncmp(name,"CYS",3)==0) return 1; if (strncmp(name,"ASP",3)==0) return 2; if (strncmp(name,"GLU",3)==0) return 3; if (strncmp(name,"PHE",3)==0) return 4; if (strncmp(name,"GLY",3)==0) return 5; if (strncmp(name,"HIS",3)==0) return 6; if (strncmp(name,"ILE",3)==0) return 7; if (strncmp(name,"LYS",3)==0) return 8; if (strncmp(name,"LEU",3)==0) return 9; if (strncmp(name,"MET",3)==0) return 10; if (strncmp(name,"ASN",3)==0) return 11; if (strncmp(name,"PRO",3)==0) return 12; if (strncmp(name,"GLN",3)==0) return 13; if (strncmp(name,"ARG",3)==0) return 14; if (strncmp(name,"SER",3)==0) return 15; if (strncmp(name,"THR",3)==0) return 16; if (strncmp(name,"VAL",3)==0) return 17; if (strncmp(name,"TRP",3)==0) return 18; if (strncmp(name,"TYR",3)==0) return 19; return -1; } char* aaint2str(int x) { switch (x) { case 0: return "ALA"; case 1: return "CYS"; case 2: return "ASP"; case 3: return "GLU"; case 4: return "PHE"; case 5: return "GLY"; case 6: return "HIS"; case 7: return "ILE"; case 8: return "LYS"; case 9: return "LEU"; case 10: return "MET"; case 11: return "ASN"; case 12: return "PRO"; case 13: return "GLN"; case 14: return "ARG"; case 15: return "SER"; case 16: return "THR"; case 17: return "VAL"; case 18: return "TRP"; case 19: return "TYR"; default: return "???"; } }