-
Notifications
You must be signed in to change notification settings - Fork 141
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
Flip the sign of einspline twist input #3797
Conversation
The sign convention has been changed in EinsplineSetBuilder and thus this is a user facing change. In the new choice is aligned with DFT codes. EinsplineSet and BsplineSet internal kPoints keep the old sign.
I will review/comment here, but likely not until tomorrow. |
Test this please |
The sign issue is only partly an input problem. Does this just change the sign on the input, but retain the inverted sign internally during orbital construction or evaluation? If the inverted sign is retained internally, this is a problem because a Bloch state with inverted wavevector exists in the wavefunction. The actual wavevector of the Bloch state is probed with the momentum distribution, and this can result in no signal in the case of inconsistency. |
The issue of momentum distribution is a pure input problem. About EinsplineSet/BsplineSet internal. kPoints are stored as -twist with some additional lattice shift. When evaluating an orbital. A bloch state is
How is u(r) is constructed. It is first fft from planewave coefficient. Then it is rotated. Rotating a phase doesn't change the physics of orbital itself and there is neither phase imposed from QE. The rotation angle determination is empirical and it needs to evaluate orbitals and there seems to be a sign flip see We need to anatomize the overall issue and take incremental steps. |
Probably best to have a quick chat/call on this. |
Test this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. It seems that Einspline* and Momentum* were correcting for the inverted sign independently, so this changes here should not affect the functioning of n(k) estimators.
The changes here should fix #1386. Someone should rerun the inputs provided in that issue and check after this PR goes in.
Proposed changes
h5 from DFT has [0 0.5 0.25]
Before this PR, we input
twist="0.0 -0.5 -0.25"
Now we should input
twist="0.0 0.5 0.25"
as DFT.This change breaks backward compatibility. Tools generating input for QMCPACK should be updated.
The fix in splines is in the builders, updating all the spline implementation is to much more involving. Thus kept the old sign.
We may change that after delete EinsplineSet but that doesn't affect users.
I also changed the convention in MomentumEstimator.
closes #1386.
I also deleted code that was commented out.
What type(s) of changes does this code introduce?
Does this introduce a breaking change?
What systems has this change been tested on?
epyc-server
Checklist