Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPOSet input style #2086

Closed
ye-luo opened this issue Nov 6, 2019 · 10 comments
Closed

SPOSet input style #2086

ye-luo opened this issue Nov 6, 2019 · 10 comments

Comments

@ye-luo
Copy link
Contributor

ye-luo commented Nov 6, 2019

The input specification of SPOSet needs to be defined. It is intended for creating a set of SPO instead of how this set of SPO will be used.

Here is the current input style for defining two sets of SPO for the up and down spin.
The 'spo_up' set has a size of 4 and takes the 4 orbitals with lowest eigenvalue from spin 0 set
The 'spo_dn' set has a size of 4 and takes the 4 orbitals with lowest eigenvalue from spin 1 set

<sposet_builder type="bspline" href="./pwscf.pwscf.h5" tilematrix="1 0 0 0 1 0 0 0 1" twistnum="0" source="ion0" version="0.10" meshfactor="1.0" precision="float" truncate="no">
   <sposet type="bspline" name="spo_up" size="4">
        <occupation mode="ground" spindataset="0"/>
   </sposet>
   <sposet type="bspline" name="spo_dn" size="4">
        <occupation mode="excited" spindataset="1">
           -4 5
        </occupation>
   </sposet>
</sposet_builder>

I think there are multiple format for occupation="excited" please comment.

For each proposed format change, please use like or unlike button to show your preference.

@ye-luo
Copy link
Contributor Author

ye-luo commented Nov 6, 2019

I don't understand why spindataset="1" is on the line of occupation. I think it make more sense on the sposet line. spindataset refers the spin dataset stored in hdf5.

@rcclay
Copy link
Contributor

rcclay commented Nov 7, 2019

Ideally, shouldn't occupations be handled by the determinant, and not by the SPOSet? Multideterminants for example.

@ye-luo
Copy link
Contributor Author

ye-luo commented Nov 7, 2019

@rcclay probably occupation is just a bad name here. it is more about selection from input.

@jtkrogel
Copy link
Contributor

jtkrogel commented Nov 7, 2019

Here is another format for occupation="excited" (see manual section 21.6):

<determinantset>
  <slaterdeterminant>
    <determinant id="updet" group="u" sposet="spo_u" size="36">
      <occupation mode="excited" spindataset="0" format="band" pairs="1" >
        0 3 4 4
      </occupation>
    </determinant>
    <determinant id="downdet" group="d" sposet="spo_d" size="36">
      <occupation mode="ground" spindataset="1"/>
    </determinant>
  </slaterdeterminant>
</determinantset>

@jtkrogel
Copy link
Contributor

jtkrogel commented Nov 7, 2019

Without occupation there are also attributes to <sposet/> to select ranges based on index or KS eigenvalue: index_min, index_max, energy_min, energy_max, ecut (manual section 9.3.9 demonstrates index_min/index_max).

I expect for orbital optimization, ecut will be very useful for active space selection as it is more intuitive than selecting by size/index.

See src/QMCWaveFunctions/SPOSetInputInfo.*. This class maps all the different requests for orbital occupations onto a boolean mask array for the actual occupations.

@jtkrogel
Copy link
Contributor

jtkrogel commented Nov 7, 2019

Without occupation, spindataset already works on <sposet/>:

<sposet_builder type="bspline" href="../../nscf/pwscf_output/pwscf.pwscf.h5" tilematrix="1 -1 0 1 1 0 0 0 2" twistnum="23" source="ion0" version="0.10" meshfactor="1.0" precision="float" truncate="no">
  <sposet type="bspline" name="spo_u" size="200" spindataset="0"/>
  <sposet type="bspline" name="spo_d" size="200" spindataset="1"/>
</sposet_builder>

@jtkrogel
Copy link
Contributor

jtkrogel commented Nov 7, 2019

The following forms should all work currently, as supported by SPOSetInputInfo. These were all added about the same time as sposet_builder itself:

Occupy the lowest 10 orbitals (w/ KS energies -10.593 -6.832 -2.583 -2.643 -2.646 0.234 5.325 11.599 11.601 11.622 eV):

<sposet type="bspline" name="spo_u" size="10" spindataset="0"/>

<sposet type="bspline" name="spo_u" index_min="0" index_max="10" spindataset="0"/>

<sposet type="bspline" name="spo_u" occ="11111111110000" spindataset="0"/>

<sposet type="bspline" name="spo_u" indices="yes" spindataset="0">
   0 1 2 3 4 5 6 7 8 9
</sposet>

<sposet type="bspline" name="spo_u" ecut="11.623" units="eV" spindataset="0"/>

<sposet type="bspline" name="spo_u" energy_min="-10.594" energy_max="11.623" units="eV" spindataset="0"/>

<sposet type="bspline" name="spo_u" energies="yes" matching_tol="1e-3" units="eV" spindataset="0">
    -10.593 -6.832 -2.583 -2.643 -2.646 0.234 5.325 11.599 11.601 11.622
</sposet>

The code needed to translate all these occupation requests into an array of booleans denoting occupied/unoccupied is simple and already present. Several of the of the forms support subspace selection and excitations of any kind in addition to ground state occupations.

@jtkrogel jtkrogel added the input label Jan 30, 2020
@ye-luo
Copy link
Contributor Author

ye-luo commented Oct 5, 2020

"occupation" in sposet for selection caused confusion with "occupation" in multi determinant. Here it means select a subset of orbitals from (xml/h5) input and build "size" SPOs, it is not directly related to electron occupation. So considering change to "selection".

"ground" and "excited" are all confusing terms. "from_lowest" and "from_lowest_with_adjustments"

@ye-luo
Copy link
Contributor Author

ye-luo commented Oct 5, 2020

Agree with @jtkrogel all input style should converge to an array of booleans before constructing the final orbitals. I would like to consolidate three ways and leave others later.

  1. select from the lowest eigenvalues/energies. old name "ground"
  2. plus minus style adjusting the case 1. old name "excited"
  3. direct binary string input. selection="11010"

@ye-luo
Copy link
Contributor Author

ye-luo commented Nov 24, 2021

The proposed sposet_builder style has been implemented, documented and tested. Remaining issue will be tracked by #3629

@ye-luo ye-luo closed this as completed Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants