Hydrogen bonds: a comparison of semiempirical and ab initio treatments