From ionics to energetics in the nervous system