One possible route to develop new synthetic-biological systems is to assemble discrete nanoscale objects from programmed peptide-based building blocks. We describe an algorithm to design such blocks based on the coiled-coil protein-folding motif. The success of the algorithm is demonstrated by the production of six peptides that form three target parallel, blunted-ended heterodimers in preference to any of the other promiscuous pairings and alternate configurations, for example, homodimers, sticky-ended assemblies, and antiparallel arrangements. The peptides were linked to promote the assembly of larger, defined nanoscale rods, thus demonstrating that targeted peptide-peptide interactions can be specified in complex mixtures.