I’m getting crazy about how obtain the matrix coefficients of the excitations and de-excitations of the transitions of each state (XY matrix or the vector X and Y in the TDDFT using or not TDA and restricted or unrestricted). Anyone knows how to obtain this matrix or vectros? Is this developed yet or it is in progress?

Psi4 exports the left and right eigenvectors which are linear combinations of X and Y, as defined in the documentation. So you need to extract the left and right eigenvectors, then get X and Y back out of it.

This will work for the restricted case and the alpha orbitals for the unrestricted case. Replace ALPHA with BETA for the beta orbitals in the unrestricted case. There are other names for these variables, but they’re only useful if you have symmetry, so I’ve omitted them as probably unnecessary for your use.

With TDA:
Obtain X as the wavefunction variable TD-fctl ROOT 0 -> ROOT n LEFT EIGENVECTOR ALPHA.

Without TDA:
Obtain L as TD-fctl ROOT 0 -> ROOT n LEFT EIGENVECTOR ALPHA and R as the same, but with RIGHT instead of LEFT. Then X = (R+L)/2 while Y=(R-L)/2.

I have this input, as an example:
mol = psi4.geometry(“”"
0 1
H -0.112660000 0.000000000 0.000000000
H 1.112660000 0.000000000 0.000000000
H -0.112660000 0.000000000 2.500000000
H -0.112660000 0.000000000 3.725320000
symmetry c1
“”")

e, wfn = psi4.energy(‘td-b3lyp’, return_wfn=True)
How can i extract the L and R eigenvectors? i probe it using:
L=wfn.variable(“TD-fctl ROOT 0 → ROOT n LEFT EIGENVECTOR ALPHA”) but it doesn’t work, have i do a loop n for all the states?

fctl needs to be the name of your functional (B3LYP) and n needs to be the index of the state you care about. If you want multiple states, loop over n, starting at n=1.