The results of a 3-ns molecular dynamics simulation of the dodecamer duplex d(TATGGATCCATA)(2) recognized by the BamHI endonuclease are presented here. The DNA has been simulated as a flexible molecule using an AMBER force field and the Ewald summation method, which eliminates the undesired effects of truncation and permits evaluation of the full effects of electrostatic forces. The starting B conformation evolves toward a configuration quite close to that observed through x-ray diffraction in its complex with BamHI. This configuration is fairly stable and the Watson-Crick hydrogen bonds are well maintained over the simulation trajectory. Hydration analysis indicates a preferential hydration for the phosphate rather than for the ester oxygens. Hydration shells in both the major and minor groove were observed. In both grooves the C-G pairs were found to be more hydrated than A-T pairs. The "spine of hydration" in the minor groove was clear. Water residence times are longer in the minor groove than in the major groove, although relatively short in both cases. No special long values are observed for sites where water molecules were observed by x-ray diffraction, indicating that water molecules having a high probability of being located in a specific site are also fast-exchanging.