Atomic level study of LiMn2O4 as electrode in lithium batteries.