Bioplib
Protein Structure C Library
|
Parse a residue specification. More...
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include "macros.h"
#include "SysDefs.h"
#include "pdb.h"
Go to the source code of this file.
Functions | |
BOOL | blParseResSpec (char *spec, char *chain, int *resnum, char *insert) |
BOOL | blDoParseResSpec (char *inSpec, char *chain, int *resnum, char *insert, BOOL uppercaseresspec) |
void | blPrintResSpecHelp (FILE *fp) |
void | blBuildResSpec (PDB *p, char *resspec) |
Parse a residue specification.
This code is NOT IN THE PUBLIC DOMAIN, but it may be copied according to the conditions laid out in the accompanying file COPYING.DOC.
The code may be modified as required, but any modifications must be documented so that the person responsible can be identified.
The code may not be sold commercially or included as part of a commercial product except as described in the file COPYING.DOC.
Definition in file ParseRes.c.
void blBuildResSpec | ( | PDB * | p, |
char * | resspec | ||
) |
[in] | *p | PDB record pointer |
Builds a residue specification string for a PDB record
Definition at line 352 of file ParseRes.c.
BOOL blDoParseResSpec | ( | char * | inSpec, |
char * | chain, | ||
int * | resnum, | ||
char * | insert, | ||
BOOL | uppercaseresspec | ||
) |
[in] | *inSpec | Residue specification |
[out] | *chain | Chain label |
[out] | *resnum | Residue number |
[out] | *insert | Insert label |
[in] | uppercaseresspec | Convert spec to upper case. |
Note that chain and insert must be arrays of at least 2 characters, not character pointers
Splits up a residue specification of the form [c][.]num[i] into chain, resnum and insert. Chain and insert are optional and will be set to spaces if not specified. If uppercaseresspec equals TRUE, the spec is upper cased before processing
Multi-letter chain IDs can be parsed. Additionally, chain IDs with numerical characters can be parsed if a period is used to separate the chain from the residue number.
Definition at line 214 of file ParseRes.c.
BOOL blParseResSpec | ( | char * | spec, |
char * | chain, | ||
int * | resnum, | ||
char * | insert | ||
) |
[in] | *spec | Residue specification |
[out] | *chain | Chain label |
[out] | *resnum | Residue number |
[out] | *insert | Insert label |
Note that chain and insert must be arrays of at least 2 characters, not character pointers
Splits up a residue specification of the form [c][.]num[i] into chain, resnum and insert. Chain and insert are optional and will be set to spaces if not specified. Converts the resiude specification to upper case before processing.
Moved the code that was here to a new function, DoParseResSpec() and made this function just call that new function. See DoParseResSpec()'s comments for notes on previous changes. This move is to allow the underlying function to have an extra parameter to specify whether or not the residue specification should be upper cased (without affecting code that calls this function).
Definition at line 158 of file ParseRes.c.
void blPrintResSpecHelp | ( | FILE * | fp | ) |
Definition at line 330 of file ParseRes.c.