Currently, spin is calculated from the total number of electrons: spin = tot_ele % 2
so spin=1 for systems with an odd number of electrons.
However, the ground state of O3 contains 2 unpaired electrons, even though it is an even number of electrons, so O3 would require spin=2. This is because the HOMO orbital is degenerate so instead of pairing the highest electrons maintain the same spin and occupy separate orbitals.
We should add something like Hund's Rules