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

Energy Decomposition Analysis adopted for general MCSCF #64

Merged
merged 3 commits into from
Sep 9, 2024

Conversation

JangidBhavnesh
Copy link
Contributor

Previously EDA is hardcoded for the CASSCF wavefunction only. I added the functionality to do this analysis for the DMRG-PDFT as well.

@matthew-hennefarth
Copy link
Contributor

LGTM. Do you know if any of the tests actually test this feature? Perhaps we could add one if not.

@JangidBhavnesh
Copy link
Contributor Author

JangidBhavnesh commented Sep 8, 2024

We don't have any test for this functionality.

I will add an unit test. Here, the sum of EDA components would be equal to the MCPDFT energy for the given state.

@matthew-hennefarth
Copy link
Contributor

Here, the sum of EDA components would be equal to the MCPDFT energy for the given state.

Not necessarily, I believe. Doesn't it also include more than just the Coulomb interaction, such as CAS exchange? As in e_ncwfn includes full 2e active space contribution if I read the code correctly. Also, for hybrid funcs it might disagree.

@JangidBhavnesh
Copy link
Contributor Author

Sorry, there is a test for energy_decomposition. Though, whatever I have changed is passing the test.
https://github.com/pyscf/pyscf-forge/blob/master/pyscf/mcpdft/test/test_mcpdft.py

Also, energy_decomposition is not implemented for the hybrid functionals.
https://github.com/pyscf/pyscf-forge/blob/master/pyscf/mcpdft/mcpdft.py#L274

However, it won't be that difficult to implement it. It can be represented as
$E_{OT} = \lambda (\frac{1}{2}g_{pqrs}D_{pqrs}) + (1-\lambda ) E[\rho, \Pi]$
Where it can further be decomposed into exchange and correlation.

@JangidBhavnesh
Copy link
Contributor Author

Not necessarily, I believe. Doesn't it also include more than just the Coulomb interaction, such as CAS exchange? As in e_ncwfn includes full 2e active space contribution if I read the code correctly. Also, for hybrid funcs it might disagree.

Yes, you are right. MCPDFT energy doesn't include the e_ncwfn.
$E_{MCPDFT} = sum(E_{Decomposition}[:3 or :4])$ (depends on split_xc)

@matthew-hennefarth
Copy link
Contributor

However, it won't be that difficult to implement it. It can be represented as E O T = λ ( 1 2 g p q r s D p q r s ) + ( 1 − λ ) E [ ρ , Π ] Where it can further be decomposed into exchange and correlation.

You don't have to even do that. The MC-PDFT energy should actually be $E^{PDFT} = E^{1e} + Coul + \lambda E^{ncwfn} + (1-\lambda)E^{ot}$. If $\lambda = 0$, it will still work.

Copy link
Collaborator

@MatthewRHermes MatthewRHermes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning up my old spaghetti!

@MatthewRHermes MatthewRHermes merged commit 93c210e into pyscf:master Sep 9, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

3 participants