# spin-unrestricted Hartree-Fock and Hund's rule

The spin-unrestricted Hartree-Fock eigenvalule equations are coupled differential equations which determine the spatial part of the electron spin orbitals.

The coupled Hartree-Fock eigenvalue equations have the following form $$\left[ h + \sum_{j=1}^{N^\uparrow}\left( J_j^\uparrow- K_j^\uparrow\right) + \sum_{j=1}^{N^\downarrow} J_j^\downarrow \right] \varphi^\uparrow_i = \varepsilon_i^\uparrow \varphi^\uparrow_i$$ $$\left[ h + \sum_{j=1}^{N^\downarrow}\left( J_j^\downarrow- K_j^\downarrow\right) + \sum_{j=1}^{N^\uparrow} J_j^\uparrow \right] \varphi^\downarrow_i = \varepsilon_i^\downarrow \varphi^\downarrow_i$$ where $J$ and $K$ are the Coulmb and Exchange operators, and $h$ contains the kinetic energy plus the interaction with the nuclei.

But for this equation to make sense, I have to know $N^\uparrow$ and $N^\downarrow$ in advance.

However, usual quantum chemistry codes (say, I want to solve Hartree-Fock for the Nitrogen atom)) only need the total number of electrons $N=N^\uparrow+N^\downarrow$ as an input parameter.

But how can they solve the spin-unrestricted Hartree-Fock equations without knowing $N^\uparrow$ and $N^\downarrow$? Is it dervied by Hund's rule?

I think there must be some kind of additional assumtion (like Hund's rule), because neither the exact many-electron Schrödinger equation nor the spin-unrestricted Hartree-Fock equation can determine the spin states of the electrons. I guess, for any non-relativistic theory, the spin has to be included by some emperical rules.