Bug #1
closedsphinx and VASP disagree
100%
Description
Long after I was sure that sphinx and VASP agree, I'm running into a disagreement. The system is nearly trivial, non-spin-polarized BCC Fe, gamma point only (for testing), using a VASP PAW. I tried to make it as simple as possible, but I get different energies (I even checked differences between eigenvalues in case there was just an overall shift, but those also differ by of order 2 eV). When I do a spin polarized calculation I also get different moments (which is how I started down this path).
Should I expect this to work? If so, could you take a look at my input files?
Updated by Christoph Freysoldt 22 days ago
Dear Noam,
I vaguely remember that we had a similar issue some time ago (even though this was with spin-polarized fcc Fe, I believe) - it turned out that the problem was on the vasp calculation, when the angular gradients in PAW augmentation region were not considered. I think the vasp parameter is called LASPH, and should be set to TRUE. SPHInX always considers the angular gradients when computing inside the PAW sphere. It is known that not including them can stabilize an artificial medium-spin configuration in fcc Fe, not sure if it could also affect non-polarized bcc Fe (hypothetically, it can).
If this is not the problem here, then please give me some more details (notably: where do you find differences? relative energies? lattice constant? DOS?) to check myself. There are some implementational differences related to the compensation charges (shape, and whether to include them in the xc potential - vasp does, I (and Bloechl and abinit) do not with reason), but none of them so far showed critical deviations.
I'd be a bit surprised if this cannot be solved - people in the department have been using vasp and sphinx in comparison, and they never reported any issue for Fe.
Updated by Noam Bernstein 21 days ago
Thanks. We definitely found differences in relative energies - we were doing finite differences, and getting very different values (which of course are amplified by the finite difference process), and we also noticed that we were getting different spin moments. For example the (total) moment for this particular ideal BCC is converging to 2.16 vs. 2.26.
I just checked LASPH, and it was off, so I'll redo my tests with it on and follow up here soon.
Updated by Noam Bernstein 21 days ago
OK, I just ran a simple energy difference (just changing the cell volume), but now set LASPH = true, and I it looks good when it's not spin polarized (gamma point only):
Using the 4th column of the energy.dat file I get a sphinx energy differences of
(-90.858007731616+90.858388552443) * 2 * 13.6057 = .0103626678518278
(-90.857406851046+90.858007731615) * 2 * 13.6057 = .0163508015152866
and with VASP "free en" I get
-15.11312048+15.12360281 = .01048233
-15.09669841+15.11312048 = .01642207
So that's very good as far as I'm concerned.
I'm currently running with spin polarization, and a 12^3 k-point mesh so the band structure is decent.
Updated by Noam Bernstein 21 days ago
The initial test on the spin-polarized system looks good. I'll know for sure once we do a more complete test soon.
Updated by Noam Bernstein 21 days ago
Looks like with LASPH we get good agreement both on energies and moments (not exact, but I think entirely good enough). Thanks for the quick help, and feel free to close this issue.
Updated by Christoph Freysoldt 19 days ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Nice to see this has been solved.