Crystal structure of PilB. (A) Orthogonal cartoon views of the PilB structure in which the two distinct modules have been highlighted in blue (pilin module) and red (vWA module), while the short loop connecting them is in gray. The orange sphere represents a magnesium ion. (B, Left) Close-up cartoon view of the pilin module colored in rainbow spectrum from blue (N terminus) to red (C terminus). (B, Right) Topology diagram of the pilin module structure. (C, Left) Close-up cartoon view of the vWA module in which the β-strands composing the central β-sheet are highlighted in red, while the surrounding α-helices are highlighted in yellow. The connecting loops are in gray, except for the two “arms” on top of the structure (colored in orange and blue), which surround the MIDAS. (C, Right) Diagram of the magnesium coordination by the conserved MIDAS residues. Coordinating oxygen atoms are shown, with dashed lines corresponding to hydrogen bonds.