Structure of liquid metals by ab initio molecular-dynamics simulations