qmcpack icon indicating copy to clipboard operation
qmcpack copied to clipboard

PBC LCAO HDF5 SPOSet construction not working with sposet_collection declaration style

Open rcclay opened this issue 1 year ago • 0 comments

Describe the bug To conform with recommended best practices, I'm converting my LCAO hdf5 input files over to the new <sposet_collection> construction method laid out here: https://qmcpack.readthedocs.io/en/develop/intro_wavefunction.html#sposet-collection-input-style . Doing this for the diamondC_1x1x1-Gaussian_pp_Tw_cplx test case however, I find the following error message:

Fatal Error. Aborting at Could not find in wf file the "sposet" or "determinant" tags. Please verify input or contact developers

It looks like this is triggered by LCAOrbitalBuilder::putPBCFromH5, which seems to expect to hit a "determinantset" tag first, and falls through the attached XML input to the tag, triggering the error. There is some partial SPOSet construction triggered, however. @kgasperich pointed out that the sposet_collection initialization procedure is tested for LCAO in test_spo_collection_input_MSD_LCAO_h5.cpp, but at first glance, it looks like the PBC H5 case was not tested.

To Reproduce 1.) Go to tests/solids/diamondC_1x1x1-Gaussian_pp_Tw_cplx 2.) Replace "C_diamond-twist-third.wfj.xml with the following:

<?xml version="1.0"?>
<qmcsystem>
  <wavefunction name="psi0" target="e">
    <sposet_collection  type="MolecularOrbital" name="LCAOBSet" source="ion0" transform="yes" twist="0.3101394529  0.3101394529  0.3101394529" href="dft-inputs/C_diamond-twist-third.h5" PBCimages="12 12 12">
      <sposet basisset="LCAOBSet" name="spo-up" size="26">
        <occupation mode="ground"/>
        <coefficient size="26" spindataset="0"/>
      </sposet>
    <!--  <sposet basisset="LCAOBSet" name="spo-dn" size="26">
        <occupation mode="ground"/>
        <coefficient size="26" spindataset="0"/>
      </sposet> -->
    </sposet_collection>
    <determinantset>
      <slaterdeterminant>
        <determinant id="updet" group="u" sposet="spo-up" size="4" />
        <determinant id="downdet" group="d" sposet="spo-up" size="4" />
      </slaterdeterminant>
    </determinantset>
  </wavefunction>
</qmcsystem>

3.) Run. Should produce aforementioned error message.

Expected behavior Successful construction of 1 SPOSet and a single determinant wave function with 1 up and 1 down determinant, each using the same SPOSet.

System:

  • RHEL7

rcclay avatar May 04 '23 17:05 rcclay