Bioplib
Protein Structure C Library
|
Write a PDB file from a linked list. More...
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include "MathType.h"
#include "pdb.h"
#include "macros.h"
#include "hash.h"
#include "fsscanf.h"
Go to the source code of this file.
Macros | |
#define | WRITEPDB_MAIN |
Functions | |
int | blWritePDB (FILE *fp, PDB *pdb) |
BOOL | blFormatCheckWritePDB (PDB *pdb) |
int | blWritePDBAsPDBorGromos (FILE *fp, PDB *pdb, BOOL doGromos) |
void | blWriteTerCard (FILE *fp, PDB *p) |
void | blWritePDBRecord (FILE *fp, PDB *pdb) |
void | blWritePDBRecordAtnam (FILE *fp, PDB *pdb) |
BOOL | blWritePDBAsPDBML (FILE *fp, PDB *pdb) |
void | blSetElementSymbolFromAtomName (char *element, char *atom_name) |
void | blWriteGromosPDB (FILE *fp, PDB *pdb) |
void | blWriteGromosPDBRecord (FILE *fp, PDB *pdb) |
BOOL | blWriteWholePDB (FILE *fp, WHOLEPDB *wpdb) |
void | blWriteWholePDBHeader (FILE *fp, WHOLEPDB *wpdb) |
void | blWriteWholePDBTrailer (FILE *fp, WHOLEPDB *wpdb, int numTer) |
void | blWriteWholePDBHeaderNoRes (FILE *fp, WHOLEPDB *wpdb) |
Write a PDB file from a linked list.
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.
This routine will write a .PDB file of any size from a linked list of the protein structure. This list is contained in a linked set of structures of type pdb_entry. The structure is set up by including the file "pdb.h". For details of the structure, see this file.
[in] | *fp | A pointer to the file to write |
[in] | *pdb | The start of the PDB linked list. |
Definition in file WritePDB.c.
#define WRITEPDB_MAIN |
Definition at line 173 of file WritePDB.c.
[in] | *pdb | PDB linked list to write |
Checks PDB linked list is compatible with PDB-formatted text file.
Definition at line 269 of file WritePDB.c.
void blSetElementSymbolFromAtomName | ( | char * | element, |
char * | atom_name | ||
) |
[out] | *element | Element symbol |
[in] | *atom_name | Atom name |
Set the element symbol (columns 77-78 of a pdb file) based on the atom name (columns 13-16 of a pdb file).
The atom name is stored in the PDB data stucture as atnam_raw.
Definition at line 1433 of file WritePDB.c.
void blWriteGromosPDB | ( | FILE * | fp, |
PDB * | pdb | ||
) |
[in] | *fp | PDB file pointer to be written |
[in] | *pdb | PDB linked list to write |
Write a PDB linked list by calls to WritePDBRecord()
Definition at line 1491 of file WritePDB.c.
void blWriteGromosPDBRecord | ( | FILE * | fp, |
PDB * | pdb | ||
) |
[in] | *fp | PDB file pointer to be written |
[in] | *pdb | PDB linked list record to write |
Write a PDB record
Definition at line 1517 of file WritePDB.c.
int blWritePDB | ( | FILE * | fp, |
PDB * | pdb | ||
) |
[in] | *fp | PDB file pointer to be written |
[in] | *pdb | PDB linked list to write |
Write a PDB linked list...
Definition at line 223 of file WritePDB.c.
[in] | *fp | PDB file pointer to be written |
[in] | *pdb | PDB linked list to write |
Write a PDB linked list in PDBML format.
Definition at line 525 of file WritePDB.c.
[in] | *fp | PDB file pointer to be written |
[in] | *pdb | PDB linked list to write |
Write a PDB linked list by calls to WritePDBRecord()
Definition at line 308 of file WritePDB.c.
void blWritePDBRecord | ( | FILE * | fp, |
PDB * | pdb | ||
) |
[in] | *fp | PDB file pointer to be written |
[in] | *pdb | PDB linked list record to write |
Write a PDB record
Definition at line 415 of file WritePDB.c.
void blWritePDBRecordAtnam | ( | FILE * | fp, |
PDB * | pdb | ||
) |
[in] | *fp | PDB file pointer to be written |
[in] | *pdb | PDB linked list record to write |
Write a PDB record using the data in atnam rather than atnam_raw
Definition at line 471 of file WritePDB.c.
void blWriteTerCard | ( | FILE * | fp, |
PDB * | p | ||
) |
[in] | *fp | File pointer |
[in] | *p | PDB record pointer |
Prints a TER card in the new PDB format - i.e. with the residue information for the previous ATOM/HETATM, rather than just printing TER
Definition at line 382 of file WritePDB.c.
[in] | *fp | File pointer |
[in] | *wpdb | Whole PDB structure pointer |
Writes a PDB file including header and trailer information. Output in PDBML-format if flags set.
Definition at line 1557 of file WritePDB.c.
void blWriteWholePDBHeader | ( | FILE * | fp, |
WHOLEPDB * | wpdb | ||
) |
[in] | *fp | File pointer |
[in] | *wpdb | Whole PDB structure pointer |
Writes the header of a PDB file
Definition at line 1608 of file WritePDB.c.
void blWriteWholePDBHeaderNoRes | ( | FILE * | fp, |
WHOLEPDB * | wpdb | ||
) |
[in] | *fp | File pointer |
[in] | *wpdb | Whole PDB structure pointer |
Writes the header of a PDB file, but skips any records that include residue numbers for cases where these may have changed.
Skips: REMARK 500 DBREF HELIX SHEET SSBOND CISPEP SEQADV MODRES HET SITE REMARK 465 REMARK 470 REMARK 475 REMARK 480 REMARK 525 REMARK 610 REMARK 615 REMARK 620 REMARK 630 REMARK 3
Definition at line 1809 of file WritePDB.c.
void blWriteWholePDBTrailer | ( | FILE * | fp, |
WHOLEPDB * | wpdb, | ||
int | numTer | ||
) |
[in] | *fp | File pointer |
[in] | *wpdb | Whole PDB structure pointer |
[in] | numTer | Number of TER cards |
Writes the trailer of a PDB file
Definition at line 1643 of file WritePDB.c.