Hi,
I think there may be an issue with the k-edge project. In the MOM routine because you are not using mo_occ.copy() and mo_coeff.copy() you are inadvertently modifying the ground state parameters. For example, when you have mo_coeff = self.mf.mo_coeff Python does not pass the value of self.mf.mo_coeff to mo_coeff rather assigns the name (reference) to mo_coeff. There is an example in 'Computational Chemistry from Laptop to HPC' which shows using mom with pyscf where the use of copy() is shown. If you do separate i->a computations you get different results to the mom in a loop because of the redefining of the ground state in the latter case. You certainly get different (lower) values using copy() so something is going on. These are very good articles BTW.
Hi, I think there may be an issue with the k-edge project. In the MOM routine because you are not using mo_occ.copy() and mo_coeff.copy() you are inadvertently modifying the ground state parameters. For example, when you have mo_coeff = self.mf.mo_coeff Python does not pass the value of self.mf.mo_coeff to mo_coeff rather assigns the name (reference) to mo_coeff. There is an example in 'Computational Chemistry from Laptop to HPC' which shows using mom with pyscf where the use of copy() is shown. If you do separate i->a computations you get different results to the mom in a loop because of the redefining of the ground state in the latter case. You certainly get different (lower) values using copy() so something is going on. These are very good articles BTW.