What Is a .PDB File?
Protein DB
Protein Data Bank File (.pdb)
Overview
A Protein Data Bank (PDB) file describes the three-dimensional structure of a biological molecule - a protein, nucleic acid, or complex - by listing the spatial coordinates of every atom. It is the standard exchange format in structural biology, used to store the results of X-ray crystallography, NMR spectroscopy, and cryo-electron microscopy experiments.
The format is plain text with fixed-width, column-oriented records, a design that reflects its origins on punched cards in the 1970s. That rigidity is exactly why parsers must respect column positions rather than splitting on whitespace.
Note the extension collision: .pdb is also the Windows Program Database debug format, an entirely unrelated binary file. One is ASCII text beginning with HEADER; the other is binary beginning with Microsoft C/C++ MSF.
Technical Specifications
Format Details
- MIME Type:
chemical/x-pdb - File Extensions:
.pdb,.ent,.pdb.gz - Category: Data
- Encoding: ASCII text, fixed-width columns, 80 characters per line
- Maintained by: the Worldwide Protein Data Bank (wwPDB)
- First published: 1971
- Successor format: PDBx/mmCIF
Identification
PDB files are readable text, and nearly always begin with a HEADER record:
HEADER OXIDOREDUCTASE 15-MAR-99 1BRR
TITLE STRUCTURE OF A BACTERIAL ENZYME AT 1.8 ANGSTROM
COMPND MOL_ID: 1;
SOURCE ORGANISM_SCIENTIFIC: ESCHERICHIA COLI;
The presence of ATOM and HETATM records is definitive.
File Structure
Each line is a record whose type is given by the first six columns.
Metadata records
HEADER classification, deposition date, 4-character PDB ID
TITLE description of the structure
COMPND molecular components
SOURCE biological source organism
REMARK free-text notes, including experimental details and resolution
SEQRES the primary sequence, residue by residue
HELIX secondary structure: alpha helices
SHEET secondary structure: beta sheets
SSBOND disulphide bridges
Coordinate records
The core of the file:
ATOM 1 N MET A 1 20.154 34.617 27.393 1.00 32.15 N
ATOM 2 CA MET A 1 21.010 33.456 27.001 1.00 30.87 C
ATOM 3 C MET A 1 22.451 33.889 26.789 1.00 29.44 C
ATOM 4 O MET A 1 22.731 35.078 26.612 1.00 30.12 O
HETATM 1523 O HOH A 201 15.221 28.114 19.883 1.00 45.63 O
Column layout for ATOM and HETATM:
| Columns | Field |
|---|---|
| 1β6 | Record name (ATOM or HETATM) |
| 7β11 | Atom serial number |
| 13β16 | Atom name (CA, N, O, CB) |
| 18β20 | Residue name (MET, ALA, HOH) |
| 22 | Chain identifier |
| 23β26 | Residue sequence number |
| 31β38 | X coordinate (Γ ngstrΓΆms) |
| 39β46 | Y coordinate |
| 47β54 | Z coordinate |
| 55β60 | Occupancy |
| 61β66 | Temperature factor (B-factor) |
| 77β78 | Element symbol |
ATOM records describe standard residues of the biological polymer; HETATM describes everything else - water, ions, ligands, cofactors.
Models and termination
NMR structures contain multiple conformations, wrapped in MODEL/ENDMDL pairs. TER marks the end of a chain, and END closes the file.
The 4-character PDB ID
Every deposited structure has a four-character identifier such as 1BRR or 6VXX. This is a genuine limitation: the ID space is finite, and its exhaustion was one of the motivations for moving to mmCIF and, more recently, to extended identifiers.
History and Development
The Protein Data Bank was established in 1971 at Brookhaven National Laboratory with seven structures. The file format was designed for the punched-card and fixed-format FORTRAN conventions of the era, which is why fields sit at fixed column positions.
As structures grew larger, the format's limits became binding: no more than 99,999 atoms (the serial number field is five columns), a single-character chain identifier, and a fixed 80-column line. Large ribosomal and viral structures simply cannot be represented.
PDBx/mmCIF became the official archive format in 2014, removing these limits with a key-value structure derived from the Crystallographic Information File. The wwPDB now distributes mmCIF as primary, with legacy PDB files provided only where a structure fits within the old constraints. Despite this, the PDB format remains overwhelmingly common in software and teaching because of its simplicity and vast installed base.
Common Use Cases
- Structural biology research: depositing and retrieving experimentally determined structures.
- Molecular visualisation: rendering proteins in PyMOL, Chimera, or VMD.
- Drug discovery: docking small molecules into protein binding sites.
- Molecular dynamics: as the starting coordinates for simulations in GROMACS, AMBER, or NAMD.
- Structure prediction: AlphaFold and similar tools output predicted structures in PDB and mmCIF.
- Teaching: the standard format for structural biology education.
How to Open a PDB File
Molecular viewers
- PyMOL: the most widely used visualisation and figure-production tool.
- UCSF ChimeraX: modern, powerful, free for academic use.
- VMD: strong for molecular dynamics trajectories.
- Mol*: the web viewer embedded in the RCSB PDB site; open a structure in a browser with no install.
- Jmol / JSmol: Java and JavaScript viewers used widely in teaching.
Programmatic access
from Bio.PDB import PDBParser
parser = PDBParser(QUIET=True)
structure = parser.get_structure("1BRR", "1brr.pdb")
for model in structure:
for chain in model:
residues = list(chain)
print(f"chain {chain.id}: {len(residues)} residues")
# Every atom's coordinates
for atom in structure.get_atoms():
print(atom.get_name(), atom.get_coord())
Other options:
# MDAnalysis - built for trajectories
import MDAnalysis as mda
u = mda.Universe("protein.pdb")
print(u.atoms.n_atoms)
# RDKit - cheminformatics
from rdkit import Chem
mol = Chem.MolFromPDBFile("ligand.pdb")
Command line
# Fetch a structure from RCSB
wget https://files.rcsb.org/download/1BRR.pdb
# Count atoms and chains
grep -c '^ATOM' 1brr.pdb
awk '/^ATOM/ {print substr($0,22,1)}' 1brr.pdb | sort -u
# Extract a single chain
awk '/^ATOM/ && substr($0,22,1)=="A"' 1brr.pdb > chain_a.pdb
# Strip waters
grep -v 'HOH' 1brr.pdb > nowater.pdb
Note the use of substr with fixed positions rather than field splitting - whitespace-based parsing breaks when coordinate fields run together for large values.
Advantages
- Human-readable: inspectable and editable in any text editor.
- Universally supported: every structural biology tool reads it.
- Simple to parse: fixed columns require no complex grammar.
- Self-contained: metadata and coordinates in one file.
- Enormous installed base: decades of structures, scripts, and tutorials.
Limitations
- Hard size limits: 99,999 atoms, single-character chain IDs, 80-column lines.
- Superseded: mmCIF is the official archive format.
- Fragile parsing in practice: fields can run together, and whitespace-splitting parsers silently produce wrong results.
- Limited metadata model: much experimental detail is squeezed into free-text
REMARKrecords. - Extension collision: shares
.pdbwith Windows debug symbol files.
Related Formats
- PDB (Windows): the unrelated Program Database debug format.
- H5: HDF5, used for large molecular dynamics trajectory data.
- XML: the basis of PDBML, an XML representation of the same data.
- CSV: a common export target for extracted coordinate tables.
File Information
Protein DB
Data
.pdb
chemical/x-pdb
Related File Types
Other file types in the Data category you might also need:
Start Analyzing PROTEINDB Files Now
Use our free AI-powered tool to detect and analyze Protein DB files instantly with Google's Magika technology.
β‘Try File Detection Tool