117 char currchain[2] =
" ",
128 if((seqres = RdSeqRes(fp))==
NULL)
132 strncpy(currchain,&(seqres->
string[11]),1);
136 strncpy(chain,&(s->string[11]),1);
139 strncpy(currchain,chain,1);
147 if((seqs=(
char **)malloc((*nchains) *
sizeof(
char *)))==
NULL)
155 strcpy(currchain,
"");
158 fsscanf(s->string,
"%11x%1s%5d",chain,&nres);
161 strcpy(currchain,chain);
162 if((seqs[chainnum]=(
char *)malloc((nres+1)*
sizeof(
char)))
175 strncpy(currchain,&(seqres->
string[11]),1);
178 fsscanf(s->string,
"%11x%1s%7x%4s%4s%4s%4s%4s%4s%4s%4s%4s%4s%4s%4s%4s",
179 chain,res[0],res[1],res[2],res[3],res[4],res[5],res[6],
180 res[7],res[8],res[9],res[10],res[11],res[12]);
184 seqs[chainnum][nres] =
'\0';
185 strcpy(currchain,chain);
196 seqs[chainnum][nres++] =
blThrone(res[i]);
200 seqs[chainnum][nres] =
'\0';
232 char currchain[2] =
" ",
243 if((seqres = RdSeqResHeader(wpdb))==
NULL)
247 strncpy(currchain,&(seqres->
string[11]),1);
251 strncpy(chain,&(s->string[11]),1);
254 strncpy(currchain,chain,1);
262 if((seqs=(
char **)malloc((*nchains) *
sizeof(
char *)))==
NULL)
270 strcpy(currchain,
"");
273 fsscanf(s->string,
"%11x%1s%5d",chain,&nres);
276 strcpy(currchain,chain);
277 if((seqs[chainnum]=(
char *)malloc((nres+1)*
sizeof(
char)))
290 strncpy(currchain,&(seqres->
string[11]),1);
293 fsscanf(s->string,
"%11x%1s%7x%4s%4s%4s%4s%4s%4s%4s%4s%4s%4s%4s%4s%4s",
294 chain,res[0],res[1],res[2],res[3],res[4],res[5],res[6],
295 res[7],res[8],res[9],res[10],res[11],res[12]);
299 seqs[chainnum][nres] =
'\0';
300 strcpy(currchain,chain);
311 seqs[chainnum][nres++] =
blThrone(res[i]);
315 seqs[chainnum][nres] =
'\0';
342 while(fgets(buffer,
MAXBUFF, fp))
344 if(!strncmp(buffer,
"SEQRES",6))
376 if(!strncmp(s->string,
"SEQRES",6))
char ** blReadSeqresWholePDB(WHOLEPDB *wpdb, int *nchains)
char ** blReadSeqresPDB(FILE *fp, int *nchains)
int fsscanf(char *buffer, char *format,...)
Header file for sequence handling.
Include file for fsscanf()
char blThrone(char *three)
STRINGLIST * blStoreString(STRINGLIST *StringList, char *string)
Header file for general purpose routines.
#define CHAINMATCH(chain1, chain2)