Lambda not converged

I’m having trouble getting a calculation to converge. The error I always get says the following:

         ** Lambda not converged to 1.0e-07 **

Fatal Error: cclambda: error
Error occurred in file: D:\a\1\s\psi4\src\psi4\cc\cclambda\ on line: 297

Before this happens 50 iterations of calculations get printed to the screen, and while the values in the “RMS” column remain above 1.0e-07, they do trend downward the entire time (the 50th iteration has an RMS value of 2.254e-07). I’ve read the CCLAMBDA documentation and it seems like I have the ability to enforce either a less strict limit on the convergence by modifying the value of r_convergence or I can allow the code to perform more iterations by modifying maxiter, in the hope that the value will drop within acceptable bounds. But despite modifying both parameters, the code’s behaviour has not changed. More specifically, I’ve added the following line of code:

psi4.set_options({'maxiter': '75', 'r_convergence': '6'})

Yet the script still only performs 50 iterations and still fails because lambda failed to converge to 7 decimal places, not 6. What is going on here? Do I need to a different function than psi4.set_options? I’d appreciate some feedback on this issue.

For reasons I haven’t looked into, when you pass a string to an argument expecting in an integer, Psi will neither try to coerce the string to an integer nor raise an issue, but say it is setting the option when it actually does not. This is a rather passive-aggressive approach to options setting. I have a backlog of other things to look into, so I unfortunately can’t try to fix this right now.

Use psi4.set_options({'maxiter': 75, 'r_convergence': 6}) to get Psi to do what you want.

1 Like