Measured molecular dipole moments and theoretical percentages of mesomeric zwitterionic forms were used to calculate the attractive electrostatic potentials at short, V(s), medium, V(m), and long, V(I), distances. Values of an attraction power function Φ (H) = A + BV (s) V(m) V(I) was then deduced for 18 nitriles and cyanamide vinylogues or iminologues along the C≡N direction. The satisfactory agreement observed between Φ (H) and the hydrogen bond basicity scale pKHB indicates that the method can be a useful tool for the prediction of hydrogen bonding, needing only simple calculations and allowing easy interpretation.