Trouble with 1-3 bond count inconsistency

Good afternoon LAMMPS mailing list,

I am having trouble with the 1-3 bond inconsistency while reading in a LAMMPS data file. I have a bonded molecular framework, which is adsorbing either methane or ethane molecules. I am performing the adsorption using a Monte Carlo scheme in a different software then using a python script to add the adsorbed molecules to the framework LAMMPS file (then run a basic NPT MD simulation).

Interestingly, when I add the methane molecules to the framework the NPT simulation runs just fine. However, when I add ethane to the simulation cell instead I am getting an error with read_data that says
“ERROR on proc 0: 1-3 bond count is inconsistent (…/special.cpp:292)”

This error is happening for every molecular system that I have tried (ethene, propane, etc.).
I know that typically this means that there is bad geometry defined in the LAMMPS data file. However, I have checked all of the bonds in the system and there doesn’t appear to be anything fishy like repeat atom indices or atoms bonded to molecules that that are not supposed to be. My natural inclination would be that maybe it has something to do with image flags, but I have tried removing them from the LAMMPS data file and setting them all manually (with a python script). It is hard for me to believe that image flags would be causing this system to fail though, but I can always be surprised. I was curious what might be causing this problem or if anybody had any insight. I understand that because I am using a python script to adjust the data file, it is likely something on my end, but I cannot seem to spot it. I have visualized the system as well and everything looks normal as far as I can tell.

Any help would be appreciated,
Attached is a sample npt script and lammps data file.
The ethane molecules are described with particle type 12 and bond type 15
There are 3500 framework atoms and 108 ethane atoms (59 molecules)


P.S. The LAMMPS version I am running this with is 22Aug18. I apologize for running with such an old version of LAMMPS it is just convenient for now because it has some modifications done to it that I need to move to the newest version. (853 Bytes)

temp_lmps.lmps (856 KB)

this input runs for me with the 3 Mar 2020 version.


Thanks Axel,

I updated to the newest version and it worked for me too.