SOLVED:ERROR: Incorrect format in Atoms section of data file (src/atom.cpp:10 72))

Hello everyone

I’m doing some melting simulations and working with 2 independent systems, I need to join both systems in one using the read data command, but i get the incorrect format error during the process.
Is just one atom type and has no charge in it.

This is the datafile I use, there is less atoms because I just copy some of them to show it to you.

#MolDyn

600 atoms
0 bonds
0 angles
0 dihedrals
0 impropers

1 atom types
0 bond types
0 angle types
0 dihedral types
0 improper types

0.290548 16.1509 xlo xhi
0.290548 8.22071 ylo yhi
0.0871643 4.84526 zlo zhi

Masses

1 1.0

Atoms

1 0 1 0.0 0.345795 0.304783 0.00637378
2 0 1 0.0 0.983466 1.10602 0.0884187
3 0 1 0.0 1.01356 0.331364 0.828902
4 0 1 0.0 1.82588 0.355931 0.127424
5 0 1 0.0 2.0037 1.14206 0.743372
6 0 1 0.0 1.13734 1.85792 0.882705

The second datafile is the next one

#MolDyn

600 atoms
0 bonds
0 angles
0 dihedrals
0 impropers

1 atom types
0 bond types
0 angle types
0 dihedral types
0 improper types

0.290548 16.1509 xlo xhi
8.22071 16.1509 ylo yhi
0.0871643 4.84526 zlo zhi

Masses

1 1.0

Atoms

1 1 0.0 8.32982 0.274409 0.0183127
2 1 0.0 9.1737 1.09252 0.10966
3 1 0.0 9.04169 0.290678 0.868371
4 1 0.0 8.27933 1.95233 0.0841372
5 1 0.0 9.08744 1.9624 0.88063
6 1 0.0 9.067 1.01064 1.61491

The command I use to apply the atoms in my simulation is
read_data archive01.txt add append group 01
read_data archive02.txt add append group 02

How could I correct the datafile?

I have the last version of Lammps, with Kokkos package

Thank you all

Juan Orrego.

What atom_style are you using in your input script? The number of columns that LAMMPS expects from a data file depends on the atom_style defined in the script, and is usually listed in the data file as a cross-check, e.g., “Atoms # atomic” or “Atoms # charge”. See the documentation for more details.

The simplest way would be by using a tool that can read and write data files and you read each file with its “native” atom style and then write it out with the desired atom style for both files. Both need to be the same. At that point you may also consider just merging the two data files with said tool and then you don’t have to worry about using read_data add which is more fragile than people expect and can lead to unexpected geometries due to some internal limitations.

Thanks to everyone for the reply.

I’m using atomic in the input script.

i see, and is it possible to separate in Lammps two particle groups in a single simulation? e.g. take an x coordinate value, above that coordinate the atoms will be group 01 and below that coordinate will be group 02 but both groups have the same features.

As written in the documentation for read_data that I linked to, the atomic atom_style should have 5 columns, for ID, atom type, x, y, z. Yours has 6 columns, with the 3rd being a floating point number, which means this is probably meant to be read as atom_style charge. But follow Axel’s advice to find a third-party tool to combine these and output in atom_style atomic, it’s much easier.

You have regions, groups (static and dynamic, if needed), you can use different atom types etc.

If you want to apply region specific force field parameters, then you have to break down your simulation in many short runs and re-assign atom types based on region in between.

yes, I change the data file and it works, thank you for your help!

i will try the re-assign by region, thanks for your help