Incorrect mix coeffs from `get_p`
It seem that the get_p function in libxc.cc is not correctly handling the mix coefficients for multiple aux functionals.
It is mainly this line that make the returned mix_coef all the same.
For example, for pbe0 (id 406), the correct mixing (returned from LibXCFunctional class aux_funcs method) is:
[('gga_x_pbe', 0.75), ('gga_c_pbe', 1.0)]
However, the mix_coef returned from get_p is array([0.75, 0.75]).
Hi @y1xiaoc ! Thank you for your interest in using jax-xc. I'm currently busy with other projects so might not have bandwidth to fix this (Plus I don't have the original dev env so setting this up needs some time). Would you mind putting up a PR for this if you already have idea about how to fix this?
@DyeKuu thanks for the reply! Since setting up the dev env seems to be a non-trivial task, making a PR would also be out of bandwidth on my side. That said, I managed to bypass the problem by directly calling LibXCFunctional.aux_funcs. So I'm ok to leave it there for now ;)
Very likely due to this line https://github.com/sail-sg/jax_xc/blob/60c3eadeca710fede723bd449512fd12c9e9181b/gen_repo/libxc/register.h#L22
Basically, xc.h is a c header, when we include in c++ translation unit we need to extern "C", otherwise it is likely the byte alignment are different for c and c++.