An immunoglobulin light chain dimer with a large generic binding cavity was used as a host molecule for designing a series of peptide guest ligands. In a screening procedure peptides coupled to solid supports were systematically tested for binding activity by enzyme linked immunosorbent assays (ELISA). Key members of the binding series were synthesized in milligram quantities and diffused into crystals of the host molecule for X-ray analyses. These peptides were incrementally increased in size and affinity until they nearly filled the cavity. Progressive changes in binding patterns were mapped by comparisons of crystallographically refined structures of 14 peptide-protein complexes at 2.7 A resolution. These comparisons led to guidelines for ligand design and also suggested ways to modify previously established binding patterns. By manipulating equilibria involving histidine, for example, it was possible to abolish one important intramolecular interaction of the bound ligand and substitute another. These events triggered a change in conformation of the ligand from a compact to an extended form and a comprehensive change in the mode of binding to the protein. In dipeptides of histidine and proline, protonation of both imidazolium nitrogen atoms was used to program an end-to-end reversal of the direction in which the ligand was inserted into the binding cavity. Peptides cocrystallized with proteins produced complexes somewhat different in structure from those in which ligands were diffused into preexisting crystals. In such a large and malleable cavity, space utilization was thus different when a ligand was introduced before the imposition of crystal packing restraints.