ajpdbio.c
All constructors return a pointer to a new instance. It is the
responsibility of the user to first destroy any previous instance. The
target pointer does not need to be initialised to NULL, but it is good
programming practice to do so anyway.
Functions: ajPdbReadRawNew
Reads a pdb file and returns a pointer to a filled Pdb object.
The pdb id is derived from the file name and extension of the pdb file
(these are passed in by argument).
Synopsis
Prototype
AjPPdb ajPdbReadRawNew (
AjPFile inf,
const AjPStr pdbid,
ajint min_chain_size,
ajint max_mismatch,
ajint max_trim,
AjBool camask,
AjBool camask1,
AjBool atommask,
AjPFile flog
);
Type | Name | Read/Write | Description |
AjPFile | inf | Modify | Pointer to pdb file |
const AjPStr | pdbid | Input | PDB id code of pdb file |
ajint | min_chain_size | Input | Minimum number of amino acids in a chain |
ajint | max_mismatch | Input | Maximum number of permissible mismatches
between the ATOM and SEQRES sequences |
ajint | max_trim | Input | Max. no. residues to trim when checking
for missing N- or C-terminal ATOM or
SEQRES sequences. |
AjBool | camask | Input | Whether to mask non-amino acid groups
within protein chains which do not have a C-alpha atom. |
AjBool | camask1 | Input | Whether to mask amino acid residues
within protein chains which do not have a C-alpha atom. |
AjBool | atommask | Input | Whether to mask residues or groups
in protein chains with a single atom only. |
AjPFile | flog | Modify | Pointer to log file (build diagnostics) |
AjPPdb | | RETURN | pdb object pointer, or NULL on failure. |
Input
pdbid: | (Input) | PDB id code of pdb file |
min_chain_size: | (Input) | Minimum number of amino acids in a chain |
max_mismatch: | (Input) | Maximum number of permissible mismatches
between the ATOM and SEQRES sequences |
max_trim: | (Input) | Max. no. residues to trim when checking
for missing N- or C-terminal ATOM or
SEQRES sequences. |
camask: | (Input) | Whether to mask non-amino acid groups
within protein chains which do not have a C-alpha atom. |
camask1: | (Input) | Whether to mask amino acid residues
within protein chains which do not have a C-alpha atom. |
atommask: | (Input) | Whether to mask residues or groups
in protein chains with a single atom only. |
Input & Output
inf: | (Modify) | Pointer to pdb file |
flog: | (Modify) | Pointer to log file (build diagnostics) |
Returns
AjPPdb: | pdb object pointer, or NULL on failure. |
Description
Reads a pdb file and returns a pointer to a filled Pdb object.
The pdb id is derived from the file name and extension of the pdb file
(these are passed in by argument).
See Also
See other functions in this section
Availability
In release 6.4.0
These functions are used for formatted input and output to file.
Functions: ajPdbWriteDomainRecordRaw ajPdbWriteRecordRaw ajPdbWriteAllRaw ajPdbWriteDomainRaw
Writes lines to a PDB file. What is written depends upon the mode:
ajHEADER_DOMAIN Header line for domain PDB file.
ajSEQRES_DOMAIN SEQRES records for domain.
ajATOMPDB_DOMAIN ATOM records for domain using original residue numbers.
ajATOMIDX_DOMAIN ATOM records for domain using residues numbers that give
correct index into SEQRES sequence.
Synopsis
Prototype
AjBool ajPdbWriteDomainRecordRaw (
ajint mode,
const AjPPdb pdb,
ajint mod,
const AjPScop scop,
AjPFile outf,
AjPFile errf
);
Type | Name | Read/Write | Description |
ajint | mode | Input | Mode that controls what is printed: one of
ajHEADER_DOMAIN, ajSEQRES_DOMAIN,
ajATOMPDB_DOMAIN, ajATOMIDX_DOMAIN |
const AjPPdb | pdb | Input | Pdb object |
ajint | mod | Input | Model number |
const AjPScop | scop | Input | Scop object for domain |
AjPFile | outf | Output | Output file stream |
AjPFile | errf | Output | Output file stream for error messages |
AjBool | | RETURN | True on success |
Input
mode: | (Input) | Mode that controls what is printed: one of
ajHEADER_DOMAIN, ajSEQRES_DOMAIN,
ajATOMPDB_DOMAIN, ajATOMIDX_DOMAIN |
pdb: | (Input) | Pdb object |
mod: | (Input) | Model number |
scop: | (Input) | Scop object for domain |
Output
outf: | (Output) | Output file stream |
errf: | (Output) | Output file stream for error messages |
Returns
Description
Writes lines to a PDB file. What is written depends upon the mode:
ajHEADER_DOMAIN Header line for domain PDB file.
ajSEQRES_DOMAIN SEQRES records for domain.
ajATOMPDB_DOMAIN ATOM records for domain using original residue numbers.
ajATOMIDX_DOMAIN ATOM records for domain using residues numbers that give
correct index into SEQRES sequence.
See Also
See other functions in this section
Availability
In release 6.4.0
Writes lines in pdb format to a PDB file. What is written depends upon
the mode:
ajSEQRES_CHAIN SEQRES records for a chain.
ajATOMPDB_CHAIN ATOM records for chain using original residue numbers.
ajATOMIDX_CHAIN ATOM records for domain using residues numbers that
give correct index into SEQRES sequence.
ajHETEROGEN ATOM line for a heterogen (small ligand).
ajHEADER Header line.
ajTITLE Title line.
ajCOMPND COMPND records (info. on compound)
ajSOURCE SOURCE records (info. on protein source)
ajEMPTYREMARK An empty REMARK record.
ajRESOLUTION Record with resolution of the structure.
Synopsis
Prototype
AjBool ajPdbWriteRecordRaw (
ajint mode,
const AjPPdb pdb,
ajint mod,
ajint chn,
AjPFile outf,
AjPFile errf
);
Type | Name | Read/Write | Description |
ajint | mode | Input | Mode that controls what is printed: one of
ajSEQRES_CHAIN, ajATOMPDB_CHAIN, ajATOMIDX_CHAIN,
ajHETEROGEN, ajHEADER, ajTITLE,ajCOMPND,ajSOURCE,
ajEMPTYREMARK,ajRESOLUTION. |
const AjPPdb | pdb | Input | Pdb object |
ajint | mod | Input | Model number. |
ajint | chn | Input | Chain number. |
AjPFile | outf | Output | Output file stream |
AjPFile | errf | Output | Output file stream for error messages |
AjBool | | RETURN | True on success |
Input
mode: | (Input) | Mode that controls what is printed: one of
ajSEQRES_CHAIN, ajATOMPDB_CHAIN, ajATOMIDX_CHAIN,
ajHETEROGEN, ajHEADER, ajTITLE,ajCOMPND,ajSOURCE,
ajEMPTYREMARK,ajRESOLUTION. |
pdb: | (Input) | Pdb object |
mod: | (Input) | Model number. |
chn: | (Input) | Chain number. |
Output
outf: | (Output) | Output file stream |
errf: | (Output) | Output file stream for error messages |
Returns
Description
Writes lines in pdb format to a PDB file. What is written depends upon
the mode:
ajSEQRES_CHAIN SEQRES records for a chain.
ajATOMPDB_CHAIN ATOM records for chain using original residue numbers.
ajATOMIDX_CHAIN ATOM records for domain using residues numbers that
give correct index into SEQRES sequence.
ajHETEROGEN ATOM line for a heterogen (small ligand).
ajHEADER Header line.
ajTITLE Title line.
ajCOMPND COMPND records (info. on compound)
ajSOURCE SOURCE records (info. on protein source)
ajEMPTYREMARK An empty REMARK record.
ajRESOLUTION Record with resolution of the structure.
See Also
See other functions in this section
Availability
In release 6.4.0
Writes a pdb file for a protein.
Synopsis
Prototype
AjBool ajPdbWriteAllRaw (
ajint mode,
const AjPPdb pdb,
AjPFile outf,
AjPFile errf
);
Type | Name | Read/Write | Description |
ajint | mode | Input | Either ajPdb or ajIDX if the original or
corrected residue number is to be used. |
const AjPPdb | pdb | Input | Pdb object |
AjPFile | outf | Output | Output file stream |
AjPFile | errf | Output | Output file stream for error messages |
AjBool | | RETURN | True on success |
Input
mode: | (Input) | Either ajPdb or ajIDX if the original or
corrected residue number is to be used. |
pdb: | (Input) | Pdb object |
Output
outf: | (Output) | Output file stream |
errf: | (Output) | Output file stream for error messages |
Returns
Description
Writes a pdb file for a protein.
See Also
See other functions in this section
Availability
In release 6.4.0
Writes a pdb file for a SCOP domain. Where coordinates for multiple
models (e.g. NMR structures) are given, data for model 1 are written.
Coordinates are taken from a Pdb structure, domain definition is taken
from a Scop structure.
In the pdb file, the coordinates are presented as belonging to a single
chain regardless of how many chains the domain comprised.
Coordinates for heterogens are NOT written to file.
Synopsis
Prototype
AjBool ajPdbWriteDomainRaw (
ajint mode,
const AjPPdb pdb,
const AjPScop scop,
AjPFile outf,
AjPFile errf
);
Type | Name | Read/Write | Description |
ajint | mode | Input | Either ajPDB or ajIDX if the original or
corrected residue number is to be used. |
const AjPPdb | pdb | Input | Pdb object |
const AjPScop | scop | Input | Scop object |
AjPFile | outf | Output | Output file stream |
AjPFile | errf | Output | Output file stream for error messages |
AjBool | | RETURN | True on success |
Input
mode: | (Input) | Either ajPDB or ajIDX if the original or
corrected residue number is to be used. |
pdb: | (Input) | Pdb object |
scop: | (Input) | Scop object |
Output
outf: | (Output) | Output file stream |
errf: | (Output) | Output file stream for error messages |
Returns
Description
Writes a pdb file for a SCOP domain. Where coordinates for multiple
models (e.g. NMR structures) are given, data for model 1 are written.
Coordinates are taken from a Pdb structure, domain definition is taken
from a Scop structure.
In the pdb file, the coordinates are presented as belonging to a single
chain regardless of how many chains the domain comprised.
Coordinates for heterogens are NOT written to file.
See Also
See other functions in this section
Availability
In release 6.4.0