Study and Productivity

How to View a Protein Structure from a PDB or mmCIF File

Open PDB and mmCIF files in your browser, choose cartoon or ball-and-stick, colour by chain or B-factor, select residues, measure distances and save a PNG.

Saizul Amin
Saizul Amin19 Nov 2026 · 4 min read
How to View a Protein Structure from a PDB or mmCIF File

How to View a Protein Structure from a PDB or mmCIF File

A protein structure file is a list of atoms with their x, y and z coordinates, usually tens of thousands of lines long. Read as text it means little; turned into a 3D model it shows helices, sheets, pockets and how chains fit together. This guide walks through the free Protein Structure Viewer, which opens PDB and mmCIF files directly in your browser and draws them with WebGL on your own device.

Where structure files come from

The Protein Data Bank holds more than 200,000 experimental structures from X-ray crystallography, cryo-electron microscopy and NMR. On rcsb.org, pdbe.org or pdbj.org you can search an ID such as 1UBQ or 6VXX and download the coordinates. Two formats are offered. The classic PDB format uses fixed columns: the atom name sits in columns 13 to 16, the residue name in 18 to 20, the chain in 22 and so on. PDBx/mmCIF stores the same information as tables of named columns and has no limit on the number of atoms or chains, which is why large complexes and all new entries use it. The AlphaFold database and most modelling programs also write these formats.

The viewer accepts both. Drop a .pdb, .ent or .cif file, or paste the text if you copied it from somewhere.

Choosing a style

Different styles answer different questions.

  • Cartoon follows the backbone through the alpha carbon of each residue with a smooth curve, and widens it into a flat ribbon wherever the file marks a helix or a strand. It is the best overview of the fold.
  • Tube is a plain trace of the backbone, useful for large complexes and for seeing how a chain runs.
  • Ribbon is a flat band along the whole backbone.
  • Ball and stick shows every atom and bond, which suits ligands, active sites and small peptides.
  • Spacefill draws atoms at their van der Waals size and shows the shape of the surface.
  • Lines is the lightest view of all atoms and stays fast on old phones.

In the backbone styles, ligands such as haem or a drug molecule are drawn as ball and stick so you can find them. Water and hydrogens are hidden by default; tick them on if you need them.

Colouring for meaning

Colour is how you read a structure. By chain gives each subunit its own colour, which is the first thing to try with a complex. Secondary structure paints helices magenta, strands yellow and loops grey. Rainbow runs from blue at the start of each chain to red at the end, so you can follow the order of the sequence through the fold. Residue class separates hydrophobic, polar, positive and negative side chains. Element colours carbon grey, nitrogen blue, oxygen red and sulphur yellow.

The B-factor colour uses the temperature factor column, blue for low and red for high values. In experimental structures high B-factors mark flexible, less ordered parts. AlphaFold uses the same column for its confidence score, so in those files red means the model is more confident.

Selecting and measuring

Type a selection into the residue box: A:45-60 for a range in chain A, B for a whole chain, or several items separated by commas. Selected residues turn orange and their side chains appear, even in cartoon style. This is a quick way to show an active site or a mutation.

To measure, enter atoms as chain, residue number and atom name, for example A:57:NE2 and A:102:OD1. Two atoms give a distance in ångströms; three give the angle at the middle atom. Each measurement is drawn as a yellow line and listed, and can be removed or undone.

Sequences and exports

Below the model, each chain's sequence appears in one-letter code with its length, and ligands and other groups are listed with their chain and number. Export a PNG of the current view for slides or posters, a PDB file containing only the shown chains or the selection (handy for docking or for a smaller file), or FASTA of the sequences.

Tips and limits

Large structures with more than 6,000 atoms switch to lighter geometry automatically. If you work with a huge assembly, hide chains you do not need before switching to spacefill. The viewer uses the helix and sheet records from the file; when a model has none, the cartoon stays a coil. It does not compute surfaces, electrostatics or hydrogen bond networks, and it shows only the first model of an NMR ensemble. For teaching, checking a download or preparing a figure, it gives you a clear 3D picture in seconds and keeps the file on your own computer.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages