Ab Initio Theory Of Energy Storage Through Nanoscale Charge Separation And Transport