-
Notifications
You must be signed in to change notification settings - Fork 191
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
Fix the pbc constraints of get_pymatgen_structure
#6281
Conversation
The pbc for getting a `pymatgen.core.structure.Structure` class via the `StructureData.get_pymatgen_structure` were constrained to be 3D, i.e. (True,True,True). The core module of pymatgen actually allows for any pbc condition, and this is now fixed by using the `pymatgen.core.structure.Lattice` class to specify, along the cell information, also the pbc. This is useful in many other codes that exploit pymatgen core utilities, and overcomes this huge limitation, thus avoiding patches and possible shortcomings.
38ea478
to
598960e
Compare
for more information, see https://pre-commit.ci
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.
Thanks for doing this! One question about requiring default cell...
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! Just a couple of wording suggestions.
Co-authored-by: Daniel Hollas <[email protected]>
Co-authored-by: Daniel Hollas <[email protected]>
Co-authored-by: Daniel Hollas <[email protected]>
Thanks @bastonero . I think this PR has been reviewed and implicitly approved? Just the docs are failing with the following warnings:
If you could fix those, this can be merged. Thanks |
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.
Thanks @bastonero
Fixes #6280
The pbc for getting a
pymatgen.core.structure.Structure
class via theStructureData.get_pymatgen_structure
were constrained to be 3D, i.e. (True,True,True). The core module of pymatgen actually allows for any pbc condition, and this is now fixed by using thepymatgen.core.structure.Lattice
class to specify, along the cell information, also the pbc.This is useful in many other codes that exploit pymatgen core utilities, and overcomes this huge limitation, thus avoiding patches and possible shortcomings.