-
Notifications
You must be signed in to change notification settings - Fork 3
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
CIF parsing assumes particular format, breaks for pymatgen-generated CIF files #24
Comments
seems like a good catch! |
seems like there should be a check or at least a clearer warning about this in the docs |
I think https://github.com/danieleongari/manage_crystal was quite commonly used in our group to "clean" CIF files |
Thanks, I didn't know this one yet! Plugging a call to manage_crystal into mofchecker (after creating the CIF file here) or pyeqeq (in the beginning of run_on_cif()) should indeed solve my issue. The latter seems like the right thing to do to me. Would you be interested in me opening a merge request for this? |
I can confirm that including a call to manage_crystal in EQeq fixes the problem. |
A PR for that would be very much appreciated! 🙏🏼 |
See #25 |
oh thanks! I did not get (or did not see) the notification for this PR. |
I'll give this and your other questions (e.g. |
I believe there is a bug in the parsing of CIF files.
The LoadCIFData() function assumes that atoms are described in lines of the following form:
However, the CIF format is extremely generic, and allows several other forms. For instance, CIF files generated by pymatgen can look like this:
Running EQeq on such a CIF file leads to EQeq taking the atom labels for the types, and the types for the labels. This is visible for instance from its std output:
If I'm not mistaken, this affects for instance mofchecker (@kjappelbaum), since that uses pymatgen to store CIF files and then EQeq to analyze the charges.
The text was updated successfully, but these errors were encountered: