« first day (734 days earlier)      last day (628 days later) » 

4:00 AM
@lela2011 The convergence is a red hearing. You can see that you aren't computing the correct Fock matrix from this simple example:
if __name__ == "__main__":

# Define Atoms
C = Atom("C", (0, 0, 0))

# Define Molecule
molecule = Molecule([C])

# Generate pyscf string to build pyscf molecule
pyscf_name = molecule.pyscf_molecule_string()

# Build pyscf molecule
mol = gto.M(atom = pyscf_name, basis="STO-3G")

# Generate integrals used for caluclations
s = mol.intor("int1e_ovlp", hermi=1)
kin = mol.intor("int1e_kin", hermi=1)
nuc = mol.intor("int1e_nuc", hermi=1)
ERIs = mol.intor("int2e")

# Calculate transformation matrix based on overlap matrix
In this case I've taken the coefficients directly from pyscf and used your routines to build the fock matrix. Yet you'll see that the result is different. I've verified that your core and overlap matrices are fine, so you know it is related to your Fock matrix building routine. I will give you a hint, print this value: rhf.get_occ().
 
 
2 hours later…
6:17 AM
@AwakenYesterday Interesting. I've updated my code in the mast t
*in the last two days to generate a Fock matrix with a density matrix. If I generate the fock matrix from PySCF with the density matrix I generate myself, the fock matrix I implemented myself is the same as the one from PySCF and that for any density Matrix. That would mean, that my density matrix implementation is wrong, right? I'll update my GitHub repo in the next few hours.
 
 
5 hours later…
11:15 AM
@AwakenYesterday I just checked the code and the fock matrices are the same for the mo_coeffs provided by PySCF. At least for the example you sent. I have to check for molecules since the issue only appears when I use molecules.
 
 
5 hours later…
4:43 PM
@lela2011 is that with a new version of the code? If I run the example I gave you with the current version on github, I get:
[[-3.36915138 -0.75962482 0. 0. 0. ]
[-0.75962482 -2.22228093 0. 0. 0. ]
[ 0. 0. -2.32864447 0. 0. ]
[ 0. 0. 0. -1.83715495 0. ]
[ 0. 0. 0. 0. -1.83715495]]
As the output, which shows that they are different
The new version you describe which generates the fock matrix directly from the density matrix you construct is a step in the right direction. You can compare your density matrix with pyscf's make_rdm1, which I think you should also be a good hint
 
5:30 PM
@AwakenYesterday I just uploaded the code. There is a new file called pyscf_test.py where I implemented the comparison logic.
@AwakenYesterday The code I uploaded uses neon to check. For this molecule everything is fine. I just tried a second version for H-F and this one isn't the same as the one pyscf returns. I can't quite comprehend why it doesn't work for molecules but for atoms
 

« first day (734 days earlier)      last day (628 days later) »