Theory and ab initio simulation of atomic heat transport