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

[Bug]: Inconsistent behaviour with get_symmetrized_structure #3340

Open
2 of 4 tasks
kavanase opened this issue Sep 18, 2023 · 4 comments
Open
2 of 4 tasks

[Bug]: Inconsistent behaviour with get_symmetrized_structure #3340

kavanase opened this issue Sep 18, 2023 · 4 comments
Labels

Comments

@kavanase
Copy link
Contributor

Email (Optional)

[email protected]

Version

v2023.9.2

Which OS(es) are you using?

  • MacOS
  • Windows
  • Linux

What happened?

When using SpacegroupAnalyzer.get_symmetrized_structure(), I noticed some odd behavior.
If the input structure is a non-diagonal supercell of the primitive structure, the space group symmetry of the material is correctly determined (and returns the correct primitive structure), but the SymmetrizedStructure differs from that obtained when inputting the primitive structure.
In the example case below, this now outputs additional 'inequivalent' sites, which are in fact equivalent in the primitive structure. I've witnessed this now in a couple of different material systems, with non-diagonal supercells.

I'm not sure if this is the desired behaviour, but I wouldn't have guessed so.
Notebook and PDF attached below.

pymatgen_symm_structure_PR.pdf

pymatgen_symm_structure_PR.ipynb.zip

Code snippet

No response

Log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@kavanase kavanase added the bug label Sep 18, 2023
@amkrajewski
Copy link
Contributor

Hi @kavanase! It seems that your supercell is quite large and if you are saving it as a POSCAR with default settings you may be running into numerical precision issues. I suggest you look into either (1) increasing export accuracy or (2) playing with the SpacegroupAnalyzer's symprec parameter, to allow for larger basis distortions from ideal positions. Good luck!

@mkhorton
Copy link
Member

mkhorton commented Nov 9, 2023

It might also be worth talking to the developers of spglib if it might seem like a legitimate bug in symmetry determination, rather than a precision issue (of course, they would need a minimal reproducible example using spglib directly rather than pymatgen—the easiest way to do this is typically to add a print statement before the spglib call inside pymatgen to see the exact values passed to spglib).

For symmetry issues, it’s also worth trying some different versions of spglib just in case there’s been a regression etc.

@lan496
Copy link
Contributor

lan496 commented Nov 9, 2023

As spglib developer side, I think it may be possible that spglib returns another space group for a supercell than that for the primitive structure. Spglib only returns rotation matrices with integers. So if the supercell matrix breaks the symmetry, corresponding result may change.
I am also wondering what space group types does spglib return for this issue's structure.

@kavanase
Copy link
Contributor Author

kavanase commented Sep 20, 2024

Btw, I checked that this issue is still not fixed with the latest versions of pymatgen or spglib.

These are the relevant structures, needed to reproduce this issue (to run the code in the notebook):
Sb2Si2Te6_POSCARs.zip

Regarding @lan496 :

I am also wondering what space group types does spglib return for this issue's structure.
The space groups returned in all cases are the correct R-3, as shown in the notebooks I attached above:

image image image

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

No branches or pull requests

4 participants