Closed mcocdawc closed 2 weeks ago
The problem leads to
================================================================================== short test summary info ===================================================================================
FAILED tests/chem_dm_kBE_test.py::Test_kBE_Full::test_kc2_sto3g_be1_chempot - AssertionError: -74.64695833012868 != -74.62798837 within 0.0001 delta (0.018969960128686125 difference) : kBE Correlation Energy for C2 (kBE1) does not match the expected correlation e...
FAILED tests/chem_dm_kBE_test.py::Test_kBE_Full::test_kc4_sto3g_be2_density - AssertionError: -149.4085332249809 != -149.37047888 within 0.0001 delta (0.03805434498090676 difference) : kBE Correlation Energy for C4 (kBE2) does not match the expected correlation e...
===================================================================================== 2 failed in 59.59s =====================================================================================
i.e. errors of up to 18 mEh.
shall I just recreate the tests with the new (now-assumed-to-be-correct) numbers @oimeitei ? Adding you @ShaunWeatherly because I just saw that you created the original test.
@mcocdawc I just looked into this (didn't have time the past few days!) but why are the test energies different? I think the question is @ShaunWeatherly did you use the libdmet_preview (linked earlier) or were you using the correct one from kbe_devel or an earlier version of libdmet_preview? I would think that with the one linked_earlier (https://github.com/oimeitei/libdmet_preview) QuEmb shouldn't run for periodic version.
If the earlier test numbers were from the correct libdmet_preview, then, something is wrong here.
but why are the test energies different?
One set of tests uses (code A):
C_ao_emb = C_ao_emb[np.newaxis]/(nkpts*(0.75))
the other one uses (code B):
C_ao_emb = C_ao_emb[np.newaxis] / (nkpts**(0.75))
I confirmed that the use of code A did give exactly the previous numbers and code B gives the new numbers. If additionally @ShaunWeatherly can confirm that he created the tests using https://github.com/oimeitei/libdmet_preview, then I think the difference is fully explained. (i.e. the multiplication stems from here )
Yep, @mcocdawc it's exactly as you described originally:
- Unfortunately there was a bug in the previous custom libdmet https://github.com/oimeitei/libdmet_preview/blob/main/libdmet/basis_transform/eri_transform.py#L296
C_ao_emb = C_ao_emb[np.newaxis]/(nkpts*(0.75)) # should actually be C_ao_emb = C_ao_emb[np.newaxis] / (nkpts**(0.75))
- this means that the test suite will fail now (as it should)
I've checked and my environment was indeed pointing to a version of libdmet
with this issue.
Ok great, thanks for confirming.