How to calculate the min Energy in SCF Hartree Fock Calculation?

I have just started writing a program using Hartree-Fock approximation. I have constructed my Hamiltonian (4 by 4 matrix, number of states=4) and found eigenvalues and eigenvectors(4 eigenvectors with length 4, and 4 corresponding energies).

Then I found the eigenvectors related to the last 3 min energy (Number of particles=3) to replace the previous guessed eigenvectors with (so that I can construct the new hamiltonian and find the new min energy and see if it is converging).

My question is how should I calculate the min total energy (in each step of SCF method)? Should it be the average of 3 min energies I am getting in each iteration? Or should I just save the smallest energy among those 3 min energies I am getting in each Iteration?

If my question is not clear let me write it in this way and tell you what I have done and what my question is:

1- NOS=4 (Number of states)

2- NOP=3 (Number of particles)

3- Basis Function is built (4 * 1 vector)

4- Coefficient matrix (3 * 4 Matrix)

5- Hamiltonian(4 * 4 MAtrix)

6- Eigenvectors=(I have got four vectors (4*1 length)) & Eigenvalues: (4 numbers)

7-Choosing the 3 eigenvector related to the 3 minimum energy (and constructing the 3*4 matrix to put instead of number 4(coefficient matrix)), and recalculate the Hamiltonian...(SCF method)

???8-saving the min energy? (I don't know what should I do here? cause I have 3 values for energy related to the chosen eigenvectors. Should I save the meanvalue of them as the total minimum energy?)

• You need to evaluate the expectation value of the exact Hamiltonian for your MB wave function at each level of oterstion. – Lewis Miller Jun 22 '17 at 14:32
• I am using mathematica, and just using the Command Eigensys[Hamiltoniam] gives me the eigenvalues and eigenvectors. Now to the iteration, I need to construct my new wavefunctions to construct the new hamiltonian. To do that I am choosing the 3 eigenvectors corresponding to 3 minimun eigenenergies I am getting. – Delaram Nematollahi Jun 22 '17 at 18:22
• I also need to save the minimum energy to compare with the minimum energy I am getting from the next iteration. How should I calculate the minimum energy? should I take an average of the 3 eigen energies I am choosing in each Iteration? – Delaram Nematollahi Jun 22 '17 at 18:44