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

Issue parsing regular xyz file from LAMMPS #19

Open
swyant opened this issue Apr 7, 2023 · 3 comments
Open

Issue parsing regular xyz file from LAMMPS #19

swyant opened this issue Apr 7, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@swyant
Copy link

swyant commented Apr 7, 2023

Hi @mfherbst,

I'm still running into errors when parsing a simple .xyz file. The xyz file was generated from LAMMPS at the end of an MD trajectory and can be obtained here

Running

using AtomsIO 
sys1 = load_system("./dump_final.xyz")

generates the following error:

Failed to parse string at pos 7
ERROR: BoundsError: attempt to access 0-element Vector{Any} at index [0]
Stacktrace:
 [1] getindex
   @ ./array.jl:924 [inlined]
 [2] last
   @ ./abstractarray.jl:479 [inlined]
 [3] load_system(::ExtxyzParser, file::String, index::Nothing)
   @ AtomsIO ~/.julia/packages/AtomsIO/gPmVc/src/extxyz.jl:17
 [4] load_system(file::String, index::Nothing; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ AtomsIO ~/.julia/packages/AtomsIO/gPmVc/src/saveload.jl:43
 [5] load_system (repeats 2 times)
   @ ~/.julia/packages/AtomsIO/gPmVc/src/saveload.jl:42 [inlined]
 [6] top-level scope
   @ ~/cesmix/exploratory/public/interpot_comparisons/lj/atomsio_tests/new_version_nopluto/new_atomsio_tests.jl:3

I've tried using both the tagged 0.2.0 release, as well as with the most recent commit (#aac46e8).

Thanks!

@swyant
Copy link
Author

swyant commented Apr 7, 2023

Also Julia 1.8.5 on MacOS 11.6.2 if you need it

@mfherbst mfherbst added the bug Something isn't working label Apr 8, 2023
@mfherbst
Copy link
Owner

mfherbst commented Apr 8, 2023

Thanks for reporting. I can reproduce it, but it seems like an issue in ExtXYZ. I'll report it there.

@mfherbst
Copy link
Owner

mfherbst commented Apr 8, 2023

I will also harden AtomsIO a bit against such issues in the future with a clearer error message, see #20

@mfherbst mfherbst changed the title Continued issues parsing regular xyz file Issue parsing regular xyz file from LAMMPS Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants