BoothGroup / Vayesta

A Python package for wave function-based quantum embedding
Apache License 2.0
32 stars 7 forks source link

Some changes to facilitate newly implemented CCSDt #148

Closed abhishekkhedkar09 closed 8 months ago

abhishekkhedkar09 commented 10 months ago

Added Active space support for EBCC CCSDt; Avoid considering auxiliary for orthogonality tests for EC-CC or TCC calculations. Changes in hamiltonian.py to return a np array of (2, modim, modim) instead of a tuple, the tuple results in errors in ebcc for UHF. PYSCF-wide default is the np array.

obackhouse commented 10 months ago

Is it better to fix

Changes in hamiltonian.py to return a np array of (2, modim, modim) instead of a tuple, the tuple results in errors in ebcc for UHF

in ebcc instead? I think this line would just need changing:

https://github.com/BoothGroup/ebcc/blob/ff5240121b23e43c2e760968946f51900b13c805/ebcc/uebcc.py#L448

to np.asarray(mf.get_fock())? or is the error somewhere else?

abhishekkhedkar09 commented 10 months ago

Is it better to fix

Changes in hamiltonian.py to return a np array of (2, modim, modim) instead of a tuple, the tuple results in errors in ebcc for UHF

in ebcc instead? I think this line would just need changing:

https://github.com/BoothGroup/ebcc/blob/ff5240121b23e43c2e760968946f51900b13c805/ebcc/uebcc.py#L448

to np.asarray(mf.get_fock())? or is the error somewhere else?

That's what I thought at first. But I tested what pyscf returns for UHF mf.get_fock() and it is indeed (2, nmo, nmo ) and not a tuple. I recall this was put in as pad_to_match fix for active spaces with unequal numbers of electrons/orbitals in alpha and beta channels.

obackhouse commented 10 months ago

cool, up to you

codecov[bot] commented 10 months ago

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (511ef48) 71.53% compared to head (7ce8c20) 0.00%. Report is 1 commits behind head on master.

Files Patch % Lines
vayesta/solver/ebcc.py 0.00% 7 Missing :warning:
vayesta/solver/hamiltonian.py 0.00% 2 Missing :warning:
vayesta/core/qemb/qemb.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #148 +/- ## ========================================== - Coverage 71.53% 0.00% -71.54% ========================================== Files 152 152 Lines 20159 20164 +5 Branches 3343 0 -3343 ========================================== - Hits 14420 0 -14420 - Misses 4906 20164 +15258 + Partials 833 0 -833 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.