Skip to content

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
@coltonbh coltonbh force-pushed the feature-parse-gdb-xyz branch from 2bc4006 to 9c22bdc Compare April 13, 2022 01:35
@loriab loriab mentioned this pull request Jun 11, 2022
2 tasks
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