Error in reading data file using VMD readlammpsdata command

Hello everyone. I have a data file consisting of 13666 atoms. These atoms include oxygen, hydrogen, carbon, zirconium, chlorine ion, sodium ion, zinc ion, and calcium ion. Carbon, oxygen, and hydrogen atoms are commonly present in the structures of graphene sheets, water, and membranes that I study, so I have assigned them different IDs depending on the structure they are present in. However, when I try to check the validity of the file with the command read lammpsdata in VMD, I encounter an error stating “unknown header line” for the last atom under the atoms header. The data file is attached to this message. I would greatly appreciate it if you could check the file and let me know about its error.

Thank you
all2_autopsf.data (1.3 MB)

There are actually 13667 atoms in your system. The repetition is on:

11408       2801	10	-0.992	22.697	34.651	60.373
11408       2801	10	-0.992	28.962	33.277	58.216

Hence, the extra line that triggers the error. I have updated the number of atoms in the header.

Also, a blank line is missing after the Bond Coeffs and Bonds sections. Mind you that topotools expect one space in “Bond Coeffs”, otherwise the following parsing error is returned:
ERROR) readlammpsdata: unkown header line: 13716 : Bond Coeffs # harmonic

With the above modifications, the DATA file is read correctly.

3 Likes

Hello again. I don’t know how to thank you. Thank you very much for taking the time to review my issue. I was able to run the data file using your recommendations. I took note of all the points you mentioned. I appreciate it.