In a previous paper [Moss & Feil (1981). Acta Cryst. A37, 414-421] a method was reported to calculate the electrostatic potential and the electrostatic interaction energy from single-crystal X-ray diffraction data. The method was applied to experimental pyrazine data; however, owing to the relatively low quality of the data, the results were inconclusive. In the present paper the results are presented of a model study in which the method has been applied to the analysis of ideal error-free diffraction data calculated from a theoretical wavefunction. The molecular quadrupole moments and the electrostatic interaction energies of two pyrazine molecules thus obtained are in very good agreement with the corresponding results derived directly from the wavefunction. Thus the proposed method may be used to determine the long-range electrostatic component of molecular interactions from highly accurate X-ray diffraction data.