Skip to content

Fa_subset("MO") Incorrect #1989

@JonathonMisiewicz

Description

@JonathonMisiewicz

Run:

molecule h2o {
0 1
o
h 1 0.958
h 1 0.958 2 104.4776 
}

wfn = energy('scf/cc-pvdz', return_wfn=True)[1]
print(wfn.Fa_subset("MO").nph)

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 the matrix_subset_helper? Under the hood, the code would return Fa_->transform(Ca_).

Metadata

Metadata

Assignees

No one assigned

    Labels

    coding-neededFor issues where we know the issue and need somebody to code the solution.correctness-errorFor issues where Psi4 gives answers that are wrong.libmintsFor things that are wrong with libmints (but not wavefunction).

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions