PDB(3)

NAME

pdb_read_record, pdb_parse, pdb_write_record - read and write Brookhaven Protein DataBank records

SYNOPSIS

#include <pdb.h>

pdb_record pdb_read_record(f)
FILE *f;

pdb_record pdb_parse(line_buffer)
char *line_buffer;

void pdb_write_record(f, r, name, line_num)
FILE *f;
pdb_record *r;
char *name;
int line_num;

DESCRIPTION

The routines listed above are subroutines for Brookhaven Protein Data Bank record I/O and are available in the pdb library, typically -L/usr/local/midas/lib -lpdb.

Although the header file is too long to reproduce here, it should be perused before using any of the above routines. It is typically found in /usr/local/midas/include. pdb_read_record reads the next line of input from the file f, and returns the contents parsed into a C structure. pdb_parse parses the contents of the line buffer and returns a C structure. pdb_write_record writes the contents of the PDB record (*r) to the file f. If the name is non-null, then it and the line number given (line_num) are placed in columns 72 through 80 on the line in standard PDB format.

pdb_read_record and pdb_write_record automatically handle versions 5 and 6 of the UCSFCGL's PDB scene annotation records. The version number is automatically changed when a USER PDBRUN record is read or written. Any other version number turns off the parsing of scene annotation records.

SEE ALSO

Protein Data Bank Atomic Coordinate and Bibliographic Entry Format Description, the January 1993 Protein Data Bank Quarterly Newsletter, and Couch, et. al, ``Annotating PDB Files with Scene Information'', Journal of Molecular Graphics, 13, 3, June 1995.

DIAGNOSTICS

Upon reaching the end of the file, pdb_read_record will return a record with PDB_END as its type.

NOTES

The subtype field of USERxx structure tells what the xx part was. The rest of the line, up to the card sequence portion, is the text field.

Due to the way Brookhaven encodes their files, atom names usually have leading blanks and sometimes have embedded blanks. Residue names occasionally have leading blanks too. To be entirely consistent with the PDB format, the programmer should put those blanks in before using pdb_write_record.

BUGS

Doesn't allow exact duplication of the PDB card image sorting field (columns 73 through 80).

Routines are needed to convert to and from PDB typesetting conventions in COMPND, SOURCE, AUTHOR, and JRNL records.

COPYRIGHT

Copyright c 1989 The Regents of the University of California. All rights reserved.

Redistribution and use in source and binary forms are permitted provided that the above copyright notice and this paragraph are duplicated in all such forms and that any documentation, advertising materials, and other materials related to such distribution and use acknowledge that the software was developed by the University of California, San Francisco. The name of the University may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.