#include "pdb.h" #include "ProgramParameters.h" /* incorporates modifications by Vossman on 11.17.2000 to accomodate nucleic acids */ int A_type ; int G_type ; int U_type ; int C_type ; int GLY_type ; int ALA_type ; int VAL_type ; int LEU_type ; int ILE_type ; int PRO_type ; int MET_type ; int PHE_type ; int TYR_type ; int TRP_type ; int SER_type ; int THR_type ; int ASN_type ; int GLN_type ; int CYS_type ; int HIS_type ; int GLU_type ; int ASP_type ; int ARG_type ; int LYS_type ; int residue_character_types[128] ; extern atom_definition *default_C_atom ; extern atom_definition *default_O_atom ; extern atom_definition *default_N_atom ; /* initial things to the defaults. */ void initial_residues (char *types_file,char *res_file,int chc) { if (types_file != NULL) { FILE * ff = fopen(types_file, "r") ; if(ff ==NULL) { serious_error(1,"Failed to open types file", types_file); } else { fprintf(stderr,"Reading types file %s\n",types_file); read_atom_types (ff) ; fclose(ff) ; } } else { /* This is moved from before the "if" as compared to init.c */ fprintf(stderr,"Reading default atom type defs\n"); read_atom_types (stream_from_string(NUCPROT_RADII)) ; } if (res_file != NULL) { FILE * ff = fopen(res_file, "r") ; if(ff ==NULL) { serious_error(1,"Failed to open residue definitions file", res_file); } else { fprintf(stderr,"Reading residue definitions file %s\n",res_file); read_residue_definitions(ff) ; fclose(ff) ; } } else { /* This is moved from before the "if" as compared to init.c */ fprintf(stderr,"Reading default residue defs\n"); read_residue_definitions (stream_from_string(DEFAULT_RESIDUES)) ; } dumm_residue = find_residue_type ("DUM") ; default_atom = find_atom_definition(dumm_residue, "DUM"); default_C_atom = find_atom_definition(dumm_residue, "CDUM"); default_O_atom =find_atom_definition(dumm_residue, "ODUM"); default_N_atom = find_atom_definition(dumm_residue, "NDUM"); { residue_description * res = find_residue_type("WAT") ; first_water_type = res->index ; } { residue_description * res = find_residue_type("HOH") ; second_water_type = res->index ; } { residue_description * res = find_residue_type("GLY") ; GLY_type = res->index ;} { residue_description * res = find_residue_type("ALA") ; ALA_type = res->index ; } { residue_description * res = find_residue_type("VAL") ; VAL_type = res->index ;} { residue_description * res = find_residue_type("LEU") ; LEU_type = res->index ;} { residue_description * res = find_residue_type("ILE") ; ILE_type = res->index ;} { residue_description * res = find_residue_type("PRO") ; PRO_type = res->index ;} { residue_description * res = find_residue_type("MET") ; MET_type = res->index ;} { residue_description * res = find_residue_type("PHE") ; PHE_type = res->index ;} { residue_description * res = find_residue_type("TYR") ; TYR_type = res->index ;} { residue_description * res = find_residue_type("TRP") ; TRP_type = res->index ;} { residue_description * res = find_residue_type("SER") ; SER_type = res->index ;} { residue_description * res = find_residue_type("THR") ; THR_type = res->index ;} { residue_description * res = find_residue_type("ASN") ; ASN_type = res->index ;} { residue_description * res = find_residue_type("GLN") ; GLN_type = res->index ;} { residue_description * res = find_residue_type("CYS") ; CYS_type = res->index ;} { residue_description * res = find_residue_type("HIS") ; HIS_type = res->index ;} { residue_description * res = find_residue_type("GLU") ; GLU_type = res->index ;} { residue_description * res = find_residue_type("ASP") ; ASP_type = res->index ;} { residue_description * res = find_residue_type("ARG") ; ARG_type = res->index ;} { residue_description * res = find_residue_type("LYS") ; LYS_type = res->index ;} { int ii ; for(ii =0 ; ii< 128; ii++) residue_character_types[ii] = -1 ; residue_character_types['G']= residue_character_types['g'] = GLY_type; residue_character_types['A']= residue_character_types['a'] = ALA_type; residue_character_types['V']= residue_character_types['v'] = VAL_type; residue_character_types['L']= residue_character_types['l'] = LEU_type; residue_character_types['I']= residue_character_types['i'] = ILE_type; residue_character_types['M']= residue_character_types['m'] = MET_type; residue_character_types['P']= residue_character_types['p'] = PRO_type; residue_character_types['F']= residue_character_types['f'] = PHE_type; residue_character_types['Y']= residue_character_types['y'] = TYR_type; residue_character_types['W']= residue_character_types['w'] = TRP_type; residue_character_types['S']= residue_character_types['s'] = SER_type; residue_character_types['T']= residue_character_types['t'] = THR_type; residue_character_types['C']= residue_character_types['c'] = CYS_type; residue_character_types['K']= residue_character_types['k'] = LYS_type; residue_character_types['R']= residue_character_types['r'] = ARG_type; residue_character_types['D']= residue_character_types['d'] = ASP_type; residue_character_types['E']= residue_character_types['e'] = GLU_type; residue_character_types['N']= residue_character_types['n'] = ASN_type; residue_character_types['Q']= residue_character_types['q'] = GLN_type; residue_character_types['H']= residue_character_types['h'] = HIS_type; } } void default_initialization (void) { initial_residues_nt(NULL,NULL,1); } void initial_residues_nt (char *types_file, char *res_file, int chc) { if (types_file != NULL) { FILE * ff = fopen(types_file, "r") ; if(ff ==NULL) { serious_error(1,"Failed to open types file", types_file); } else { fprintf(stderr,"Reading types file %s\n",types_file); read_atom_types (ff) ; fclose(ff) ; } } else { /* This is moved from before the "if" as compared to init.c */ fprintf(stderr,"Reading default atom type defs\n"); read_atom_types (stream_from_string(NUCPROT_RADII)) ; } if (res_file != NULL) { FILE * ff = fopen(res_file, "r") ; if(ff == NULL) { serious_error(1,"Failed to open residue definitions file", res_file); } else { fprintf(stderr,"Reading residue definitions file %s\n",res_file); read_residue_definitions(ff) ; fclose(ff) ; } } else { /* This is moved from before the "if" as compared to init.c */ fprintf(stderr,"Reading default residue defs\n"); read_residue_definitions (stream_from_string(DEFAULT_RESIDUES)) ; } dumm_residue = find_residue_type ("DUM") ; default_atom = find_atom_definition(dumm_residue, "DUM"); default_C_atom = find_atom_definition(dumm_residue, "CDUM"); default_O_atom =find_atom_definition(dumm_residue, "ODUM"); default_N_atom = find_atom_definition(dumm_residue, "NDUM"); { residue_description * res = find_residue_type("WAT") ; first_water_type = res->index ; } { residue_description * res = find_residue_type("HOH") ; second_water_type = res->index ; } { residue_description * res = find_residue_type(" A") ; A_type = res->index ;} { residue_description * res = find_residue_type(" G") ; G_type = res->index ;} { residue_description * res = find_residue_type(" U") ; U_type = res->index ;} { residue_description * res = find_residue_type(" C") ; C_type = res->index ;} { residue_description * res = find_residue_type("GLY") ; GLY_type = res->index ;} { residue_description * res = find_residue_type("ALA") ; ALA_type = res->index ; } { residue_description * res = find_residue_type("VAL") ; VAL_type = res->index ;} { residue_description * res = find_residue_type("LEU") ; LEU_type = res->index ;} { residue_description * res = find_residue_type("ILE") ; ILE_type = res->index ;} { residue_description * res = find_residue_type("PRO") ; PRO_type = res->index ;} { residue_description * res = find_residue_type("MET") ; MET_type = res->index ;} { residue_description * res = find_residue_type("PHE") ; PHE_type = res->index ;} { residue_description * res = find_residue_type("TYR") ; TYR_type = res->index ;} { residue_description * res = find_residue_type("TRP") ; TRP_type = res->index ;} { residue_description * res = find_residue_type("SER") ; SER_type = res->index ;} { residue_description * res = find_residue_type("THR") ; THR_type = res->index ;} { residue_description * res = find_residue_type("ASN") ; ASN_type = res->index ;} { residue_description * res = find_residue_type("GLN") ; GLN_type = res->index ;} { residue_description * res = find_residue_type("CYS") ; CYS_type = res->index ;} { residue_description * res = find_residue_type("HIS") ; HIS_type = res->index ;} { residue_description * res = find_residue_type("GLU") ; GLU_type = res->index ;} { residue_description * res = find_residue_type("ASP") ; ASP_type = res->index ;} { residue_description * res = find_residue_type("ARG") ; ARG_type = res->index ;} { residue_description * res = find_residue_type("LYS") ; LYS_type = res->index ;} { int ii ; for(ii =0 ; ii< 128; ii++) residue_character_types[ii] = -1 ; residue_character_types['1']= G_type; residue_character_types['2']= A_type; residue_character_types['3']= U_type; residue_character_types['4']= C_type; residue_character_types['G']= residue_character_types['g'] = GLY_type; residue_character_types['A']= residue_character_types['a'] = ALA_type; residue_character_types['V']= residue_character_types['v'] = VAL_type; residue_character_types['L']= residue_character_types['l'] = LEU_type; residue_character_types['I']= residue_character_types['i'] = ILE_type; residue_character_types['M']= residue_character_types['m'] = MET_type; residue_character_types['P']= residue_character_types['p'] = PRO_type; residue_character_types['F']= residue_character_types['f'] = PHE_type; residue_character_types['Y']= residue_character_types['y'] = TYR_type; residue_character_types['W']= residue_character_types['w'] = TRP_type; residue_character_types['S']= residue_character_types['s'] = SER_type; residue_character_types['T']= residue_character_types['t'] = THR_type; residue_character_types['C']= residue_character_types['c'] = CYS_type; residue_character_types['K']= residue_character_types['k'] = LYS_type; residue_character_types['R']= residue_character_types['r'] = ARG_type; residue_character_types['D']= residue_character_types['d'] = ASP_type; residue_character_types['E']= residue_character_types['e'] = GLU_type; residue_character_types['N']= residue_character_types['n'] = ASN_type; residue_character_types['Q']= residue_character_types['q'] = GLN_type; residue_character_types['H']= residue_character_types['h'] = HIS_type; } }