Tertiary structure is the complete three-dimensional arrangement of one protein chain. It describes how alpha-helices, beta-strands, and connecting loops pack together, including buried and surface-exposed amino acids and functional sites such as binding pockets. section 12.1.1
Protein folding builds tertiary structure from local secondary-structure elements. Predicting protein structure usually means predicting three-dimensional coordinates, although models may instead produce backbone frames, Cα traces, distance or contact maps, or side-chain placements for later refinement. section 12.1.1
Figure 12.3 Primary structure is the linear sequence of amino acids. Secondary structure is local backbone geometry—chiefly alpha-helices and beta-strands—stabilized largely by backbone hydrogen bonding. Tertiary structure is the full three-dimensional arrangement of a single polypeptide chain, including how its secondary-structure elements and connecting loops pack together. Quaternary structure describes an assembly of more than one chain.

Compare primary, secondary, tertiary, and quaternary structure as successive levels of protein organization. section 12.1.1
Structure and function
Distinct folding patterns support distinct biological roles in Salmonella alpha-2-macroglobulin, SARS-CoV main protease, and HIV-1 reverse transcriptase. section 12.1.1
