You can do it like this
using CSV, DataFrames
open("test.data") do f
readuntil(f, "ITEM: ") # skip over first ITEM: string
while !eof(f)
boxsize = CSV.read(IOBuffer(readuntil(f, "ITEM: ")), DataFrame)
positions = CSV.read(IOBuffer(readuntil(f, "ITEM: ")), DataFrame)
end
end
You also get the correct labels from the file format, e.g. you can do stuff like positions.xs
etc.