I am writing a writing orbital optimization program inside ACESII. I am following the prescription given by the papers listed at
Taking OO-MP2 as the simplest example, I find full agreement between the 1, 2 PDMs, orbital gradient, and the rotation matrix kappa at the first OO iteration. However, beyond the first iteration I find several discrepancies between ACESII and Psi4 OO. I check my program against a numerical gradient implementation, which finds agreement. So I am struggling to understand what is internally going on inside Psi4. I think it would help me immensely if someone could help me slightly modify the Psi4 source code to print the first order T2 at each OO iteration to perform OO-MP2. It would also be helpful if I could print the Psi4 (non-iterated) SCF energy recovered at each OO iteration.
I have been adding print statements inside Psi4 and recompiling so that I can better compare the outputs with ACESII. But it seems the T2 amplitudes are handled using this global_dpd_ class, that I am not savvy enough to manipulate. Any help in this matter would be appreciated.
Quantum Theory Project
University of Florida
I’m the developer who knows the
occ module the best, nowadays. You can find a Python implementation of OO-MP2 here: psi4numpy/10a_orbital-optimized-mp2.ipynb at master · psi4/psi4numpy · GitHub This is most certainly not production level but should be adequate for debugging a toy problem and much more straightforward than our C++.
The learning curve for libdpd is extraordinarily steep. If you want to print an object, use the
buf4_print function. See example usage in
The single-determinant energy computed with the current orbitals is not computed in
occ. I would need to think about what the best way to compute this is, but you may be better served using the Python for these debugging purposes.
That you’re disagreeing with Psi on intermediate steps is not inherently a problem. For example, I’d be utterly unsurprised if there were small disagreements in converting between the rotation matrix kappa to exp(kappa). Are you seeing something that indicates your code is incorrect?
If you need anything else, feel free to ping me directly or contact me on the Psi4 Slack server. Just mention that you have a question about
occ, and you’ll be pointed in my direction.
Thank you for the reply. I will take a look at the python implementation and see if I can figure things out myself. I expect that I will direct message you in the coming days. I appreciate the help thusfar.