How to organize the lammps data file to run?

I downloaded a data file from Lammps examples and the file is not organized in a way readable by lammps. The file contains atom positions along with all of the bond, angle, and dihedral angle lists of polyethylene (attached). I need to reorganize the structure that can be read by LAMMPS. The final product should look like this:

I was wondering if you know any software that can handle this?
The link to the datafile is here:
As I am a new user, it does not let me to attach a file.

The requirements for the format of the data file depends on the atom style in use.
For details, please read read_data command — LAMMPS documentation

Thanks. The required format is known as I explained in the question how should look like. The problem is that how can I reformat it? It takes forever to reformat it by hand and I assume there should be a software/online source to do it automatically.

Your assumption is wrong.
You would have to write a custom tool/script since there is not much structure in the file.

But upon closer inspection, it seems the problem is in the way you download the file.
You probably clicked on the link and then saved the resulting html file from the web browser. That will treat the file as an HTML file, remove all excess whitespace and essentially destroy the format.

Try instead right-clicking on the link and use the “Save as” option and remove the .html at the end. On my machine that produces an unmodified file.

What also works is to download with a command line tool:

curl -o PE_nc10_cl1000.dat


wget -O PE_nc10_cl1000.dat
1 Like

Please also note that you are accessing a website that is “frozen” and thus unmaintained (and apparently has been in this state for over 6 years) so don’t expect that everything is set up to be compatible with current web browsing technology (or current versions of LAMMPS for that matter).

1 Like

Awesome explanation. Thank you so much.