QMCPACK / qmcpack

Main repository for QMCPACK, an open-source production level many-body ab initio Quantum Monte Carlo code for computing the electronic structure of atoms, molecules, and solids with full performance portable GPU support
http://www.qmcpack.org
Other
285 stars 135 forks source link

Inaccurate MPC energies #5081

Open kayahans opened 1 week ago

kayahans commented 1 week ago

Describe the bug Using the legacy code, physical=no MPC in the hamiltonian produces total energy values that are several Ha higher than Ewald and the gap between the Ewald and MPC gets larger with increasing supercell size. This is reported in bulk MnSe. ewald-mpc

Analysis of the twists show that energies in each twist is consistent, indicating that the error could be related to density or some initialization step.

>qmca -e 20  -q ee *s002*scalar*
dmc.g000  series 2  ElecElec              =  360.467753 +/- 0.207441
dmc.g001  series 2  ElecElec              =  360.334781 +/- 0.157508
dmc.g002  series 2  ElecElec              =  360.195652 +/- 0.147934
dmc.g003  series 2  ElecElec              =  360.052337 +/- 0.133481
dmc.g004  series 2  ElecElec              =  359.911319 +/- 0.211262
dmc.g005  series 2  ElecElec              =  360.169259 +/- 0.160747
dmc.g006  series 2  ElecElec              =  360.082586 +/- 0.118986
dmc.g007  series 2  ElecElec              =  359.583074 +/- 0.246933
dmc.g008  series 2  ElecElec              =  360.002621 +/- 0.141038
dmc.g009  series 2  ElecElec              =  359.930153 +/- 0.188313
dmc.g010  series 2  ElecElec              =  360.361782 +/- 0.273003
dmc.g011  series 2  ElecElec              =  360.046368 +/- 0.092051
dmc.g012  series 2  ElecElec              =  360.020397 +/- 0.182795
dmc.g013  series 2  ElecElec              =  360.031820 +/- 0.184771
dmc.g014  series 2  ElecElec              =  359.956056 +/- 0.184314
dmc.g015  series 2  ElecElec              =  360.130444 +/- 0.087700
dmc.g016  series 2  ElecElec              =  359.797406 +/- 0.122967
dmc.g017  series 2  ElecElec              =  359.876725 +/- 0.264728
dmc.g018  series 2  ElecElec              =  360.202026 +/- 0.181562
dmc.g019  series 2  ElecElec              =  360.684932 +/- 0.110667
dmc.g020  series 2  ElecElec              =  359.858839 +/- 0.169722
dmc.g021  series 2  ElecElec              =  360.328722 +/- 0.095143
dmc.g022  series 2  ElecElec              =  359.968411 +/- 0.260615
dmc.g023  series 2  ElecElec              =  360.249228 +/- 0.206540
dmc.g024  series 2  ElecElec              =  359.800285 +/- 0.238310
dmc.g025  series 2  ElecElec              =  360.000984 +/- 0.221613
dmc.g026  series 2  ElecElec              =  360.061534 +/- 0.130006
> qmca -e 20  -q MPC *s002*scalar*
dmc.g000  series 2  MPC                   =  625.248696 +/- 0.204685
dmc.g001  series 2  MPC                   =  625.104993 +/- 0.155363
dmc.g002  series 2  MPC                   =  624.972805 +/- 0.147327
dmc.g003  series 2  MPC                   =  624.841202 +/- 0.131456
dmc.g004  series 2  MPC                   =  624.690616 +/- 0.210045
dmc.g005  series 2  MPC                   =  624.961608 +/- 0.160649
dmc.g006  series 2  MPC                   =  624.866464 +/- 0.118222
dmc.g007  series 2  MPC                   =  624.367708 +/- 0.244609
dmc.g008  series 2  MPC                   =  624.782147 +/- 0.139274
dmc.g009  series 2  MPC                   =  624.703217 +/- 0.185981
dmc.g010  series 2  MPC                   =  625.129868 +/- 0.268086
dmc.g011  series 2  MPC                   =  624.820891 +/- 0.091476
dmc.g012  series 2  MPC                   =  624.795860 +/- 0.185064
dmc.g013  series 2  MPC                   =  624.814715 +/- 0.182802
dmc.g014  series 2  MPC                   =  624.736065 +/- 0.184180
dmc.g015  series 2  MPC                   =  624.910460 +/- 0.087743
dmc.g016  series 2  MPC                   =  624.582619 +/- 0.122511
dmc.g017  series 2  MPC                   =  624.662230 +/- 0.261837
dmc.g018  series 2  MPC                   =  624.978983 +/- 0.179683
dmc.g019  series 2  MPC                   =  625.460868 +/- 0.112656
dmc.g020  series 2  MPC                   =  624.642946 +/- 0.169742
dmc.g021  series 2  MPC                   =  625.105141 +/- 0.094158
dmc.g022  series 2  MPC                   =  624.759835 +/- 0.256939
dmc.g023  series 2  MPC                   =  625.034452 +/- 0.205712
dmc.g024  series 2  MPC                   =  624.579686 +/- 0.239591
dmc.g025  series 2  MPC                   =  624.788790 +/- 0.220319
dmc.g026  series 2  MPC                   =  624.842865 +/- 0.129755

To Reproduce Please see the input and some of the output files for the largest supercell in this calculation. Please let me know where you would like me to transfer these files, if you like to reproduce.

System:

Additional context files.zip

prckent commented 1 week ago

Q1: Have you verified that all the tests pass with this compilation, particularly all the *mpc* ones? Q2: Does MPC behave for you in other systems or is it broken in only this case? Q3: Does VMC also misbehave? Q4: What does the batched code give for the same systems? No need to answer all of these at once. Any info will help give an idea of where things are wrong.

kayahans commented 1 week ago

Thanks Paul, Q2: I ran 4 different materials. For 1 material, MPC and Ewald agreed for the finite size extrapolation, but the issue existed in the other three. Those three have net non-zero magnetization. Here is the example where it worked as expected for Bi2Te2Se1: image

Q3: Yes

I will get to Q1 and Q4 as soon as possible

kayahans commented 1 week ago

Q1: The MPC tests below have passed with ctest -R short: Start 545: short-diamondC_1x1x1_pp-vmc_sdj-1-16-mpc 196/570 Test #545: short-diamondC_1x1x1_pp-vmc_sdj-1-16-mpc ...................................... Passed 0.07 sec Start 555: short-diamondC_1x1x1_hybridrep_pp-vmc_sdj-1-16-mpc 206/570 Test #555: short-diamondC_1x1x1_hybridrep_pp-vmc_sdj-1-16-mpc ............................ Passed 0.06 sec Start 565: short-diamondC_1x1x1_pp-vmc_sdj-meshf-1-16-mpc 216/570 Test #565: short-diamondC_1x1x1_pp-vmc_sdj-meshf-1-16-mpc ................................ Passed 0.06 sec Start 591: short-diamondC_1x1x1_pp-dmc_sdj-1-16-mpc 242/570 Test #591: short-diamondC_1x1x1_pp-dmc_sdj-1-16-mpc ...................................... Passed 0.05 sec Start 601: short-diamondC_1x1x1_pp-vmc_sdj_excited-1-16-mpc 252/570 Test #601: short-diamondC_1x1x1_pp-vmc_sdj_excited-1-16-mpc .............................. Passed 0.06 sec Start 609: short-diamondC_1x1x1_pp-dmc_sdj_excited-1-16-mpc 260/570 Test #609: short-diamondC_1x1x1_pp-dmc_sdj_excited-1-16-mpc .............................. Passed 0.05 sec Start 619: short-diamondC_1x1x1_pp-vmc-dmc-allp_sdj-1-16-mpc 270/570 Test #619: short-diamondC_1x1x1_pp-vmc-dmc-allp_sdj-1-16-mpc ............................. Passed 0.05 sec Start 628: short-diamondC_1x1x1_pp-vmc-dmc-allp_sdj-1-16-1-mpc 279/570 Test #628: short-diamondC_1x1x1_pp-vmc-dmc-allp_sdj-1-16-1-mpc ........................... Passed 0.05 sec Start 635: short-diamondC_1x1x1_pp-vmc-dmc-allp_sdj-1-16-2-mpc 286/570 Test #635: short-diamondC_1x1x1_pp-vmc-dmc-allp_sdj-1-16-2-mpc ........................... Passed 0.05 sec