What are the parameters in a write_data file

Hey everyone, I am running a simulation in lammps and adding write_data pure_data.txt command at end.

The pure_data.txt has format like below. I know first 2 columns are id and atom_type followed by x,y,z coordinates. I want to know what does last 3 columns mean.

LAMMPS data file via write_data, version 27 Jun 2024, timestep = 1, units = metal

24 atoms
1 atom types

0 4.98362373536883 xlo xhi
0 8.631889515465 ylo yhi
0 6.10366761083836 zlo zhi

Masses

1 58.69

Atoms # atomic

1 1 2.491811867684414 1.0297125916445721e-15 2.0374687355125626e-15 0 0 0
2 1 1.245905933842206 2.157972378866251 2.0661465448534037e-15 0 0 0
3 1 3.7377178015266215 2.157972378866251 2.0101351984845734e-15 0 0 0
4 1 4.9836237353688295 1.0718331241139322e-15 2.027162647780698e-15 -1 0 0
5 1 1.245905933842206 0.7193241262887515 2.034555870279455 0 0 0
6 1 3.7377178015266215 0.7193241262887515 2.034555870279455 0 0 0
11 1 2.491811867684414 2.8772965051550012 2.0345558702794553 0 0 0
14 1 4.9836237353688295 2.8772965051550012 2.0345558702794553 -1 0 0
15 1 4.9836237353688295 1.4386482525775013 4.069111740558909 -1 0 0
16 1 1.245905933842206 3.5966206314437517 4.069111740558909 0 0 0
17 1 3.7377178015266215 3.5966206314437517 4.069111740558909 0 0 0
18 1 2.491811867684414 1.4386482525775013 4.069111740558909 0 0 0
7 1 4.9836237353688295 4.315944757732502 2.0961686265070964e-15 -1 0 0
8 1 1.245905933842206 6.473917136598751 2.2879514764739706e-15 0 0 0
9 1 3.7377178015266215 6.473917136598751 2.2368691285855978e-15 0 0 0
10 1 2.491811867684414 4.315944757732502 2.2055027746190527e-15 0 0 0
12 1 1.245905933842206 5.035268884021252 2.0345558702794557 0 0 0
13 1 3.7377178015266215 5.035268884021252 2.0345558702794557 0 0 0
19 1 4.9836237353688295 7.1932412628875015 2.0345558702794557 -1 0 0
20 1 2.491811867684414 7.1932412628875015 2.0345558702794557 0 0 0
21 1 2.491811867684414 5.7545930103100025 4.069111740558909 0 0 0
22 1 1.245905933842206 7.912565389176252 4.069111740558909 0 0 0
23 1 3.7377178015266215 7.912565389176252 4.069111740558909 0 0 0
24 1 4.9836237353688295 5.7545930103100025 4.069111740558909 -1 0 0

input.txt (5.4 KB)

The write file also has Velocities. Is it compulsory to have that ? if I am using the same file for other simulations. I am writing only to use the same initial structure I created this simulation.

I have attached simulation code for clarity.

All your questions are answered in the documentation for the read_data command — LAMMPS documentation which discusses at great length all the many details of the format of data files.

Thank you for the reply. I have one more question regarding groups. I am creating atoms from a file. Basically, I need to group atoms into two (top and bottom). Is there any way to split two groups in a data file itself? or should I create separate data files for each groups. I don’t want to use lammps’ region command to create groups.

I am following the format posted above.

PS: I looked into read_restart and write_restart command. should I go with that?

Thanks in advance

Please have a look at the group2ndx and ndx2group commands to store and restore groups by atom ID. Then you can still use a data file and recover the groups after you read the data file.

ERROR: Unknown command: ndx2group grps.ndx Hydrogen (src/input.cpp:314)
Last command: ndx2group grps.ndx Hydrogen

I am getting this error. Is there any specific way that I should give command? I tried both group2ndx and ndx2group commands.

checkout the commands for reference. I also made sure that i have enabled extra command package of lammps.

final.txt (1.7 KB)
grps.ndx (81 Bytes)