Electronic structure of ground and excited states of isoelectronic traps