Skip to content
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

Document symmetries differences wrt other codes #952

Open
antoine-levitt opened this issue Feb 2, 2024 · 2 comments · May be fixed by #954
Open

Document symmetries differences wrt other codes #952

antoine-levitt opened this issue Feb 2, 2024 · 2 comments · May be fixed by #954
Assignees

Comments

@antoine-levitt
Copy link
Member

Getting the forces on Silicon with a 2x1x1 kgrid gets a nonzero result (irrespective of symmetries settings). This is consistent with finite differences. OTOH abinit gives zero by default. Setting nsym to 1 in abinit (ie deactivating the symmetries) does give a nonzero result. Basically what's happening is that abinit symmetrizes everything wrt the model symmetries, and we symmetrize wrt the basis symmetries. I like what we do better, because the symmetries are then a pure optimization (unlike abinit, where switching off symmetries gives a different result, even for the ground state energy). Not sure what other codes do. We should document it, though.

@antoine-levitt
Copy link
Member Author

We can get abinit-type behavior by commenting out

    symmetries = symmetries_preserving_kgrid(symmetries, kgrid)

in the pwbasis constructor. Not completely sure if it gives the same behavior as abinit (we only use the symmetries for symmetrizing the density and the forces, not sure what abinit does)

@epolack epolack self-assigned this Feb 2, 2024
@epolack epolack linked a pull request Feb 2, 2024 that will close this issue
@mfherbst
Copy link
Member

mfherbst commented Feb 5, 2024

Basically what's happening is that abinit symmetrizes everything wrt the model symmetries, and we symmetrize wrt the basis symmetries.

Yes I recall having stumbled upon this at some point. I also like our behaviour better, but I could imagine that this might lead to artifacts when optimising structures. E.g. you expect a symmetry in the structure to be kept during the optimisation as the original structure has it, but then this is broken because your kgrid does not keep that symmetry, thus the forces don't.

We can get abinit-type behavior by commenting out

Can't you just explicitly forward the model symmetries to the basis symmetries ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants