Lesson 1 of 13 · 11 min
Protein Structure and Coordinate Space
A macromolecular structure, at its core, is a table of atoms, each assigned a position in three-dimensional space. The wwPDB distributes these coordinate sets as legacy PDB files and, canonically since 2014, as mmCIF. Everything you compute in this course begins from that table.
Cartesian Coordinate Space
Atomic positions are stored as orthogonal Cartesian x, y, and z values in angstroms, where 1 angstrom equals 0.1 nanometre. The origin and axis orientation are arbitrary, inherited from the crystallographic frame, so absolute coordinates carry no biological meaning. Only relative quantities such as interatomic distances, bond angles, and torsions are invariant and worth interpreting.
from Bio.PDB import PDBList, MMCIFParser
# Fetch deoxyhaemoglobin; mmCIF is the canonical wwPDB format
path = PDBList().retrieve_pdb_file("4HHB", file_format="mmCif", pdir=".")
structure = MMCIFParser(QUIET=True).get_structure("4HHB", path)
# Each Atom stores coord as a length-3 numpy array, in angstroms
ca = structure[0]["A"][58]["CA"] # distal His (E7) of the alpha subunit
print(ca.coord, ca.coord.dtype)
print("His A58 CA at", tuple(round(float(v), 3) for v in ca.coord), "Angstrom")
# Only relative geometry is meaningful; Atom subtraction returns a distance
his_f8 = structure[0]["A"][87]["CA"] # proximal His (F8)
print(f"CA(His58)-CA(His87) = {ca - his_f8:.2f} A")[24.939 15.324 19.353] float32
His A58 CA at (24.939, 15.324, 19.353) Angstrom
CA(His58)-CA(His87) = 14.29 A
Hierarchy and Backbone
Biopython models a structure with the SMCRA hierarchy: a Structure contains Models, each Model contains Chains, each Chain contains Residues, and each Residue contains Atoms. The polypeptide backbone is the repeating N, CA, C, and O of every residue, while side chains branch off CA at the CB atom, which glycine lacks. A residue is keyed by a (hetero-flag, sequence number, insertion code) tuple, so insertion codes and heteroatoms never collide with ordinary numbering.
backbone = {"N", "CA", "C", "O"}
res = structure[0]["A"][58] # the distal histidine
print(res.get_resname(), res.id)
for atom in res:
kind = "backbone" if atom.name in backbone else "side chain"
print(f"{atom.name:<4} occ={atom.occupancy:>4.2f} B={atom.bfactor:>6.2f} {kind}")HIS (' ', 58, ' ')
N occ=1.00 B= 18.79 backbone
CA occ=1.00 B= 20.27 backbone
C occ=1.00 B= 13.51 backbone
O occ=1.00 B= 17.47 backbone
CB occ=1.00 B= 17.90 side chain
CG occ=1.00 B= 15.76 side chain
ND1 occ=1.00 B= 20.40 side chain
CD2 occ=1.00 B= 20.31 side chain
CE1 occ=1.00 B= 20.13 side chain
NE2 occ=1.00 B= 21.08 side chain
Occupancy is the fraction of molecules in the crystal in which an atom sits at that position; alternate conformations share the residue, are tagged by altloc labels, and their occupancies sum to about 1.0. The B-factor, also called the temperature or Debye-Waller factor, measures positional spread in units of angstrom squared and absorbs both thermal motion and static disorder. In this well-ordered 1.74 angstrom structure the values stay fairly uniform, yet the terminal ring nitrogen NE2 carries the highest B-factor while the buried backbone carbonyl carbon is the most ordered; as a rule B-factors rise toward flexible side-chain extremities, flagging the atoms whose coordinates you should trust least.
The coordinates in a file describe the asymmetric unit, the smallest unique portion of the crystal, which is not necessarily the functional molecule. The biological assembly is defined by the operations recorded in REMARK 350 in PDB or _pdbx_struct_assembly in mmCIF; for many entries these operations replicate the asymmetric unit into a larger oligomer, though 4HHB already deposits the complete alpha2-beta2 tetramer, so its assembly is generated by the identity operation alone. PyMOL and the pre-generated RCSB assembly files build assemblies that need expansion, and Biopython exposes the operators so you can apply them yourself, so always confirm whether you are analyzing the deposited coordinates or the reconstructed oligomer.
Warning: coordinate reliability depends on how the structure was determined. X-ray models sharpen with resolution, so a 1.2 angstrom map pins atoms tightly while a 3.5 angstrom map barely resolves side chains; NMR entries ship as an ensemble of models accessed as structure[0], structure[1], and so on, representing solution conformers rather than one snapshot; and cryo-EM resolution varies across the map, so a single global figure hides poorly ordered regions. Always read the method, resolution, and per-atom B-factors before you trust a coordinate.