In atomic spectroscopy, the electronic state of an atom or ion can be specified by its atomic term symbol
2S+1LJ,
where S is the total spin angular momentum, L is the total orbital angular momentum and J is the total angular momentum.
One method of determining all term symbols for an electron configuration is by constructing a table counting all of its possible microstates.
For a given orbital quantum number l, there is a maximum of n=2(2l+1) orbital positions for the electrons to occupy.
The total number of possible microstates N can be calculated as a combination of all electrons occupying the available orbital positions,
N=(ne)=e!(n−e)!n!,
where n is the number of orbital positions for a given l and e is the number of electrons.
For example, consider the electron configuration 2s2p2. The total number of possible microstates can then be calculated as
where we made the substitutions n2s=2, e2s=1 to account for a single electron occupying the 2s orbital, and n2p=6, e2p=2 to account for two electrons occupying the 2p orbital. Therefore, we have 30 total microstates for the 2s2p2 configuration.
From the list of all possible microstates, all possible combinations of (ML,MS) can be counted and placed in a table. The multiplet term symbol is obtained by accounting for J for each state. For the example of 2s2p2, we have:
We can then start extracting terms from this table, starting from the top-left corner to the bottom-right.
From the top row, we can extract the term 2D for ∣ML∣=2 and multiplicity 2: one with MS=−1/2 and one with MS=1/2. Accounting for J, we obtain 2D3/2,5/2. When subtracting, we remove 1 from the entire column. The resulting table is then:
ML−101−23111MS−212322123223111
where we have removed the ML=−2 and ML=2 rows since they now contain all 0s. In the next step, we can extract the term 4P for ∣ML∣=1 and multiplicity 4: one each with MS=−3/2,−1/2,1/2,3/2. Accounting for J, we obtain 4P1/2,3/2,5/2. The resulting table is:
ML−101−23000MS−211212112123000
Here we can extract the term 2P for ∣ML∣=1 and multiplicity 2: one each with MS=−1/2,1/2. Accounting for J, we obtain 2P1/2,3/2. The resulting table is:
ML0−230MS−211211230
where we have removed the ML=−1 and ML=1 rows since they now contain all 0s. We are left with the final row, which we can extract the term 2S for ∣ML∣=0 and multiplicity 2: one each with MS=−1/2,1/2. Accounting for J, we obtain 2S1/2.
Therefore for the 2s2p2 configuration, we have obtained the following 8 terms:
2D3/2,5/2,4P1/2,3/2,5/2,2P1/2,3/2,2S1/2
I have written a python script to calculate atomic term symbols based on this method here.