Bioplib
Protein Structure C Library
|
Extract a PDB code from a filename. More...
Go to the source code of this file.
Functions | |
char * | blFNam2PDB (char *filename) |
Extract a PDB code from a filename.
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 FNam2PDB.c.
char* blFNam2PDB | ( | char * | filename | ) |
[in] | *filename | A PDB filename containing a PDB code |
This routine attempts to convert a filename stem to a PDB code.
All the following inputs should produce the same output of 1fbj:
$A:[PDB]PDB1FBJ.ENT C:\P1FBJ.PDB /pdb/p1fbj.pdb /pdb/pdb1fbj.pdb 1fbj.pdb 1fbjL
The routine first removes characters from the start of the filename up to the last : ] / or . It then searches for the following possible patterns (where N is a digit and X is an alphanumeric)
pdbNXXX pNXXX NXXX XXXX.pdb XXXX.ent
This should cover just about any filename which includes a legal PDB code.
Definition at line 123 of file FNam2PDB.c.