Skip to content
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

Question in code performance #124

Open
Kee-Wang opened this issue May 23, 2022 · 2 comments
Open

Question in code performance #124

Kee-Wang opened this issue May 23, 2022 · 2 comments

Comments

@Kee-Wang
Copy link

This might be a simple question. Why here we do not use the I_AO in symmetry orbital basis which has smaller dimension? Is it because there is no way to get symmetry orbital version of ERI tensor?

J_ = transform_aotoso(np.einsum("mnls,ls->mn", I_AO, D_AO), transformers_)

@dgasmith
Copy link
Member

You can obtain a SO version of the ERI; however, the symmetry rules become much more complex. Interestingly it's often not favorable to transform ERIs in SCF settings as it is more costly to perform the transform than using the AO basis. Naively the AO -> SO ERI transform is N^5 and prevents a number of sparsity considerations. Psi4 for example only considers transforms to the SO basis for correlated methods such as CC.

As Psi4NumPy isn't about performance we would definitely consider a PR which uses the SO basis for ERIs!

@Kee-Wang
Copy link
Author

Kee-Wang commented May 24, 2022

Ah ,that makes sense.
Maybe one more follow up question (or we can move this topic to psi4 forum if you think that's a better place). I was trying to get the ERI under the SO basis just to make sure I understand the conversion behind it. However, I did not find a psi4 function for that. My goal would be to get the J_SO and K_SO using I_SO and D_SO for each sub-symmetry space instead of from I_AO and D_AO as did in the code above. Also I want to get the second quantized Hamiltonian under symmetry, so I_SO is essential to get AO->SO-> MO for each sub-symmetry.

Is there an example of how to do that? I tried to do the following basis transformation which works for AO->MO, but it seems does not do the trick for the AO->SO.
I_SO = [np.einsum("abcd,aA,bB,cC,dD",I_AO, transformer) for transformer in transformers_]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants