Is there any method to calculate electrical resistivity using ab initio DFT?

Hi,

I am wondering whether there is a method in CASTEP or DMol3 to calculate electrical resistivity for a semiconductor material? I would like to study doping effect on the resistivity change. Thanks you very much.

Leon