Problems with psi4 Vectors

Dear Psi4-Team,

I’m playing around with the Python capability of Psi4. Currently I’m trying to ride an HF code, following the tutorial on David Sherrill’s Homepage (http://vergil.chemistry.gatech.edu/resources/programming/hf-project.pdf). However, the script crashes whenever I try to build a Vector, e.g.:

U = Matrix(nbf, nbf)
sEV = Vector(nbf)
S.diagonalize(U, sEV, DiagonalizeOrder.Ascending)

leads to the error

An error has occurred python-side. Traceback (most recent call last):

File “”, line 144, in

File “”, line 57, in copt2

TypeError: ‘Vector’ object is not callable

Matrix operations seem to work without problems. Has anyone seen something like this before?

Best regards,

Johannes

This works fine for me. It sounds like you redefined “Vector” somewhere from the error message. Without the full input I cannot help you further.

Thanks for running the code! You are right, the error is not in the portion of the code that I posted. As it turns out I was trying to use values from the vector with the syntax:

value = sEV(i)

instead of doing

value = sEV.get(i)

So that’s where the error message came from. Thanks for your help!