-
Notifications
You must be signed in to change notification settings - Fork 15
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
Only include necessary POTCARs #700
Conversation
Pull Request Test Coverage Report for Build 2788941225
💛 - Coveralls |
Since this also messed with my calculations (See #718) already, I assume that the species property of the structures itself is dangerous right now. Maybe something like that maps: |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
bump |
A working/hacky solution would be to convert it to a pymatgen structure to avoid the chemical API completely. Then call this function that I had for my prior workflows:
It's not elegant, but it works, and fixes a dangerous error that's still lurking. The only issue I have with this is that this can get expensive for large structures, if ordering is preserved (which won't be the case for most users anyway). In this case it may be necessary to import a library, maybe itertools, which could be faster (I have no idea which one is faster right now.) I am not so familiar with ASE so if there is an equivalent way to do this it may be preferable. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Obsolete by #799 |
It can happen that a structure defines more chemical elements on it than are actually present in it. For example
Atoms(species=['Fe','Al'], indices=[1,1,1,1], ....)
defines a structure with four aluminum inside.StructureStorage
does this systematically to ensure that indices of structures from one container are consistent and but it can also happen after deleting atoms from a structure or something similar.When a Vasp job sees such a structure it starts writing out POTCARs for all elements defined instead of those that are present. Since the POSCAR however only has one element present, the calculation ends up using the wrong pseudopotential.
I've made a quick fix by ensuring that only POTCARs of elements present in the structure are written, but it's a bit of a footgun waiting to happen again. I'm open for other suggestions how to fix this more cleanly.