We implemented a novel approach to score water mediation and displacement in the protein-ligand docking program GOLD. The method allows water molecules to switch on and off and to rotate around their three principal axes. A constant penalty, sigma(p), representing the loss of rigid-body entropy, is added for water molecules that are switched on, hence rewarding water displacement. We tested the methodology in an extensive validation study. First, sigma(p) is optimized against a training set of 58 protein-ligand complexes. For this training set, our algorithm correctly predicts water mediation/displacement in approximately 92% of the cases. We observed small improvements in the quality of the predicted binding modes for water-mediated complexes. In the second part of this work, an entirely independent set of 225 complexes is used. For this test set, our algorithm correctly predicts water mediation/displacement in approximately 93% of the cases. Improvements in binding mode quality were observed for individual water-mediated complexes.