Reax/C and adding atoms

Dear all,

I’ve observed some peculiar behaviour when using reax/c and adding molecules during a simulation. (The first observation of it was during the sue of fix deposit, but see below).

I’ve tried to track the issue down, as I suspect it really does originate from reax/c (that’s where the errors are coming from). I ended up with the attached simple example: if I run it unmodified, lammps halts after adding the second molecule with “p0: not enough space for bonds! total=217915748 allocated=25000”. The problem disappears when making the box smaller, also leading to the creation of ghost atoms during the first run (with only one molecule).

Looking at the reax/c code, I figured that it can handle molecule (= bond) additions during a simulation, but only when there are already ghost atoms present which can be replaced by the new atoms. But honestly, I could make sense of what is happening. I do know that the nonperiodic system i was previously studying caused bondchk errors when I wanted to use fix deposit, but I managed to get rid of those by tweaking the system to be periodic (and have ghost atoms prior to new molecule addition).

I understand my comments might sound somewhat vague, but I hope that the attached files can provide some insight.

Best wishes,


ch3.txt (219 Bytes)

in.ch3 (1.4 KB)

If you don’t place your first molecule at the center of the box and place it somewhere else, say, 30 30 30, then the error goes away.

I am not entirely sure why, but I will take a further look.