Notes: The above program calculates all possible total spins and the number of such states (number of representations) in the many-body system with a given number bosons/fermions. The particles are confined to the list of single particle orbits each with its own spin. This program was designed with a nuclear shell model in mind thus the isospin can also be included in calculation. However, spin and isospin can be viewed as orbital and spin quantum numbers in atomic physics, the algorithm is identical to that of atomic term calculation. The boson model such as IBM can also be considered.
Example 1: Two identical bosons each with spin 1 can couple to spin 0 and 2; spin 1 is not allowed by symmetry. Enter N=2, click bosons, do not click isospin, and under the list of states enter 1.
Example 2: Consider nuclear sd shell model with 8 particles. Enter N=8, do not select bosons, click use isospin, and under the list of spins type "0.5 1.5 2.5" which corresponds to 1s1/2, 0d3/2, and 0d5/2, respectively. The output contains a lot of information, for example you can determine that 24Mg (T=0) has an sd terminating spin (largest spin possible) is J=12 and there are 6 states with this spin.
Example 3: List atomic terms of carbon with electron structure 1s22s22p2. The two electrons are in p-shell. Thus, enter N=2, fermions, use isospin, and single-particle spin as 1. Here we understand J as orbital momentum and T as total spin. We find that there are three unique representations with spin S=0, L=0 and L=2, and spin S=1 L=1. Coupling S and L with usual angular momentum addition we get terms 3P0, 3P1, 3P2, 1D2, and 1S0. Alternatively we can implement jj coupling. The coupling of spin 1/2 and l=1 gives 1/2 and 3/2, enter N=2, fermions, no isospin, list of states "0.5 1.5". We obtain 5 spin states: 2 with spin 2, 1 with spin 1, and two with spin 0; which is consistent with the above list of terms.
If you have question/comments fell free to drop me a line