How to generate the structure file in the gzipped format with Fortran code?

Dear All,

Would anyone please tell me how to use Fortran code to generate the structure file in the gzipped format for the ‘read_data’ command in LAMMPS simulation?

I mean what is the format of this gzipped file? Is it just a simple binary file or something else?

Thank you in advance.

At the risk of possibly giving a retarded answer to a question I might not be understanding correctly, I would say that a “gzipped” file is just a file a .gz file that you obtained by doing the gzip command in linux. From quickly checking the manual, the gzipped file should come from a usual text file, no? So you can just build the structure in a text file as usual and do the gzip command on it. Why do you want a fortran code to do it?

1 Like

Thank you for the reply.

I suppose this ‘gzipped’ file has its own special format for LAMMPS so I want to see if I can use Fortran to generate it. Now, I understand.

Yes, I can use the ‘tar’ command to compress the ASCII text format file.