I am trying to write a HF code that can calculate the orbital energies for a given molecule at RHF level. I got upto calculating electron repulsion integrals (ERI) and kinetic energy (KE) integrals, and found that many values in the ERI where negative numbers. The results for the KE calculation is verified to be correct.
Following this question, I understand that a positive value means the interaction is destabilizing, while a negative value means it is stabilizing in the case of KE integrals. Is it the same for ERI also? Or am I missing something serious here? The code can be found here. I used water as a test case with 3-21g basis set.