215 char *insert,
BOOL uppercaseresspec)
225 strncpy(spec, inSpec, 64);
231 if (uppercaseresspec ==
TRUE)
240 for(ptr2=ptr,i=0;*ptr2;ptr2++,i++)
247 strncpy(chain,ptr,i);
262 if(chain_found ==
FALSE)
264 for(ptr2=ptr,i=0;*ptr2;ptr2++,i++)
266 if(!isdigit(*ptr2) && (*ptr2 !=
'-'))
281 if(chain_found ==
FALSE)
291 for(ptr2 = ptr; *ptr2; ptr2++)
296 if(!isdigit(*ptr2) && ((ptr2!=ptr)||(*ptr2 !=
'-')))
307 if(sscanf(ptr,
"%d",resnum) == 0)
332 fprintf(fp,
"resspec is a residue specification of the form \
333 [c[.]]nnn[i] where c is\n");
334 fprintf(fp,
"a (multi-character) chain label optionally followed by \
336 fprintf(fp,
"if the chain label is numeric), nnn is a residue number \
338 fprintf(fp,
"optional insert code.\n");
354 int chainLabelLen = strlen(p->
chain);
358 if((chainLabelLen > 1) || isdigit(p->
chain[chainLabelLen-1]))
360 strcpy(format,
"%s.%d%s");
364 strcpy(format,
"%s%d%s");
Include file for PDB routines.
void blBuildResSpec(PDB *p, char *resspec)
BOOL blDoParseResSpec(char *inSpec, char *chain, int *resnum, char *insert, BOOL uppercaseresspec)
void blPrintResSpecHelp(FILE *fp)
#define KILLLEADSPACES(y, x)
System-type variable type definitions.
char chain[blMAXCHAINLABEL]
BOOL blParseResSpec(char *spec, char *chain, int *resnum, char *insert)