We propose a method of using atomistic computer simulations to obtain partial pair correlation functions from wide angle diffraction experiments with metallic liquids and their glasses. In this method, a model is first created using a semiempirical interatomic potential and then an additional atomic force is added to improve the agreement with experimental diffraction data. To illustrate this approach, the structure of an amorphous Cu64.5Zr35.5 alloy is highlighted, where we present the results for the semiempirical many-body potential and fitting to x-ray diffraction data. While only x-ray diffraction data were used in the present work, the method can be easily adapted to the case when there are also data from neutron diffraction or even in combination. Moreover, this method can be employed in the case of multicomponent systems when the data of several diffraction experiments can be combined. Note that the version published in [M.I. Mendelev, M.J. Kramer, R.T. Ott, D.J. Sordelet, D. Yagodin and P. Popel, Phil. Mag. 89, 967-987 (2009).] is better for simulation of liquid/glass structure.