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

Some changes to facilitate newly implemented CCSDt #148

Merged
merged 9 commits into from
Jan 19, 2024
Merged

Some changes to facilitate newly implemented CCSDt #148

merged 9 commits into from
Jan 19, 2024

Conversation

abhishekkhedkar09
Copy link
Contributor

@abhishekkhedkar09 abhishekkhedkar09 commented Nov 6, 2023

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.

avoid considering auxiliary for orthogonality tests;
Changes in hamiltonian.py to return a np array of (2, modim, modim) instead of a tuple, the tuple results in errors in ebcc calculations for UHF. PYSCF-wide default is the np array.
@obackhouse
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Contributor

cool, up to you

typo in np.asarray
Copy link

codecov bot commented Nov 6, 2023

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 ⚠️
vayesta/solver/hamiltonian.py 0.00% 2 Missing ⚠️
vayesta/core/qemb/qemb.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

solver=EBCC and ansatz=CCSDt possibility added
@@ -639,7 +640,7 @@ def get_fock(self, with_vext=True, use_seris=True, with_exxdiv=False):
+ einsum("iipq->pq", gab[oa, oa]) # Coulomb
- einsum("ipqi->pq", gbb[ob, :, :, ob])
) # Exchange
fock = ((fock[0] + dfa), (fock[1] + dfb))
fock = np.asarray(((fock[0] + dfa), (fock[1] + dfb)))
Copy link
Contributor

@maxnus maxnus Nov 8, 2023

Choose a reason for hiding this comment

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

Can this can be packed into a single array, if fock[0] and fock[1] could have different shapes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It can not be if the shapes are different. Wouldn't Fock matrices for alpha and beta always have the same shape?

@ghb24 ghb24 merged commit 22506b2 into master Jan 19, 2024
5 of 6 checks passed
@ghb24 ghb24 deleted the for_CCSDt branch January 19, 2024 17:35
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.

4 participants