A novel program for the superposition of flexible molecules, SLATE, is presented. It uses simulated annealing to minimise the difference between the distance matrices calculated from the hydrogen-bonding and aromaticring properties of two ligands. A method for generating a molecular stack using multiple pairwise matches is illustrated. These stacks are used by the program DOH to predict the relative positions of receptor atoms that could form hydrogen bonds to two or more ligands in the dataset. The methodology has been applied to ligands binding to dihydrofolate reductase, thermolysin. H3 histamine receptors, alpha2 adrenoceptors and 5-HT1D receptors. When there are sufficient numbers and diversity of molecules in the dataset, the prediction of receptor-atom positions is applicable to compound design.