Hi,
I am new to using PSI4 for the QM calculations. I started doing optimization and energy calculations and successfully able to run that. I am currently looking to calculate HOMO-LUMO calculations for small molecules. I got script from this forum and used it to run. Then I got an error which I pasted below:
Traceback (most recent call last):
File “C:\Users\Velan.conda\envs\psi4-env\Scripts\psi4-script.py”, line 337, in
exec(content)
File “”, line 40, in
File “C:\Users\Velan.conda\envs\psi4-env\lib\site-packages\psi4\driver\p4util\numpy_helper.py”, line 489, in _irrep_access
raise ValidationError(“Attempted to access by index/iteration a Psi4 data object that supports multiple”
psi4.driver.p4util.exceptions.ValidationError: Attempted to access by index/iteration a Psi4 data object that supports multiple irreps. Please use .np or .nph explicitly.
Printing out the relevant lines from the Psithon → Python processed input file:
“”“)
core.IO.set_default_namespace(”“)
core.set_global_option(“BASIS”, “6-31+g(d,p)”)
gradient(‘b3lyp’)
scf_e, scf_wfn = energy(“B3LYP/6-31+g(d,p)”, return_wfn=True)
→ HOMO = scf_wfn.epsilon_a_subset(“AO”, “ALL”)[scf_wfn.nalpha()]
LUMO = scf_wfn.epsilon_a_subset(“AO”, “ALL”)[scf_wfn.nalpha() + 1]
print(”\nThe HOMO - LUMO gap is %16.8f hartree" % (LUMO - HOMO))
!----------------------------------------------------------------------------------!
! !
! Attempted to access by index/iteration a Psi4 data object that supports !
! multiple irreps. Please use .np or .nph explicitly. !
! !
!----------------------------------------------------------------------------------
The input file I have used is below:
molecule {
0 1
C -3.36149391 -0.76945670 0.24637954
C -1.97984581 -0.94928857 0.09594355
C -1.15952779 0.14590121 -0.20664469
C -1.72085725 1.42092368 -0.35879230
C -3.10250484 1.60075623 -0.20835245
C -3.92282332 0.50556583 0.09423230
H -3.98782521 -1.60565879 0.47741023
H -1.55125815 -1.92279631 0.21211281
H -1.09452641 2.25712515 -0.58982646
H -3.53109232 2.57426422 -0.32452034
H -4.97774215 0.64287166 0.20909471
C 0.35876629 -0.05171694 -0.37196303
O 1.19582585 1.06582412 -0.68072392
H 1.95225965 0.76769049 -1.19113968
O 0.86281705 -1.19663533 -0.23534214
}
set basis 6-31+g(d,p)
gradient(‘b3lyp’)
scf_e, scf_wfn = energy(“B3LYP/6-31+g(d,p)”, return_wfn=True)
HOMO = scf_wfn.epsilon_a_subset(“AO”, “ALL”)[scf_wfn.nalpha()]
LUMO = scf_wfn.epsilon_a_subset(“AO”, “ALL”)[scf_wfn.nalpha() + 1]
print(“\nThe HOMO - LUMO gap is %16.8f hartree” % (LUMO - HOMO))
Can anyone help me in rectifying this?