A similarity‐driven approach to flexible ligand docking is presented. Given a reference ligand or a pharmacophore positioned in the protein active site, the method allows inclusion of a similarity term during docking. Two different algorithms have been implemented, namely, a similarity‐penalized docking (SP‐DOCK) and a similarity‐guided docking (SG‐DOCK). The basic idea is to maximally exploit the structural information about the ligand binding mode present in cases where ligand‐bound protein structures are available, information that is usually ignored in standard docking procedures. SP‐DOCK and SG‐DOCK have been derived as modified versions of the program DOCK 4.0, where the similarity program MIMIC acts as a module for the calculation of similarity indices that correct docking energy scores at certain steps of the calculation. SP‐DOCK applies similarity corrections to the set of ligand orientations at the end of the ligand incremental construction process, penalizing the docking energy and, thus, having only an effect on the relative ordering of the final solutions. SG‐DOCK applies similarity corrections throughout the entire ligand incremental construction process, thus affecting not only the relative ordering of solutions but also actively guiding the ligand docking. The performance of SP‐DOCK and SG‐DOCK for binding mode assessment and molecular database screening is discussed. When applied to a set of 32 thrombin ligands for which crystal structures are available, SG‐DOCK improves the average RMSD by ca. 1 Å when compared with DOCK. When those 32 thrombin ligands are included into a set of 1,000 diverse molecules from the ACD, DIV, and WDI databases, SP‐DOCK significantly improves the retrieval of thrombin ligands within the first 10% of each of the three databases with respect to DOCK, with minimal additional computational cost. In all cases, comparison of SP‐DOCK and SG‐DOCK results with those obtained by DOCK and MIMIC is performed. Proteins 2000;40:623–636. © 2000 Wiley‐Liss, Inc.