Closed binghuang2018 closed 3 years ago
Here is the solution by @adabbott (copied from my Email)
Thanks for trying out Quax. Sorry you are having difficulties, it is largely experimental, and I have since graduated and do not have much time to work on improving it. You did nothing wrong, but it looks like from: Assertion `false && "3-rd and higher derivatives not yet generalized" your version of Libint does not have the new Engine API, and this is partly my fault since the PR that fixes it is not yet merged. Let me explain:
Even if you compile Libint with support for higher order derivatives, Libint's "Engine" API in the current version can only compute up to 2nd order. I have a PR (https://github.com/evaleev/libint/pull/200) opened that fixes this but it is currently dormant. I will ask Ed to see what we need to do to get that merged soon. This will only fix higher order derivatives for overlap, kinetic, and electron repulsion integrals. Nuclear-electron attraction integrals are another story... I am not sure if Libint will ever support beyond 2nd order. I have had to use Quax's native integrals code for the nuclear-electron attraction integral derivatives, and Quax works around (https://github.com/CCQC/Quax/blob/5d41cd1749fbe35e0fdf69bb45fb74263ead42db/quax/methods/ints.py#L69) this even if you are using Libint, although it is a bit awkward.
Please verify that the code you sent me works when you change "deriv_order=4" to "deriv_order=2". If that works, then the following fix might help: For two-electron integral derivatives, I think you can get it working with minimal effort by copying this altered engine.impl.h file in my Libint PR (https://github.com/evaleev/libint/pull/200/commits/22dac951f0a2558ad46f80598e34327852b603d8) and replacing the engine.impl.h file in your Libint installation with that one. This will add support for 3rd and 4th derivatives of two-electron integrals. Finally, change 'integral_algo': 'libint_core' to 'integral_algo': 'libint_disk', to deal with Libint being unable to compute nuclear-electron attraction integral derivatives (it will use Libint for TEI's and Quax for OEI's, pack them up into disk-based arrays, and then read them). Ideally, this clunky logic would be fixed, but its hard when you depend on an external library that doesn't have all the features we need.
Hope this helps,
Adam
Hi, @adabbott, I tried the altered engine.impl.h file, but end up with a different error:
python: /opt/gnu/libint/2.7.0-beta.6-ninja-lmax2-deriv4/include/libint2/./engine.impl.h:469: const target_ptr_vec& libint2::Engine::compute1(const libint2::Shell&, const libint2::Shell&): Assertion `deriv_order_ <= 2 && "feature not implemented"' failed.
forrtl: error (76): Abort trap signal
Image PC Routine Line Source
libgdma.so 00007FC0140CF10F for__signal_handl Unknown Unknown
libpthread-2.31.s 00007FC01908D3C0 Unknown Unknown Unknown
libc-2.31.so 00007FC018D6518B gsignal Unknown Unknown
libc-2.31.so 00007FC018D44859 abort Unknown Unknown
libc-2.31.so 00007FC018D44729 Unknown Unknown Unknown
libc-2.31.so 00007FC018D55F36 Unknown Unknown Unknown
libint_interface. 00007FBC8A50227A _ZN7libint26Engin Unknown Unknown
libint_interface. 00007FBC8A4C1010 Unknown Unknown Unknown
libint_interface. 00007FBC8A4FE4FF Unknown Unknown Unknown
libint_interface. 00007FBC8A4F913E Unknown Unknown Unknown
python 00005615C028B427 _PyMethodDef_RawF Unknown Unknown
python3.7 00005615C028CAD8 Unknown Unknown Unknown
python 00005615C02B774A _PyEval_EvalFrame Unknown Unknown
python 00005615C01FBEAD _PyFunction_FastC Unknown Unknown
python3.7 00005615C0261F93 Unknown Unknown Unknown
python 00005615C01FE08C PyObject_Call Unknown Unknown
python 00005615C02B4AA7 _PyEval_EvalFrame Unknown Unknown
python 00005615C0228E94 _PyFunction_FastC Unknown Unknown
...
Any idea?
Issue here was Quax was calling Libint asking for 3rd and higher derivatives of potential integrals, but even with the patch to engine.impl.h, this is not fixed (that only fixes two-electron integral derivatives). For now, under latest commit Quax will use its own integrals for potential integrals whenever deriv order is greater than 2, even if the user requests Libint integrals/integral derivatives.
Updating Quax to latest version should hopefully fix the above error.
While running Quax, I encountered the following error:
I followed exactly your Quax github page for installation of libint2 (and related conda packages). The setting --enable-1body=4 --enable-eri=4 did export
deriv4
related source files. So the problem must be related to the compilation of libint2. Any idea how this happen?PS: Just fyi, here is the content of my Quax input file