Rigorous calculation of the Seebeck coefficient and mobility of thermoelectric materials