Skip to content

Commit

Permalink
Fix the shape bug in make_eris_incore in gccsd.py
Browse files Browse the repository at this point in the history
As described in issues pyscf#2002
  • Loading branch information
zhcui authored and sunqm committed Jan 3, 2024
1 parent 0bc590f commit 429313f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pyscf/cc/gccsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ def _make_eris_incore(mycc, mo_coeff=None, ao2mofn=None):
mo = mo_a + mo_b
eri = ao2mo.kernel(mycc._scf._eri, mo)
if eri.size == nmo**4: # if mycc._scf._eri is a complex array
eri = eri.reshape(nmo**2, nmo**2)
sym_forbid = (orbspin[:,None] != orbspin).ravel()
else: # 4-fold symmetry
sym_forbid = (orbspin[:,None] != orbspin)[np.tril_indices(nmo)]
Expand Down

0 comments on commit 429313f

Please sign in to comment.