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

Add catch for when Structure.get_space_group_info fails #968

Merged

Conversation

esoteric-ephemera
Copy link
Collaborator

@esoteric-ephemera esoteric-ephemera commented Mar 14, 2024

Sometimes the default symprec and angle_tolerance used by pymatgen.core.Structure.get_space_group_info are too tight or loose to accurately determine the crystalline symmetry. In those cases, Structure.get_space_group_info throws an error 'NoneType' object is not subscriptable and building a ValidationDoc fails during both the kpoint and incar checks.*

This PR adds a new deprecation message for this by checking if get_space_group_info can be called on the input structure during validation, as well as a test for this behavior.

* Long explanation: in pymatgen, the Kpoints object checks the space group to see if a lattice is face-centered, because only Gamma-centered grids and not Monkhorst-Pack k-points grids should be used for face-centered lattices, per VASP. The symmetry check was added to pymatgen in PR #3245, and relies on get_space_group_info

@tsmathis tsmathis merged commit a9e9025 into materialsproject:update-potcar-checking Mar 14, 2024
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 this pull request may close these issues.

2 participants