Skip to content

Converters need updating for Multideterminant wavefunctions with empty spin channel / only some formats work #5953

@prckent

Description

@prckent

Describe the bug

Report that multideterminant wavefunctions do not work with empty spin channel. This is an important case that in principle should work, but I assume the original protection logic is overly cautious. Has anyone hit this, investigated, or have an alternative route that does work with the current code?

Full report by Matej on Google Groups including reproducer files

I am trying to run a multidet CSF WF for the H_2 triplet, where N_el_down=0

First, for the single-det case, I used the default output from the converter:

<particleset name="e" random="yes" randomsrc="ion0">
  <group name="u" size="2">
    <parameter name="charge">-1</parameter>
  </group>
  <group name="d" size="0">
    <parameter name="charge">-1</parameter>
  </group>
</particleset>

<slaterdeterminant>
  <determinant id="updet"     group="u" sposet="spo_ud" size="2"/>
  <determinant id="downdet"   group="d" sposet="spo_ud" size="0"/>
</slaterdeterminant>

This produced the following error:

Fatal Error. Aborting at Some 'group' XML element node doesn't contain a 'size' attribute! 'size = 0' is not allowed in the input. Make appropriate adjustments to the input or converter.

I was able to work around this by simply removing

<group name="d" size="0">
  <parameter name="charge">-1</parameter>
</group>

and

<determinant id="downdet"   group="d" sposet="spo_ud" size="0"/>
       
After that, the calculation runs correctly.

However, when I try the multidet version:

<multideterminant optimize="no" spo_up="spo_ud" spo_dn="spo_ud">
  <detlist size="6" type="CSF" nca="0" ncb="0" nea="2" neb="0" nstates="8" cutoff="1e-05">
    <csf id="CSFcoeff_0" exctLvl="2" coeff="0.999768" qchem_coeff="0.999768" occ="11000000">
      <det id="csf_0-0" coeff="1" alpha="11000000" beta="00000000"/>
    </csf>
    <csf id="CSFcoeff_1" exctLvl="2" coeff="0.015259" qchem_coeff="0.015259" occ="00010010">
      <det id="csf_1-0" coeff="-1" alpha="00010010" beta="00000000"/>
    </csf>
........................
  </detlist>
</multideterminant>
     
I get the following error:

Fatal Error. Aborting at In SlaterDetBuilder: SPOSet "" is not found. Expected for MultiSlaterDeterminant.

I tried:
-removing spo_dn="spo_ud"
-removing ncb="0" and neb="0"
-removing all beta="..."
-using the old WF format

Is there a way to run this, or is the multidet WF not implemented for an empty spin channel?

I attached a complete example reproducing the error. The h2.wfj.xml file also contains a commented-out single-det version.

To Reproduce
File on google groups.

Expected behavior
Runs correctly.

System:
N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions