Question on oscillator strength calculation using python API

I’m trying to perform oscillator strength calculation using eom-ccsd using the following python script.

#!/usr/bin/env python                                                                                                                                         
import psi4
psi4.set_memory('500 MB')
h2o = psi4.geometry("""                                                                                                                                       
O                                                                                                                                                             
H 1 0.96                                                                                                                                                      
H 1 0.96 2 104.5                                                                                                                                              
""")
psi4.set_options(
    {'reference': 'rhf',
     'basis':'aug-cc-pVDZ',
 'freeze_core':'true',
 'roots_per_irrep':'[5,5]'
})

ene, wf = psi4.energy(‘eom-ccsd’, return_wfn=‘on’)
psi4.properties(‘eom-ccsd’, properties=[‘oscillator_strength’])#, ‘rotational_strength’])


But running this script give me the following error.

Traceback (most recent call last):
  File "h2o.py", line 19, in <module>
    ene, wf = psi4.energy('eom-ccsd', return_wfn='on')
  File "/Users/juyonglee/anaconda3/lib/python3.6/site-packages/psi4/driver/driver.py", line 492, in energy
    wfn = procedures['energy'][lowername](lowername, molecule=molecule, **kwargs)
  File "/Users/juyonglee/anaconda3/lib/python3.6/site-packages/psi4/driver/procrouting/proc.py", line 2883, in run_eom_cc
    core.cceom(ref_wfn)
RuntimeError: 
Fatal Error: Must provide roots_per_irrep vector in input.
Error occurred in file: /Users/github/builds/conda-builds/psi4-multiout_1532543506730/work/psi4/src/psi4/cceom/get_eom_params.cc on line: 106
The most recent 5 function calls were:

Any suggestion on this problem?

Thank you.

There are two problems I can spot right away:

  1. When you use the Python API, options that “make sense” to be Python types should really be those Python types! So [5,5] should be a list, not a string. When I make that change, I get past that error and ran into the next one…
  2. The geometry you put in is for C2v water, which has four irreps. So roots_per_irrep had better have length four.

Hopefully your EOM goes smoothly after those fixes.