-
Notifications
You must be signed in to change notification settings - Fork 434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fa_subset("MO")
Incorrect
#1989
Comments
He in STO-3G-decon is maybe an even simpler example. |
Interesting. I have examined these functions in the past, but it's been a while. Can you remind me what is the original basis, AO or SO? It's not super obvious to me why behavior for D would be correct while behavior for F would be wrong, if they both start in the same original basis. |
The original basis is SO. The behavior for D and F are different because "AO basis quantities" mean different things for those two cases. For the F matrix, "AO basis" means that you have a formula in terms of one-electron functions, and you just throw those in. To change basis, you just linearity. F_pq = C_mu,p C_nu,q F_mu,nu For D, "AO basis" means "if you contract this against an AO basis integral, you'll get the same result as if you had contracted an MO basis quantity against MO basis integral." In that case, D_mu,nu F_mu,nu = D_p,q F_p,q = D_p,q C_mu,p C_nu,q F_mu,nu, so we end with D_mu,nu = C_mu,p C_nu,q D_p,q. Note that it differs whether you need to contract your C matrices against the AO or the MO basis quantity. |
Hi All, I see that this issue is still open. I was wondering if there is a current work around? I tried some simple experiments to see if it was still producing the incorrect output:
this gives the following output:
and in the output file
the orbital energies in the output file are correct, which should be the diagonal elements of the Fock matrix in the MO basis, but these are different. I check the AO and MO coefficients produced by two other QM programs (pyscf is below) to see where the inconsistency might be, they both produced the "correct" Fock matrix (i.e. the diagnoal elements in the MO basis are the orbital energies) with the following MO coefficients:
|
How soon do you need this? This bug is an easy fix, and I can include it in the Psi4 1.8 release coming out in a couple weeks. If you need this sooner, the "workaround" is simple. |
@JonathonMisiewicz that's great news! I'm in no rush, so I can wait. The purpose of my calculations is to look at Fock, Coulomb and Exchange matrices in different orbital representations (i.e. from some localisation procedure). For your tests have you looked at the J and K matrices as well as orbital rotations? Thanks, Geoff. |
Your questions may make sense in the context of your research, but they don't make sense in the context of the actual Psi4 code.
|
Completely understand. Just wanted to make sure that if you make a call for K, J, H(core) and density matrices it wouldn't have the same transformation issues as for the Fock. Obviously as long as you can get the rotation matrix/MO coefficients I can make the transformations on J and K myself. Thanks. |
Oh, no, those would be just fine. The issue is that Psi isn't using the formula |
Run:
The result MO basis Fock matrix is not diagonal, as expected.
The correct way to transform the SO basis Fock matrix into the MO basis matrix is contraction against the C coefficient matrices. This is not what the
Fa_subset
function does. It instead goes through a series of matrix mulitplications involving the overlap matrix. This is the correct transformation rule for the density matrix. Not-so-coincidentally,Da_subset
goes through exactly the same function, where this behavior is correct. If you try to use the same logic for both helpers, you're going to get one of them wrong, guaranteed.While the mechanism of the bug is clear to me, I'm not sure what the best fix should be. Perhaps we should intercept "MO" as a special case in
Fa_subset
so it never sees thematrix_subset_helper
? Under the hood, the code would returnFa_->transform(Ca_)
.The text was updated successfully, but these errors were encountered: