convert casci wavefunction obtained by PySCF to qmcpack
the example from file "qmcpack-4.1.0/tests/converter/test_LiH_MSD_pyscsf/LiH.py" runs successfully, however, when convert the LiH_multidet.h5 file to qmcpack is wrong. the test text is "convert4qmc -orbitals LiH.h5 -multidet LiH_multidet.h5", the error message shows that "QMCPACK ERROR HDF5 read failure in hdf_archive::read NbDet Fatal Error. Aborting at Unhandled Exception" . It is same as the error of issue #5563 In addition , we test the text : convert4qmc -orbitals LiH.h5", which can obtain a wavefuction with single determiment. So how to get a correct wavefuction with multideterminants by PySCF
We will try to reproduce this locally "by hand". The test reports as passing in our nightly tests ( e.g. https://cdash.qmcpack.org/testSummary.php?project=1&name=converter_test_LiH_MSD_pyscf&date=2025-07-30 ), but it checks against a "gold" reference file. This is clearly insufficient to catch this problem &/or has its own bugs. Since these files were run directly in QMCPACK at some point in the past, presumably there has been an update somewhere since then causing breakage. e.g. Possibly an old version of PySCF will work.
OK, thank you, I try it again and it converts successfully.
I want to test the QMC calculation of O2_MSD_PySCF, the QMCPACK inputs are convert successfully, but the VMC energies are wrong, which is positive value, and the BFD pseudopotential are used. All of the input have been uploaded.
Hello @huangxxxxxxxx ,
You encountered a QMCPACK error: HDF5 read failure in hdf_archive::read NbDe. This is because the -ci option in convert4qmc generates a new output file. My guess is that you may have missed this newly created file and instead used the one that doesn't contain the CI coefficients.
Which version of QMCPACK are you using? The latest development branch should include a clearer message to warn users that the CI coefficients are written to a separate file.
That being said, this does not address the issue I raised regarding how the MOs from PySCF are registered. Therefore, one solution would be to use either GAMESS or QP2 instead.
Version of QMCPACK is QMCPACK-dev, and the error of HDF5 is the key word wrong "convert4qmc -orbitals o2.h5 -multidet o2_multidet.h5" when change -multidet o2_multidet.h5 to -multidet o2.h5, the convert4qmc runs successfully. the multi-determinants information saves in o2.h5 file and not saves o2_multidet.h5. In order to exlpore this question deeply, example of qmcpack-4.1.0/tests/converter/test_LiH_MSD_pyscsf/LiH.py are tested. The input files and QMC results have been uploaded, which the VMC energies are sensible and not similar as O2 systems. All calculation are fromQMCPACK-dev, which means QMCPACK-3.17.9.