Code for creating orbital level diagrams