A program (HOOK) is described for generating potential ligands that satisfy the chemical and steric requirements of the binding region of a macromolecule. Functional group sites with defined positions and orientations are derived from known ligand structures or the multicopy simulation search (MCSS) method (Miranker, A., Karplus, M. Proteins 11:29-34, 1991). HOOK places molecular "skeletons" from a database into the protein binding region by making bonds between sites ("hooks") on the skeleton and functional groups. The nonpolar interactions with the binding region of candidate molecules are assessed by use of a simplified van der Waals potential. The method is illustrated by constructing ligands for the sialic acid binding site of the hemagglutinin from the influenza A virus and the active site of chloramphenicol acetyltransferase. Aspects of the HOOK program that lead to a highly efficient search of 10(5) or more skeletons for binding to 10(2) or more functional group minima are outlined.