Rewrite of the LAMMPS text reader to fix poor performance (especially when indexing)
Rewrite the LAMMPS text parser to:
a) index files and not have to process an entire file and then slice it b) use multithreading to speed up Atoms creation (idk if this is okay with the ase team hence the Draft) c) read data from a byte stream and avoid multiple different constant type conversions
read( a 3gb file ) goes from 3+ mins to 8 seconds on an ‘m' chip mac. Even quicker if slicing.
This is my first commit to ase - so very cautious. Please let me know if a few more unit tests (maybe even reading from an example file) would help.
-Chris
Checklist
-
I am familiar with ASE's contribution guidelines. -
Doc strings in code changed in this MR are up to date. -
Unit tests have been added for new or changed code. - [N/A] Issue is resolved via "closes #XXXX" if applicable.
Edited by Chris Davies