Structure Inspector
View a PDB, GRO, XYZ or CIF structure in 3D, find any residue, chain or species by name, see the simulation box, measure and export a figure.
Drop a structure file here
or choose one from your computer, fetch an entry from the PDB, or open a sample.
.pdb.gro.xyz.cif.mol2.sdf+9 more
How to inspect a molecular structure
Open a coordinate file, turn it until you can see what matters, find the residues or molecules you care about by name, then measure and export. Everything is drawn by your own graphics card; nothing is uploaded.
Open a structure
Drop a PDB, GRO, XYZ, CIF, MOL2, SDF or other coordinate file on the page, choose one, type a four-character PDB ID to fetch it from RCSB, or open a sample. The Helix in a water box sample is a small solvated system with ions and a box, built in your browser, for trying the MD features.
Move around
Drag to rotate, scroll or pinch to zoom, right-drag or drag with two fingers to pan. The controls in the corner of the viewer do the same without a mouse: hold an arrow to keep turning, drag the centre of the pad like a trackball, slide the zoom rail, look along X, Y or Z, fit, reset or spin. Click an atom to make it the centre of rotation; double-click to zoom to its residue.
Find what you need
Type in Find above the viewer: a residue or species name (SOL, NA, ALA), a residue with its number (ALA 12), a range (10-20), chain A or an element. Matches turn to ball-and-stick, the rest fades, and the view zooms to them. Enter steps to the next residue, Shift+Enter to the previous, Esc puts everything back. The list under the file name shows what the structure is made of; hide water or ions in one click.
Style, measure and export
Pick a representation and colours in the Style tab, and show or restyle the simulation box in Display. In the Tools tab, turn on Measure mode and click two atoms for a distance, or tick Angle mode and click three for an angle; turn on Figure mode to fade the surroundings, or build a selection by chain, residue, distance or region. Save a high-resolution PNG from the Export tab.
Keyboard
Shortcuts work anywhere on the page except while you type in a field. Arrow keys need the viewer to have focus: click it, or tab to it.
| Key | Does |
|---|---|
| ← → ↑ ↓ | Rotate the structure (viewer focused). Hold Shift for bigger steps. |
| Q E | Roll anticlockwise or clockwise. |
| + − | Zoom in or out. |
| F | Zoom to fit: the matches while a search is open, otherwise everything. |
| 0 R | Reset the view. |
| X Y Z | Look along that axis; press again to look from the other side. |
| B | Show or hide the simulation box. |
| W I | Show or hide water, or ions. |
| N Shift+N | Next or previous match of the search. |
| S | Auto-spin on or off. |
| M H L | Measure mode, hydrogens, atom labels. |
| Shift+F | Fullscreen viewer. |
| ? | The shortcut sheet. |
| Esc | Clear the search, leave measure mode, close the atom card or the sheet. |
How the viewer works
WebGL rendering
Geometry is built and rasterised by 3Dmol.js on your graphics card. Because the whole scene lives in GPU memory, rotation and zoom stay smooth on structures with hundreds of thousands of atoms, but every style change has to rebuild that geometry, which is why very large systems take a moment to re-draw.
Selections are JSON, not strings
3Dmol filters atoms with plain JavaScript objects such as {chain:'A', resn:'HEM'}. The query box compiles your text into exactly that shape, so anything you type here maps directly onto the library's own API, useful if you later script the same selection yourself.
Neighbour search
Distance queries (within:) index the target atoms into a uniform grid first, then test only the cells that could fall inside the radius. That keeps a pocket selection near-instant instead of comparing every atom against every other atom.
Labels are built across frames
Placing thousands of labels in one synchronous loop is what freezes a tab, nothing paints until the last one is done. Labels here are added in slices of about 150 per animation frame, with a progress readout, so the viewer stays interactive and you can watch them fill in. Starting a new label pass cancels the one in flight rather than queueing a second.
Scope beats capping
A cap alone still labels whichever atoms happen to come first in the file, which is rarely what you are looking at. Set Label scope to Current selection to label only what you isolated; when a scope still exceeds the limit, the atoms nearest the centre of the view are kept in preference to the rest.
The selection language
Find above the viewer takes plain words: SOL, ALA 12, 10-20, chain A, Fe, or several separated by commas (NA, CL). For anything more, it and the Query box in the Tools tab accept this language. Every token is key:value, separated by spaces. Tokens are combined with AND, chain:A elem:Fe means iron atoms in chain A. Prefix any token with not: (or !) to invert just that token.
Atom attributes
| Token | Selects |
|---|---|
chain:A | Chain identifier as written in the file. |
resn:HOH | Residue name. Accepts comma lists: |
resi:1-50 | Residue number: a single value, an inclusive range, or a comma list of either: |
elem:Fe | Element symbol, in any case: |
atom:CA | Atom name, more specific than element ( |
ss:h | Secondary structure: |
b:>30 | B-factor. Supports |
serial:1-99 | Atom serial number range. |
Named groups
| Token | Selects |
|---|---|
protein:1 | Standard amino-acid residues. |
nucleic:1 | DNA and RNA residues. |
solvent:1 | Water under its common names (HOH, WAT, SOL, TIP3…). |
ion:1 | Frequently seen monatomic ions. |
backbone:1 | Protein backbone atoms N, CA, C, O. |
sidechain:1 | Amino-acid atoms that are not backbone. |
hetero:1 | Atoms flagged as HETATM: ligands, cofactors, solvent. |
Geometry and logic
| Token | Selects |
|---|---|
x:>4.8 | Cartesian coordinate filter on |
within:5,chain:A | Every atom within 5 Å of anything matching the inner selection. The radius comes first, then a comma, then a nested query. |
not:resn:HOH | Inverts the token that follows. |
or:chain:A|chain:B | Union of the pipe-separated clauses. |
byres:1 | Expands the result so that any residue with one selected atom is selected entirely. |
Worked examples
| Query | Meaning |
|---|---|
within:5,resn:HEM byres:1 | The complete residues lining the haem pocket, the standard way to picture a binding site. |
within:5,chain:A not:chain:A byres:1 | The protein–protein interface: residues close to chain A that belong to a different chain. |
protein:1 not:solvent:1 b:>60 | The most mobile parts of the protein, often loops and termini. |
ss:h chain:A | Helices of chain A only. |
z:>30 not:solvent:1 | The upper leaflet of a membrane system with water stripped out. |
References & documentation
- Rego, N., & Koes, D. (2015). 3Dmol.js: molecular visualization with WebGL. Bioinformatics, 31(8), 1322–1324. doi:10.1093/bioinformatics/btu829
- 3Dmol.js API, AtomSelectionSpec reference (University of Pittsburgh).
- Berman, H. M., et al. (2000). The Protein Data Bank. Nucleic Acids Research, 28(1), 235–242. rcsb.org
- Wikipedia: Accessible surface area and B-factor.
Frequently asked questions
Is my structure uploaded anywhere?
Which file formats are supported?
How do I show the simulation box?
How do I find one residue, or every water, ion or lipid?
sol finds SOL. The suggestions list every residue and species actually present, with counts. Add a number for one residue (ALA 12) or a range (ALA 10-20), or type water, ions, lipids, protein or backbone for a whole class. Step through the matching residues with Enter and Shift+Enter, turn on Only matches to hide the rest, and press Esc to go back to the view you had before.Rotating with the mouse is fiddly. Is there another way?
Why does the cartoon style show nothing?
Why are my labels capped or disabled?
My high-resolution export came out smaller than I asked for.
What is the difference between Isolate and Highlight?
Which surface type should I use?
Turning on labels used to freeze the tab. What changed?
How do I make a clean measurement figure?
Can I get the measurement numbers out as data?
Why does building a surface still pause the viewer?
Can I script the same selections elsewhere?
chain:A resn:HEM is simply {chain:'A', resn:'HEM'} in the library's own API. Open the console and call app.select('within:5,resn:HEM') to get the matching atoms back as an array.Runs entirely in your browser, no data leaves your device. Rendering by 3Dmol.js (Rego & Koes, 2015).