We have used the classical molecular dynamics technique to simulate the ordering of a water film adsorbed on an atomic model of a tip of a scanning tunneling microscope approaching a planar metal surface. For this purpose, we have developed a classical model for the water-substrate interactions that solely depends on the coordinates of the particles and does not require the definition of geometrically smooth boundary surfaces or image planes. The model includes both an electrostatic induction for the metal atoms (determined by means of an extended Lagrangian technique) and a site-specific treatment of the water-metal chemisorption. As a validation of the model we have investigated the structure of water monolayers on metal substrates of various topology [the (111), (110), and (100) crystallographic faces] and composition (Pt, Ag, Cu, and Ni), and compared the results to experiments. The modeling of the electrostatic induction is compatible with a finite external potential imposed on the metal. This feature is used to investigate the structural rearrangements of the water bilayer between the pair of scanning tunneling microscope electrodes in response to an applied external voltage difference. We find significant asymmetry in the dependence on the sign of the applied voltage. Another result of the calculation is an estimate of the perturbation to the work function caused by the wetting film. For the conditions typical for operation of a scanning tunneling microscope probe, the change in the work function is found to be comparable to the applied voltage (a few hundred millivolts).