-
Notifications
You must be signed in to change notification settings - Fork 29
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
trexio possible issue with ERI basis #103
Comments
There is no essential difference between AO ERIs and MO ERIs. AO ERIs can be viewed as MO ERIs with the MO coefficients set to the identity matrix. In the tests, AO ERIs are passed to this function to verify the handling of indices. It does not indicate special meaning for the input ERIs. Does TrexIO provide different entries or labels for AO and MO ERIs? If not, I don't think it's necessary to distinguish the two when dumping ERIs. They can be easily converted to each other before calling this function. |
Yes, TREXIO does provide different labels for AO and MO ERIs (without this distinction, I agree that there is no real difference between the two other than the basis in which they're represented, and it would be up to the user to pay attention and convert as needed). There is nothing wrong with the function itself as written, but it does put some responsibility on the user to make sure they are passing the MO ERIs (because they will be saved under |
I opened a draft PR to give an example of what I had in mind; I wouldn't consider it totally clean and ready to merge, but it shows the gist of what I was thinking. |
I've noticed something that seems a bit unclear (and hopefully this post might provide clarity for others).
The
trexio.write_eri
function always writes the input ERIs as if they are in the MO basis (i.e. it writes them undermo_2e_int
in the trexio h5 file), but in some of the tests, the AO ERIs are passed to this function (1, 2), so when used in this way, the trexio h5 output will contain the AO ERIs labeled incorrectly as MO ERIs.It might be clearer to rename the function to
write_mo_eri
or maybe to provide another argument to select AOs or MOs?It might also make sense to make a function that takes the scf object, and that will contain everything needed to get the ERIs in either basis.
My usual workflow is to get the AO ERIs with
mol.intor('int2e')
and thenao2mo.kernel(eri_ao, mf.mo_coeff)
to get the MO ERIs if needed, but I wouldn't be surprised if there were maybe cleaner ways to do this that I'm not aware of (e.g. I didn't know aboutscf._eri
)The text was updated successfully, but these errors were encountered: