#include "adt/list.h"
#include "mdio/file.h"
#include "mdapi/mdtypes.h"
Go to the source code of this file.
Classes | |
struct | mdio_Pdbcoord_t |
PDB coordinate reader and writer class. More... | |
struct | mdio_Pdbatom_t |
ATOM and HETATM record information. More... | |
Typedefs | |
typedef mdio_Pdbcoord_t | mdio_Pdbcoord |
PDB coordinate reader and writer class. | |
typedef mdio_Pdbatom_t | mdio_Pdbatom |
ATOM and HETATM record information. | |
Functions | |
mdio_Pdbcoord * | mdio_createPdbcoord (void) |
Constructor. | |
void | mdio_destroyPdbcoord (mdio_Pdbcoord *) |
Destructor. | |
int | mdio_readPdbcoord (mdio_Pdbcoord *, const char *name, int n_expect) |
Read PDB coordinate file. | |
MD_Dvec * | mdio_getPdbcoord (mdio_Pdbcoord *, int *nelems) |
Obtain array of coordinates. | |
mdio_Pdbatom * | mdio_getAtomPdbcoord (mdio_Pdbcoord *, int *nelems) |
Obtain array of ATOM record information. | |
int | mdio_setPdbcoord (mdio_Pdbcoord *, MD_Dvec *dvec, int nelems) |
Set an array of coordinates. | |
int | mdio_setAtomPdbcoord (mdio_Pdbcoord *, mdio_Pdbatom *atom, int nelems) |
Set an array of ATOM record information. | |
int | mdio_writePdbcoord (mdio_Pdbcoord *, const char *name) |
Write PDB coordinate file. | |
int | mdio_initializePdbcoord (mdio_Pdbcoord *) |
Alternative constructor. | |
void | mdio_cleanupPdbcoord (mdio_Pdbcoord *) |
Alternative destructor. |
mdio_Pdbcoord
class reads coordinates from PDB files, where atomic coordinates are parsed from ATOM
and HETATM
records. Note that other records are completely ignored. This class can also be used to write a PDB coordinate file, saved as ATOM
records, with preliminary remarks indicating the filename, the creator, the date, and the time.The complete PDB file specification is available at http://www.rcsb.org/pdb/docs/format/pdbguide2.2/guide2.2_frame.html .
The mdio_Pdbcoord
class is derived from mdio_File
so that error handling is performed by typecasting (mdio_Pdbcoord
*
) to (mdio_File
*
).
|
Auxiliary structure for information from PDB |
|
PDB coordinate reader and writer class. Members should be treated as private. |
|
Alternative destructor.
Use to destroy a preallocated |
|
Constructor. Creates dynamically allocated PDB coordinate file reader and writer object.
|
|
Destructor.
Frees dynamically allocated PDB coordinate file reader and writer object after freeing allocated arrays of
Note that |
|
Obtain array of
mdio_readPdbcoord() , then it will persist only until destruction of the mdio_Pdbcoord object.
|
|
Obtain array of coordinates.
mdio_readPdbcoord() , then it will persist only until destruction of the mdio_Pdbcoord object.
|
|
Alternative constructor.
Use to construct a preallocated |
|
Read PDB coordinate file.
n_expect should be set to 0. Otherwise, this value is used to validate the expected number of coordinates.
|
|
Set an array of
atom array will still belong to the user, which means that no attempt will be made to free it, and the burden of any dynamic memory management still belongs to the user.
|
|
Set an array of coordinates.
dvec array will still belong to the user, which means that no attempt will be made to free it, and the burden of any dynamic memory management still belongs to the user.
|
|
Write PDB coordinate file.
ATOM record information will be whatever is known by the mdio_Pdbcoord object, either from previous calls to mdio_setPdbcoord() and mdio_setAtomPdbcoord() or a previous read using mdio_readPdbcoord() .
|