Psi4 version : 1.9.1
I’m trying to request CCEOM roots for each irrep in the C2v and Cs point groups for H2O+. This works fine in C2v, searching for roots belonging to the irreps A1, A2, B1, and B2
# example showing EOM-CCSD calculation in the C2v point group
molecule H2OX {
    1  2
    symmetry C2v
    units ang
    O
    H   1 R
    H   1 R 2 angle
    R = 1.1
    angle = 108.8
}
# -- HF
set reference rohf
set maxiter 100
set basis cc-pVTZ
# -- EOM-CCSD
set eom_reference rohf
set roots_per_irrep [ 2, 2, 2, 2 ]
nRootsPerIrrep = 2
energy(f"eom-ccsd")
for n in range(0, nRootsPerIrrep):
  E_A1 = variable(f"CCSD ROOT {n} (IN A1) TOTAL ENERGY")
  E_A2 = variable(f"CCSD ROOT {n} (IN A2) TOTAL ENERGY")
  E_B1 = variable(f"CCSD ROOT {n} (IN B1) TOTAL ENERGY")
  E_B2 = variable(f"CCSD ROOT {n} (IN B2) TOTAL ENERGY")
  print(f"Root {n} in each irrep")
  print(f"----------------------")
  print(f"A1 energy: {E_A1}")
  print(f"A2 energy: {E_A2}")
  print(f"B1 energy: {E_B1}")
  print(f"B2 energy: {E_B2}")
  print()
but fails in Cs looking for roots belonging to A’ (Ap) and A’’ (App)
# example showing EOM-CCSD calculation in the Cs point group
molecule H2OX {
    1  2
    symmetry Cs
    units ang
    O
    H   1 R
    H   1 R 2 angle
    R = 1.1
    angle = 108.8
}
# -- HF
set reference rohf
set maxiter 100
set basis cc-pVTZ
# -- EOM-CCSD
set eom_reference rohf
set roots_per_irrep [ 2, 2 ]
nRootsPerIrrep = 2
energy(f"eom-ccsd")
for n in range(0, nRootsPerIrrep):
  E_Ap = variable(f"CCSD ROOT {n} (IN Ap) TOTAL ENERGY")
  E_App = variable(f"CCSD ROOT {n} (IN App) TOTAL ENERGY")
  print(f"Root {n} in each irrep")
  print(f"----------------------")
  print(f"Ap energy: {E_Ap}")
  print(f"App energy: {E_App}")
  print()
The error I get is as follows
Traceback (most recent call last):
  File "/home/josh/Workspace/ResearchCodes/Psi4/bin/psi4", line 387, in <module>
    exec(content)
  File "<string>", line 40, in <module>
  File "/home/josh/Workspace/ResearchCodes/Psi4/lib/python3.11/site-packages/psi4/driver/p4util/python_helpers.py", line 1121, in _core_variable
    raise KeyError(f"psi4.core.variable: Requested variable '{key}' was not set!\n")
KeyError: "psi4.core.variable: Requested variable 'CCSD ROOT 0 (IN Ap) TOTAL ENERGY' was not set!\n"
Printing out the relevant lines from the Psithon --> Python processed input file:
    nRootsPerIrrep = 2
    fileAp  = open("Ap.pec.dat", "w")
    fileApp  = open("App.pec.dat", "w")
    energy(f"eom-ccsd")
    for n in range(0, nRootsPerIrrep):
-->   E_Ap = variable(f"CCSD ROOT {n} (IN Ap) TOTAL ENERGY")
      E_App = variable(f"CCSD ROOT {n} (IN App) TOTAL ENERGY")
      print(f"Root {n} in each irrep")
      print(f"----------------------")
      print(f"Ap energy: {E_Ap}")
      print(f"App energy: {E_App}")
!----------------------------------------------------------------------------------!
!                                                                                  !
!  "psi4.core.variable: Requested variable 'CCSD ROOT 0 (IN Ap) TOTAL ENERGY' was  !
!     not set!\n"                                                                  !
!                                                                                  !
!----------------------------------------------------------------------------------!
I’m not sure what’s going on here. Am I not targeting the right variables, or is something preventing what I expect to be the right variables from being set ? I’ve already tried different capitalizations of “Ap” and “App” and have distorted the molecule to where the full point group is Cs and not C2v — just in case this was somehow an issue — but am getting the same error.