Unhardcode LammpsDumpParser#2333
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2333 +/- ##
==========================================
- Coverage 90.56% 89.8% -0.76%
==========================================
Files 170 173 +3
Lines 23100 21783 -1317
Branches 2985 2861 -124
==========================================
- Hits 20921 19563 -1358
- Misses 1581 1623 +42
+ Partials 598 597 -1
Continue to review full report at Codecov.
|
43620b6 to
f43e940
Compare
f43e940 to
d6e904d
Compare
|
I have just run into this issue and personally would like to see this fix (or a sensible error message) implemented. It took me quite some time to understand why |
|
|
|
@lilyminium I'm not super familiar with the format, do you happen to remember why this ended up stalling? (i.e. was there a practical reason or a lack of hands on deck to review?) |
@rkingsbury I think part of the problem here is that most of our devs aren't familiar with the LAMMPS format. Do you happen to have a reference to some docs for the non-'atom' style formatting? |
No, I have no idea. I've only recently started using |
Sorry for the confusion @rkingsbury that first question was for @lilyminium the dev who opened this pull request. |
|
Python 3 concerns iirc (it didn't pass tests). This is one of the first PRs I ever made, back in the dark 2.7 days. I also didn't push too hard because I'm not terribly familiar with LAMMPS. @rkingsbury is this a good solution or should anything be changed? |
|
@lilyminium I have been working on this in parallel for #3358. Problem with current implementation in this PR being that there is no guarantee coordinates will be in the How would you like to proceed? I can work over the top of this PR if that is easiest or wait for this to be merged then put my own changes over the top. :) |
|
I'm not too attached either way. Feel free to merge this branch into your own if that's easiest. |
|
I contacted Lammps developers and they told me that However, they suggested me to see the documentations for these two commands (In particular, the 2nd one): read_dump and read_data |
|
Note that majority of discussion on this has shifted to #3360 |
Fixes #3358 Supersedes #2333 ## Changes made in this PR - Allow coordinates in different conventions to be read by LAMMPSDumpReader - Unhardcode LAMMPSDumpReader to expect a set number of columns - S->R transform with distances.transform_StoR is no longer applied by default, only if the coordinates are in the scaled (xs,ys,zs) or scaled_unwrapped (xsu, ysu, zsu) convention
|
@lilyminium, with #3360 being merged I think this may be able to be closed. |
|
@lilyminium closing |
Fixes below:
Amir can't load their LammpsDump file because atom lines have more than 5 fields.
Changes made in this Pull Request:
I know nothing about Lammps formats, so maybe atom lines having >5 fields is a sign that something is very wrong -- but then an informative error could be raised. Or possibly it should have at least 5 fields (for x, y, z)?
PR Checklist