Skip to content

Commit

Permalink
Correcting AABB spin cases, which, it seems, were never actually incl…
Browse files Browse the repository at this point in the history
…uded correctly in the first place.
  • Loading branch information
lothian committed May 2, 2024
1 parent 5dd588f commit 61399bb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions magpy/aat_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ def det_overlap(self, bra_indices, bra_spin, ket_indices, ket_spin, S, o):
if bra_spin == 'AA':
S_alpha[[a,i],:] = S_alpha[[i,a],:]
S_alpha[[b,j],:] = S_alpha[[j,b],:]
elif bra_spin == 'BB':
S_beta[[a,i],:] = S_beta[[i,a],:]
beta[[b,j],:] = S_beta[[j,b],:]
elif bra_spin == 'AB':
S_alpha[[a,i],:] = S_alpha[[i,a],:]
S_beta[[b,j],:] = S_beta[[j,b],:]
Expand All @@ -312,6 +315,9 @@ def det_overlap(self, bra_indices, bra_spin, ket_indices, ket_spin, S, o):
if ket_spin == 'AA':
S_alpha[:,[a,i]] = S_alpha[:,[i,a]]
S_alpha[:,[b,j]] = S_alpha[:,[j,b]]
if ket_spin == 'BB':
S_beta[:,[a,i]] = S_beta[:,[i,a]]
S_beta[:,[b,j]] = S_beta[:,[j,b]]
elif ket_spin == 'AB':
S_alpha[:,[a,i]] = S_alpha[:,[i,a]]
S_beta[:,[b,j]] = S_beta[:,[j,b]]
Expand Down

0 comments on commit 61399bb

Please sign in to comment.