Skip to content

Commit

Permalink
sorted in canon
Browse files Browse the repository at this point in the history
  • Loading branch information
nmayhall-vt committed Jun 15, 2023
1 parent 6fdea27 commit f050ae6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion orbitalpartitioning/orbitalpartitioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ def canonicalize(orbital_blocks, F):
for obi, ob in enumerate(orbital_blocks):
fi = ob.T @ F @ ob
fi = .5 * ( fi + fi.T )
e, U = np.linalg.eig(fi)
e, U = np.linalg.eigh(fi)
perm = e.argsort()
e = e[perm]
U = U[:,perm]
out.append(ob @ U)
return out

Expand Down

0 comments on commit f050ae6

Please sign in to comment.