QMCPACK / QMCPACK/qmcpack

Energy inconsistency in Quantum Package to QMCPACK converter

Open
#4,558 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
403
Forks
154
Avg merge
1d 13h
Merged PRs (30d)
90

Description

**Describe the bug**
When a single determinant of natural orbitals (SD-NO's) obtained with the software Quantum Package 2 is converted into QMCPACK input, the VMC energy of this set of orbitals without a Jastrow factor is ~2 Ha higher than the variational PT2 energy of the input SD-NO's using QMCPACK 3.16.9 with batched drivers.

**To Reproduce**
**NOTE: The SBATCH files may need to be changed, depending where this code is rerun.**
**Step 0.** Download the attached ZIP file (cri3_issue.zip) and uncompress.
**Step 1.** From the top directory, execute 1_save_for_qmcp.sbatch.in or working analogue.
**Step 2.** From the top directory, execute 2_conv4qmc.sbatch.in or working analogue.
**Step 3.** From the top directory, execute 3_vmc.sbatch.in or working analogue.
**Step 4.** From the top directory, execute the command: qmca -q ev vmc.s000.scalar.dat
**Step 5** From the top directory, execute the command: grep -e "* Energy of state 1" fci.out -m 1

**Expected behavior**
Upon executing step 1, three output files will be generated, the contents of which should match those in /cri3_issue/x_output/1_save_for_qmcpack. Upon executing step 2, several output and XML files will be generated, the contents of which should match those in /cri3_issue/x_output/2_conv4qmc. Lastly, execution of step 3 will give output files that should match those in /cri3_issue/x_output/3_vmc.

_Note that the contents of the QP2QMCPACK.* files generated in step 2 (with the exception of QP2QMCPACK.h5) should NOT match the vmc.* files provided for running step 3; the QMC input files generated in step 2 were renamed, and their parameters manually changed to perform the desired VMC calculation._

Step 4 should yield something like the following...
LocalEnergy Variance ratio
QP2QMCPACK series 0 -237.342646 +/- 0.004025 47.095968 +/- 0.197978 0.1984
while Step 5 will yield: Energy of state 1 -239.1695046989506.
Both numbers are in units of Ha.

**System:**
- Conversion performed on Cori, VMC calculation performed on Perlmutter
- Other systems where this is reproducible: Polaris

**Additional context**
This followed a workflow in which PySCF orbitals were expanded with CIPSI and diagonalized back to NO's, on which CIPSI was run again. The NO's provided here were the 3rd iteration of such a procedure. The CIPSI calculations weighted ground state- and excited state-contributing determinants equally.

Additionally, it was noticed that the QP2QMCPACK converter generated an input vmc.structure.xml which erroneously has number of up-spin electrons = 41 and number of down-spin electrons = 29, in contrast to the original 38 up-spin and 32 down-spin electrons. This was kept for reproducibility, and it was checked that correcting these two numbers still yields an erroneously high VMC energy.

Several crucial files for reproducing this were NOT uploaded because of their size. I have added text placeholders, so please ask me for files as you may need them and we can transfer them some other way.
[cri3_issue.zip](https://github.com/QMCPACK/qmcpack/files/11277283/cri3_issue.zip)

Contributor guide

Open the contributing guide

Research direction

Start with cri3_issue.zip and rerun 1_save_for_qmcp.sbatch.in, 2_conv4qmc.sbatch.in, and 3_vmc.sbatch.in, then inspect the generated QP2QMCPACK files and vmc.structure.xml. Compare the reported spin counts and the Step 4 VMC energy with the Step 5 energy from fci.out. Done means the converter's output no longer produces the reported energy inconsistency and the electron counts are correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
hpc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.