Problem in read_data (atom_style hybrid sph bond, version Oct2020)

Dear all,

I have come up with an error on my lammps script and would like to hear some suggestions/solutions. I have been using several versions of lammps (the latest was 03Mar2020), but the problem is triggered when I had to switch to the 29Oct2020 version. I am using a hybrid atom style (sph + bond) and the problem occurs when I read the data from an input file:

"
ERROR: Incorrect atom format in data file (src/atom.cpp:1037)
Last command: read_data read_test.initial
"

Here is a simplified version of my input file:

"
LAMMPS data file

10 atoms

2 bonds

3 atom types

1 bond types

0.0000000 0.0001200 xlo xhi
0.0000000 0.0001200 ylo yhi
0.0000000 0.0001200 zlo zhi

Masses

1 0.000000000000000997452110
2 0.000000000000000997452110
3 0.000000000000000997452110

Atoms

1 3 0.000020000 0.000020000 0.000020000 1000.0 0.0 1.0
2 3 0.000021000 0.000020000 0.000020000 1000.0 0.0 1.0
3 3 0.000022000 0.000020000 0.000020000 1000.0 0.0 1.0
4 3 0.000020000 0.000021000 0.000020000 1000.0 0.0 1.0
5 2 0.000021000 0.000021000 0.000020000 1000.0 0.0 1.0
6 2 0.000022000 0.000021000 0.000020000 1000.0 0.0 1.0
7 2 0.000020000 0.000022000 0.000020000 1000.0 0.0 1.0
8 2 0.000021000 0.000022000 0.000020000 1000.0 0.0 1.0
9 1 0.000022000 0.000022000 0.000020000 1000.0 0.0 1.0
10 1 0.000020000 0.000020000 0.000021000 1000.0 0.0 1.0

Bonds

1 1 2 3
2 1 5 6
"

I should note that I have tested several atom formats such as:

atom-id atom-type x y z rho esph cv
atom-id atom-type rho esph cv x y z
atom-id atom-type x y z rho esph cv 0 0 0
atom-id atom-type rho esph cv x y z 0 0 0

but none of them worked out!

I know there have been some changes in the way lammps reads data in recent versions but I couldn’t figure it out myself. So would you please let me know if I have missed something?

p.s. please don’t bother with the size of the domain, length-scale, etc. since I have made it simple to read here.

Best,

Amin

Hi Amin,

the bond atom style requires to add a molecule-ID field in the data format (see here). As explained in the documentation, it should come before of after the sph related fields depending on the order in which you declared the two styles.

Hi Germain,

Thanks for your reply. I am not sure about that, TBH. First of all, I don’t know what to set as the molecule-ID (my model is a macroscopic one). Additionally, a few lines after the list of data format, it is mentioned as follow:

"
Bonds section:

  • one line per bond
  • line syntax: ID type atom1 atom2

ID = bond number (1-Nbonds) type = bond type (1-Nbondtype) atom1,atom2 = IDs of 1st,2nd atom in bond

  • example:

12 3 17 29

The Bonds section must appear after the Atoms section. All values in this section must be integers (1, not 1.0).
"

This is exactly what I have in my data file, and there is no molecule-ID here.

Best,

Amin

The molecule ID goes into the Atoms section. It has nothing to do with the Bonds section.
The molecule ID has no physical meaning. It usually is set to enumerate either individual molecules or residues (or repeat units) for analysis or other uses in the LAMMPS input.
If you have an atom style with bonds (e.g. bond, angle, molecular, full) - individual or hybrid, the molecule ID must be provided.

Please play close attention to where the read_data documentation explains how to transform the individual per-atom properties from the various constituent atom styles into the hybrid style format.

1 Like

Hi @Amin_Rahmat1,

As @akohlmey said, I was not referring to the Bonds section of the data, but to the Atoms section. You can see all the field required by the different atom_style there. You will find every information you need to format this section of the data file just below the table. As mentioned in the description, if you don’t care about molecular information, just set the field to 0.

1 Like

Thanks Alex. You are right, a dummy value should be printed in the input file but that wasn’t very straightforward in the documentation by looking at the data format table. Anyways, thanks again for the help.

Best,

Amin

Thanks a lot, Germain, you are absolutely right.

Cheers,

Amin