I am trying to run Molecular Orbitals within psi4 (version 1.3.2) on WebMO and I’m getting the following error in my output file:
Traceback (most recent call last):
File “/datapool/usr/local/src/psi4/psi4-python37/bin/psi4”, line 287, in
exec(content)
File “”, line 82, in
IndexError: list index out of range
Printing out the relevant lines from the Psithon → Python processed input file:
end = (i+1)*6
lin = “%12s” % (’ ')
for j in range(start,end): lin+= “%10d” % (j+1)
print_out(lin+newline)
lin = " "
→ for num in range(start,end): lin+= “%10.3f” % (float(evals[num]))
print_out("Eigenvalues: “+lin+newline)
for j in range(len(coeffs)):
lin = “%3d %5s” % (j+1,ao_labels[j].split()[0])
lin += “%5s” % (” ".join(ao_labels[j].split()[1:]))
for num in range(start,end): lin+= “%10.5f” % (float(coeffs[j][num]))
I receive the same error when trying to run psi4 in the shell environment, as well. Below is more information from my input file:
evals = list(np.array(wfn.epsilon_a_subset(“AO”, “OCC”)).astype(str))
coeffs = list(np.array(wfn.Ca_subset(“AO”, “OCC”)).astype(str))
length = int(math.ceil(len(evals)/6))
rem = len(evals)%6
start = 0
end = 0
for i in range(length+1):
if rem == 0 and i == length: break
if rem != 0 and i == length:
start = end
end = start + rem
else:
start = i*6
end = (i+1)*6
lin = “%12s” % (’ ')
for j in range(start,end): lin+= “%10d” % (j+1)
print_out(lin+newline)
lin = " "
for num in range(start,end): lin+= “%10.3f” % (float(evals[num]))
print_out("Eigenvalues: “+lin+newline)
for j in range(len(coeffs)):
lin = “%3d %5s” % (j+1,ao_labels[j].split()[0])
lin += “%5s” % (” ".join(ao_labels[j].split()[1:]))
for num in range(start,end): lin+= “%10.5f” % (float(coeffs[j][num]))
print_out(lin+newline)
print_out(newline)
oeprop(wfn, “MULLIKEN_CHARGES”)
mol.print_out()
print_variables()
Any guidance is much appreciated!