How to solve Neighbor list builds = 1 Dangerous builds not checked?

Hi

I’m doing a Reaxff simulation and using the delete option:

fix 3 all reaxff/species 10 10 100 species.out delete species.del masslimit 0 70

I need to reset the atoms ID after each elimination is done in order to have a dump file that contains the ID in order and with a sequential number of atoms, so for that, I’m using these commands:

dump 1 all custom 100 char.lammpstrj id type x y z
dump_modify 1 sort id
run 432000 every 100 reset_atoms id sort yes

But I’m getting this error in my log file:

Total # of neighbors = 3874805

Ave neighs/atom = 256.30407

Neighbor list builds = 1

Dangerous builds not checked

reset_atoms

terminate called after throwing an instance of ‘std::logic_error’
what(): basic_string::_M_construct null not valid
terminate called after throwing an instance of ‘std::logic_error’
what(): basic_string::_M_construct null not valid
terminate called after throwing an instance of ‘std::logic_error’
what(): basic_string::_M_construct null not valid
terminate called after throwing an instance of ‘std::logic_error’
what(): basic_string::_M_construct null not valid
terminate called after throwing an instance of ‘std::logic_error’
what(): basic_string::_M_construct null not valid
srun: error: cn126: task 1: Aborted
srun: error: cn127: task 2: Aborted
srun: error: cn116: task 0: Aborted
srun: error: cn129: task 4: Aborted
srun: error: cn128: task 3: Aborted

And the simulation is stopped

How could I solve this?

First off, always report your LAMMPS version and platform you are running on when you discuss errors and error messages.

The error you are encountering is not at all related to the neighbor list message.

More likely due to the reset of the atom IDs. Same as @srtee I consider what you are trying to do a bad idea. This kind of “fixup” is better done after the fact and not during the simulation. You definitely want to preserve the atom IDs or else you cannot tell which atoms are which between steps.

I cannot say for certain, but I suspect the problem is with fix reaxff/species or some other output related features. You will probably have to redefine the fix and possibly other output related commands every time you reset the atom IDs.

If you want to know more you will have to look at a stack trace generated with a debugger ( run “gdb --args ./lmp -in in.input”, then “catch throw” at the gdb prompt and then “run” and when the run stops at the error type “where” and report that info) or provide a simple, small reproducer input deck.

Thanks for the clarification. Based on this, how could I fix the atoms ID that after the simulation is done?

This is my lammps version
LAMMPS (8 Feb 2023)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task

You can write some script that reads the trajectory frames, sorts the data by the atom id and writes it back out or analyzes it directly. Please see 10. Auxiliary tools — LAMMPS documentation for some inspiration.

If you write out your dump file in “yaml” format: dump command — LAMMPS documentation
you don’t even need any special tools like the Pizza.py files, but could just use general YAML file parsing modules that are available in multiple programming languages. Please see 8.3.9. Output structured data from LAMMPS — LAMMPS documentation for some examples for using Python or Perl that can also be adapted for reading YAML format dump files.

1 Like