Where i runs over the total N spin orbitals. In the closed-shell case, it can be simplified by considering only the spatial orbitals. Noting that the J ^ ^ terms are duplicated and the exchange terms are null between different spins. For the restricted case which assumes closed-shell orbitals and single- determinantal wavefunctions, the Fock operator for the i -th electron is given by: