Liquid structure and freezing of metals and salts