Understanding the electrochemical properties of bulk phase and surface structures of Na3TMPO4CO3 (TM = Fe, Mn, Co, Ni) from first principles calculations.