Two of the most well-known Python quantum chemistry pakcages, PySCF and Psi4, can solve the Hartree–Fock equations. However, I am interested in finding analytic derivatives of the electron integrals:

$$h_{pq}(R) = \displaystyle\int dx \phi_p(x)^{*} \left( -\frac{\nabla_r^2}{2} - \displaystyle\sum_{I} \frac{Z_I}{|r - R_I|} \right) \phi_q(x)$$

$$h_{pqrs}(R) = \displaystyle\int dx_1 dx_2 \frac{\phi_p(x_1)^{*} \phi_q(x_2)^{*} \phi_r(x_2) \phi_s(x_1)}{|r_1 - r_2|}$$

with respect to the nuclear coordinates. To do this, one must solve the coupled-perturbed Hartree–Fock equations. It doesn't seem like Psi4 and PySCF have this functionality, so I was wondering if there was any other package I can use to do this?

  • 4
    $\begingroup$ Hello, and welcome to Chemistry! I see you've already participated on Matter Modelling, so you'll be aware that this question would also fit there. That doesn't mean it's off-topic here, it's perfectly fine; but in the event that you ever want to move it there, feel free to let us know. (But please don't double-post on both sites.) $\endgroup$ – orthocresol Jun 21 at 21:39
  • 2
    $\begingroup$ Just checking the obvious: What order derivatives do you want? If it's only first order you don't need a CPHF solver. $\endgroup$ – Ian Bush Jun 21 at 21:52
  • 2
    $\begingroup$ Related question on Matter Modeling. As mentioned there, any program that can do geometry optimizations probably has a way of generating the gradient/hessian (or at least relevant matrix-vector products that are needed for the optimization). So I suspect Psi4 and PySCF have these quantities, its just a matter of it they provide an interface to access them. $\endgroup$ – Tyberius Jun 21 at 21:53
  • 1
    $\begingroup$ @JackCeroni But I mean if these programs computing the geometric Hessian of energy analytically, they would need the 1st and 2nd derivatives of these integrals as part of that process. $\endgroup$ – Tyberius Jun 21 at 21:58
  • 1
    $\begingroup$ Yes, for second order or greater you need a CPHF solver of appropriate order. $\endgroup$ – Ian Bush Jun 21 at 22:24

As many of the comments here and on your question at MMSE suggest, pretty much all major electronic structure software can solve the "coupled-perturbed Hartree–Fock equations" as Ian's comment points out that it's needed for the second derivatives, and most (if not all) mainstream electronic structure packages use the Hessian matrix (involving the second derivatives) to do geometry optimization.

  • Ian Bush mentioned here that CRYSTAL can do it, but is not open source.
  • My comment here mentioned that OpenMOLCAS can do it.
  • Susi Lehtola's answer here mentioned that PySCF and Psi4 can both do it, and that Psi4 allows you to print out the Hessian matrix by default (i.e. without adding your own print statements) and that the libcint library that PySCF users, or the libint library that Psi4 uses, can offer you the derivative integrals that you want.
  • The fact that the above "constellation" of software packages all offer this functionality, makes me convinced that all major electronic structure programs can calculate those derivative integrals and solve the CPHF equations (though the ease of accessing them may vary).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.