There we go, the last five lines was what I was looking for!
“Unable to compute torsion value” is a fairly common problem in optimizations in Psi4. I think this is on the list of things to improve in the rewritten optimizer, but @Rollin_King would know for sure.
In the meantime, setting opt_coordinates
to cartesian
has worked for me before.