Structure and dynamics of associated molecular systems. II. Atom–atom potentials and the properties of ammonia