A hydrogen bond requires both a lone pair of electrons on a O, N or F atom and a hydrogen atom. In water there are two lone pairs and two hydrogen atoms, allowing the formation of two hydrogen bonds. In ammonia, although there are three hydrogen atoms, there is only one lone pair of electrons on the N, and this means that only one hydrogen bond can form per molecule.