Electronic structure of selenium aggregates by a self-consistent method including 4d orbitals