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

Fix syntax problems in CIF files #39

Closed
wants to merge 2 commits into from

Conversation

vaitkus
Copy link
Contributor

@vaitkus vaitkus commented Sep 1, 2021

This PR fixes several minor CIF syntax issues in example files that prevented them from being parsed.

@BobHanson
Copy link
Collaborator

BobHanson commented Sep 1, 2021 via email

@vaitkus
Copy link
Contributor Author

vaitkus commented Sep 1, 2021

Thank you for clarifying. There are still, however, several minor syntactic issues in the files from the more_examples directory. Feel free to close the PR without merging if the proposed fixes are not relevant (i.e. if these file will also be changed in the near future).

@BobHanson
Copy link
Collaborator

BobHanson commented Sep 1, 2021 via email

@BobHanson
Copy link
Collaborator

BobHanson commented Sep 1, 2021 via email

@vaitkus
Copy link
Contributor Author

vaitkus commented Sep 2, 2021

Actually, neither examples nor more-examples directories are currently automatically checked by GitHub actions (syntax, validity, style checks). These checks only apply to CIF/DDL files on the top-most directory (.). I do agree that eventually it would be a great idea to automatically validate test CIF files as well and have now raised an appropriate GitHub issue [1].

I detected the issues in the CIF files by manually running the cif_parse and ddlm_validate programs from the cod-tools package against these files out of simple curiosity. I apologise if my reporting was premature or annoying.

One thing that I noticed is that the JMol CIF parser seems to be slightly more permissive when dealing with CIF_2.0 files than is allowed by the CIF_2.0 grammar. Namely, JMol allows to:

  • Omit the "##CIF_2.0" comment header that is mandatory in CIF_2.0 files.
  • Have the delimiter symbol inside the delimited string ('O'Keeffe M.' was OK in CIF_1.1, but is no longer OK in CIF_2.0).
  • Have trailing symbols that are silently ignored (i.e. the $ symbols that are addressed by this PR).

Of course, it is great that JMol is able to properly read slightly incorrect CIF files, but such syntactic mistakes should probably still not appear in example CIF files.

I will close the PR now since it will most likely not have any relevance after the planned changes to the files.

[1] COMCIFS/dictionary_check_action#7

@vaitkus vaitkus closed this Sep 2, 2021
@vaitkus vaitkus deleted the fix-cif-example-syntax branch September 14, 2021 00:30
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