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

Feature parse gdb xyz #288

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

coltonbh
Copy link
Collaborator

Description

GDB .xyz files cannot be opened because they contain a 5th column (mulliken charges) and data after the usual xyz coordinates. This PR adds a catch-all to the line parsing and ignores everything after the z coordinate. It also stops xyz parsing after the coordinate lines have been iterated over. This allows more flexible xyz parsing by ignoring superfluous data, instead of raising exceptions.

Changelog description

Updated _filter_xyz function to ignore lines after cartesian coordinates in standard xyz files and additional columns in Cartesian coordinate rows. This enables parsing of gdb dataset xyz files.

Status

  • [ x] Code base linted
  • [ x] Ready to go

Note

I'm trying to be as surgical as possible here and add the flexibility without needing to create many additional cases. Please let me know if this appears too much of a hack. I think it may be a nice general case to make parsing more flexible (just ignore things we don't care about). I'm not familiar enough with xyz varieties to know if this may cause other errors. All current tests still pass.

@coltonbh coltonbh force-pushed the feature-parse-gdb-xyz branch 4 times, most recently from a1cad29 to 2bc4006 Compare April 13, 2022 01:33
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.

1 participant