Calculation of electrical resistivity of Mg, Cd, and Zn in solid and liquid state. local pseudopotential approximation