NAME
Chemistry::File::PDB - Protein Data Bank file format reader/writer
SYNOPSIS
use Chemistry::File::PDB;
# read a PDB file
my $macro_mol = Chemistry::MacroMol->read("myfile.pdb");
# write a PDB file
$macro_mol->write("out.pdb");
DESCRIPTION
This module reads and writes PDB files. The PDB file format is commonly used to describe proteins, particularly those stored in the Protein Data Bank (http://www.rcsb.org/pdb/). The current version of this module only uses the ATOM and HETATM records, ignoring everything else.
This module automatically registers the 'pdb' format with Chemistry::Mol, so that PDB files may be identified and read by Chemistry::Mol->read(). For autodetection purpuses, it assumes that files ending in .pdb or having a line matching /^(ATOM |HETATM)/ are PDB files.
The PDB reader and writer is designed for dealing with Chemistry::MacroMol objects, but it can also create and use Chemistry::Mol objects by throwing some information away.
Properties
When reading and writing files, this module stores or gets some of the information in the following places:
- $domain->type
-
The residue type, such as "ARG".
- $domain->name
-
The type and sequence number, such as "ARG114". The system doesn't deal with chains yet.
- $domain->attr("pdb/sequence_number")
-
The residue sequence number as given in the PDB file.
- $atom->name
-
The PDB atom name, such as "CA".
- $atom->attr("pdb/residue_name")
-
The name of the residue, as discussed above.
- $atom->attr("pdb/serial_number")
-
The serial number for the atom, as given in the PDB file.
If some of this information is not available when writing a PDB file, this module tries to make it up (by counting the atoms or residues, for example). The default residue name for writing is UNK (unknown). Atom names are just the atomic symbols.
VERSION
0.20
SEE ALSO
Chemistry::MacroMol, Chemistry::Mol, Chemistry::File, http://www.perlmol.org/.
The PDB format description at http://www.rcsb.org/pdb/docs/format/pdbguide2.2/guide2.2_frame.html
There is another PDB reader in Perl, as part of the BioPerl project: Bio::Structure::IO::pdb.
AUTHOR
Ivan Tubert-Brohman <itub@cpan.org>