Functions for parsing pdb files. More...
#include <GKlib.h>
Go to the source code of this file.
Functions | |
void | gk_freepdbf (pdbf *p) |
Frees the memory of a pdbf structure. More... | |
pdbf * | gk_readpdbfile (char *fname) |
Reads a pdb file into a pdbf structure. More... | |
void | gk_showcorruption (pdbf *p) |
Decodes the corruption bitswitch and prints any problems. More... | |
char | gk_threetoone (char *res) |
Converts three-letter amino acid codes to one-leter codes. More... | |
void | gk_writealphacarbons (pdbf *p, char *fname) |
Writes out all the alpha carbon atoms of a structure. More... | |
void | gk_writebackbone (pdbf *p, char *fname) |
Writes out all the backbone atoms of a structure in pdb format. More... | |
void | gk_writecentersofmass (pdbf *p, char *fname) |
Writes all centers of mass in pdb-format to file fname. More... | |
void | gk_writefastafrompdb (pdbf *pb, char *fname) |
Writes the sequence of residues from a pdb file. More... | |
void | gk_writefullatom (pdbf *p, char *fname) |
Writes all atoms in p in pdb-format to file fname. More... | |
Functions for parsing pdb files.
Pdb reader (parser). Loads arrays of pointers for easy backbone access.
Definition in file pdb.c.
void gk_freepdbf | ( | pdbf * | p | ) |
pdbf* gk_readpdbfile | ( | char * | fname | ) |
void gk_showcorruption | ( | pdbf * | p | ) |
Decodes the corruption bitswitch and prints any problems.
Due to the totally unreliable nature of the pdb format, reading a pdb file stores a corruption bitswitch, and this function decodes that switch and prints the result on stdout.
p | is the pdb structure to write out. |
fname | is the file name to be written. |
char gk_threetoone | ( | char * | res | ) |
void gk_writealphacarbons | ( | pdbf * | p, |
char * | fname | ||
) |
void gk_writebackbone | ( | pdbf * | p, |
char * | fname | ||
) |
void gk_writecentersofmass | ( | pdbf * | p, |
char * | fname | ||
) |
Writes all centers of mass in pdb-format to file fname.
This function takes a pdbf structure and writes out the calculated mass center information to file fname as though each one was a c-alpha.
p | is the pdbf structure to write out |
fname | is the file name to be written |
void gk_writefastafrompdb | ( | pdbf * | pb, |
char * | fname | ||
) |
Writes the sequence of residues from a pdb file.
This function takes a pdbf structure and a filename, and writes out the amino acid sequence according to the atomic coordinates. The output is in fasta format.
p | is the pdbf structure with the sequence of interest |
fname | is the file name to be written |
void gk_writefullatom | ( | pdbf * | p, |
char * | fname | ||
) |