QMCPACK / QMCPACK/qmcpack

open boundary default is suprising

Open
#2,982 6 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
403
Forks
154
Avg merge
1d 12h
Merged PRs (30d)
82

Description

**Describe the bug**

If user puts structure too close to an open boundary, then VMC and DMC results are wrong.
E.g. ` p p n ` is open along z
` n n n ` is open along x, y, z

This is surprising because:
1. In quantum chemistry, one can put the molecule anywhere in space.
2. In DFT, a 2D slab can be centred around z=0.

I also ran into this issue in #2894.

**To Reproduce**

[mick.zip](https://github.com/QMCPACK/qmcpack/files/6078645/mick.zip)

Steps to reproduce the behavior:
1. build qmcpack/3.10.0
2. run attached nexus script with `zshift=1` and `zshift=0`
3. analyze Jastrow optimization runs

**Expected behavior**
With `zshift=1`, the structure is near the middle of the 40-angstrom tall cell. Optimization run looks reasonable
```
$ qmca -q ev runs/z1-ecut40/opt/*scalar.dat
LocalEnergy Variance ratio
runs/z1-ecut40/opt/opt series 0 -21.446633 +/- 0.019517 10.429069 +/- 0.196819 0.4863
runs/z1-ecut40/opt/opt series 1 -21.998490 +/- 0.010452 3.774994 +/- 0.129823 0.1716
runs/z1-ecut40/opt/opt series 2 -22.030715 +/- 0.012624 3.632023 +/- 0.078940 0.1649
```
VMC acceptance rate is around 54%.

With `zshift=0`, the grahpene layer is close to the z=0 open boundary, so some moves will be rejected; energies and variance get pushed up.
```
$ qmca -q ev runs/z0-ecut40/opt/*scalar.dat

LocalEnergy Variance ratio
runs/z0-ecut40/opt/opt series 0 -20.861332 +/- 0.030936 11.270123 +/- 0.251172 0.5402
runs/z0-ecut40/opt/opt series 1 -21.564767 +/- 0.018924 6.655144 +/- 0.302287 0.3086
runs/z0-ecut40/opt/opt series 2 -21.705737 +/- 0.016562 6.954020 +/- 0.330117 0.3204
runs/z0-ecut40/opt/opt series 3 -21.685952 +/- 0.017622 6.795096 +/- 0.229835 0.3133
```
VMC acceptance rate is around 46%.

**System:**
- Fedora 32, E5-2620 v2, gcc 10.2.1, intel 19.1.2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.