How to read a PDB file
A PDB file is a plain text file that lists the position of every atom in a molecular structure, plus information about how the structure was determined. You can open one in any text editor. This guide walks through the parts that matter most, using two classic entries: crambin, a small plant protein (1CRN), and human deoxyhemoglobin (4HHB).
Open crambin (1CRN) in the viewer
Fixed columns and record types
The format dates from the 1970s, the early years of the Protein Data Bank, and its 80-column lines mirror the punched cards of that era. Every piece of information lives in a fixed range of columns rather than being separated by commas or tabs. That is why a PDB file looks neatly aligned, and why editing it by hand can break it: shift a number by one column and a program may read the wrong value.
The first six characters of each line name its record type. The main ones, roughly in the order they appear, are:
- HEADER, TITLE, COMPND, SOURCE, AUTHOR: what the molecule is, where it came from and who solved it.
- REMARK: numbered notes.
REMARK 2gives the resolution (1.50 Å for crambin);REMARK 350describes the biological assembly. - SEQRES: the full sequence of each chain, including residues that were not seen in the experiment.
- HELIX and SHEET: secondary structure.
- SSBOND: disulfide bonds.
- ATOM and HETATM: atomic coordinates, one atom per line.
- TER: the end of a polymer chain.
- CONECT: explicit bonds between atoms.
- END: the end of the file.
Anatomy of an ATOM line
Here is the first atom of crambin, the backbone nitrogen of threonine 1:
ATOM 1 N THR A 1 17.047 14.099 3.625 1.00 13.79 N
| Columns | Field | Value here |
|---|---|---|
| 1–6 | Record type | ATOM |
| 7–11 | Atom serial number | 1 |
| 13–16 | Atom name | N (backbone nitrogen) |
| 17 | Alternate location indicator | blank |
| 18–20 | Residue name | THR (threonine) |
| 22 | Chain identifier | A |
| 23–26 | Residue number | 1 |
| 27 | Insertion code | blank |
| 31–38, 39–46, 47–54 | x, y, z coordinates in Å | 17.047, 14.099, 3.625 |
| 55–60 | Occupancy | 1.00 |
| 61–66 | B-factor (temperature factor) | 13.79 |
| 77–78 | Element symbol | N |
Atom names follow a convention: N, CA, C and O are the backbone, and side-chain atoms are labelled with Greek letters spelled as Latin ones (CB for beta, CG for gamma, and so on). Note that CA means alpha carbon, not calcium; the element column resolves this.
ATOM versus HETATM
ATOM records hold the standard building blocks of polymers: the 20 common amino acids and the nucleotides of DNA and RNA. HETATM ("hetero atom") records hold everything else: ligands, cofactors, metal ions, water and chemically modified residues.
In hemoglobin, each of the four chains carries a heme group. Its iron atom in chain A looks like this:
HETATM 4431 FE HEM A 142 18.362 18.488 23.755 1.00 18.07 FE
HEM is the three-letter code for heme in the PDB Chemical Component Dictionary. Water appears as HOH. Viewers often hide water by default because crystal structures can contain hundreds of water molecules.
Occupancy and B-factor
Occupancy is the fraction of molecules in the crystal in which the atom sits at this position. Most atoms have 1.00. When a side chain adopts two conformations, the file lists both with alternate location indicators A and B in column 17, and their occupancies add up to 1.00 (for example 0.60 and 0.40).
The B-factor, also called the temperature or displacement factor, measures how smeared out the atom's electron density is, in Ų. It combines thermal vibration with static disorder between copies of the molecule. Low values (roughly 10–30 Ų in a well-ordered protein) mean a well-defined position; high values usually point to flexible loops, chain termini or surface side chains. Try coloring crambin by B-factor: 1CRN colored by B-factor.
Other methods reuse the column. In NMR structures it often carries no physical meaning, and AlphaFold models store a confidence score there instead (see pLDDT explained).
HELIX, SHEET and CONECT
Secondary structure is listed before the coordinates. Crambin's first helix is:
HELIX 1 H1 ILE A 7 PRO A 19 13/10 CONFORMATION RES 17,19 13
It runs from isoleucine 7 to proline 19 in chain A. The 1 before the comment is the helix class (1 is a right-handed alpha helix, 5 a right-handed 3₁₀ helix) and the final 13 is its length in residues. SHEET records work the same way for each strand, with one extra field, the sense: 0 for the first strand, 1 for a strand parallel to the previous one and −1 for antiparallel. Crambin's two strands, residues 1–4 and 32–35, are antiparallel.
CONECT records list explicit bonds by serial number. Bonds inside standard residues are not listed, because every program knows how an alanine is connected. CONECT is used for ligands, metal coordination and disulfide bridges. In crambin, CONECT 20 282 links the sulfur of cysteine 3 to the sulfur of cysteine 40, one of the protein's three disulfide bonds. In hemoglobin, CONECT 650 4431 joins histidine 87 of chain A to the heme iron.
Limits of the format, and mmCIF
Fixed columns impose hard limits: five digits for atom serial numbers (99,999 atoms), one character for the chain identifier (62 possible chains), and four digits for residue numbers. Ribosomes, viral capsids and many cryo-EM structures simply do not fit. Since 2014 the worldwide PDB has used PDBx/mmCIF as its standard archive format, and the largest structures are available only in that form. The ideas are the same, but each value is labelled by name, so there are no column limits. See the mmCIF viewer page for details.
Try it yourself
Open crambin in MolViewer and hover over any atom: the tooltip shows the atom name, residue, chain, occupancy and B-factor straight from the file. Switch to cartoon with secondary-structure colors to see the HELIX and SHEET records drawn as ribbons and arrows, or open hemoglobin and find the heme groups in ball-and-stick.
Frequently asked questions
- What is the difference between a .pdb file and a PDB ID?
- A PDB ID is the four-character code of an entry in the Protein Data Bank, such as 1CRN. A .pdb file is one of the text formats that entry can be downloaded in. The same entry is also available as mmCIF, which is now the archive standard.
- What units are the coordinates in?
- Angstroms (1 Å = 0.1 nanometre), in a Cartesian frame. For crystal structures the frame is tied to the crystal, so the absolute numbers mean nothing on their own; only distances and angles between atoms do.
- Why are some residues missing from the coordinates?
- Flexible regions such as loops and chain ends often give too little electron density to model. Those residues still appear in SEQRES, and REMARK 465 lists them as missing.
Open crambin (1CRN) in the viewer
Related
- Alpha helices and beta sheets
- Online PDB viewer
- mmCIF / CIF file viewer
- Hemoglobin and oxygen transport
- pLDDT explained
Updated 2026-09-28