Missing angles with reset_atom_ids

Hello LAMMPS community,
I get the error message on missing bonds after deleting atoms (SPCE H2O) and using reset_atom_ids:
ERROR on proc 0: Angle atoms 0 0 0 missing on proc 0 at step 1147 (src/src/ntopo_angle_partial.cpp:64)
I don’t get this error message if I don’t use reset_atom_ids command. If I understand the issue correctly, it results from a loss of ghost atoms. If so, what is the proper way to reset the ghost atoms?
The input script which I used to reproduce the error is below:
data.spce (414.2 KB)

units           real

atom_style      full
boundary p p p
timestep        1.0

pair_style lj/cut/coul/long 9.0 9.0
special_bonds lj/coul 0.0 0.0 0.5

bond_style      harmonic
angle_style     harmonic
dihedral_style  none
improper_style  none

read_data       data.spce
replicate 1 1 10

pair_style lj/cut/coul/long 9.0
pair_coeff 1 1 0.15539421659476232 3.16555789 #O-O
pair_coeff 1 2 0.0000 0.0000 # O-H
pair_coeff 2 2 0.0000 0.0000 #H-H


pair_modify tail yes
kspace_style    pppm 1.0e-4

bond_coeff      1 5000.00 1.000
angle_coeff     1 500.0 109.47

minimize 1e-25 1e-19 10000 10000

neighbor        2.0 bin
neigh_modify    every 1 delay 10 check yes


region to_del block INF INF INF INF 160.0 170.0


delete_atoms region to_del mol yes
write_data test_4.dat

reset_atom_ids

group water type 1 2
fix 4 water shake 0.0001 20 0 b 1 a 1
dump d_sys all atom 1000 test_4.dump


fix 2 all npt temp 300.0 300.0 100.0 iso 0.0 0.0 $(1000.0*dt)
thermo_style    one
thermo 500

run 5000
unfix 2

Please let us know what is your specific LAMMPS version and with how many processors and what command line you are running it, in case you do run in parallel.

The error message: Angle atoms 0 0 0 missing on proc 0 is an “impossible error” which can only be caused by a bug in the code. There cannot be an angle made from the same three atoms and there cannot be atoms with an atom ID < 1.

The same input is not reproducing the reported error when I am running it with 4 MPI processes locally using LAMMPS version 15 Sep 2022.

Hi Axel,
Thank you for your reply.
When I got the error, I used July 21 2020 version. I’ve tested on the most recent version and the problem seems to be gone. Sorry for the hustle.