Skip to content

Commit

Permalink
just get one eigenvalue
Browse files Browse the repository at this point in the history
  • Loading branch information
mpmdean committed Aug 13, 2024
1 parent 8c0bdf6 commit 3e32647
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/sphinx/example_5_charge_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,13 @@
basis_d = edrixs.get_fock_bin_by_N(10, nd + n_ligand_holes)
Hd = (edrixs.build_opers(2, emat_chb[:10, :10], basis_d)
+ edrixs.build_opers(4, umat[:10, :10, :10, :10], basis_d))
ed = scipy.linalg.eigh(Hd)[0][0]
ed = scipy.linalg.eigh(Hd, eigvals_only=True, subset_by_index=[0, 0])[0]

basis_L = edrixs.get_fock_bin_by_N(10, 10 - n_ligand_holes)
HL = (edrixs.build_opers(2, emat_chb[10:, 10:], basis_L)
+ edrixs.build_opers(4, umat[10:, 10:, 10:, 10:], basis_L))
eL = scipy.linalg.eigh(HL)[0][0]
eL = scipy.linalg.eigh(HL, eigvals_only=True, subset_by_index=[0, 0])[0]

energies.append(ed + eL)

print(f"Energy to lowest energy ligand state is {energies[1] - energies[0]:.3f} eV")
Expand Down

0 comments on commit 3e32647

Please sign in to comment.