We describe a new computational approach, called Focus-2D, to the rational design of targeted combinatorial chemical libraries. This approach is based on the hypothesis that structurally similar compounds display similar biological activity profiles. Building blocks that are used in a combinatorial chemical synthesis are randomly assembled to produce virtual library compounds. Individual library compounds are represented by Kier-Hall topological descriptors. Molecular similarities between compounds are evaluated quantitatively by modified pairwise Euclidean distances in multidimensional descriptor space. Simulated annealing is used to search the potentially large structural space of virtual chemical libraries to identify compounds similar to lead molecules. Frequency analysis of building block composition of selected virtual compounds identifies building blocks that can be used in combinatorial synthesis of chemical libraries with high similarity to the lead molecules. We show that this method correctly identifies building found in active peptoids with adrenergic or opioid activities.