A computer program (SANDOCK) has been developed for the automated docking of small ligands to a target protein. It uses a guided matching algorithm to fit ligand atoms into the protein binding pocket. The protein is described by a modified Lee-Richard's dotted surface with each dot coded by chemical property and accessibility. Orientations of the ligand in the active site are generated such that a chemical and a shape complementary between the ligand and the active site cavity have to be fulfilled. The generated fits are evaluated with scoring functions which account for van der Waals, hydrophobic and hydrogen bonding interactions. This newly developed docking program can efficiently screen very large databases in a reasonable time and has been used to successfully identify novel ligands. The X-ray structure of a thrombin-ligand complex predicted by SANDOCK is described. The ligand binds to thrombin with a Kd of 65 microM and has an rmsd of 0.7 A for all ligand atoms from the predicted binding mode by SANDOCK.