delete_atoms behaviour

Steve,

I have a ‘behaviour’ comment rather than a bug report.

I am creating an odd shaped region of atoms (outer skin of a Berkovich indenter) by creating two sets of intersecting planes.

The final structure is carved from a large block using the delete_atoms command. (I tried just filling the region, but lammps complained. My method worked, so I went with it). However, when I went from the test case to the full setup, I got the error “

Initially I couldn’t see where I was, or wasn’t setting IDs. So I looked in the code, and found the issue was not the delete_atoms part, but in the create_atoms.cpp, line 238 there is a test. If the number of atoms exceeds some hardcoded value it does not set IDs (Atom->tag_enable = 0).

I know it’s a big number of atoms, but since I wanted to delete most of them, it did not seem an issue. I don’t know what other commands would look for IDs, but can you put a warning there, so others don’t get confused about the issue.

Cheers

Nigel

I know it’s a big number of atoms, but since I wanted to delete most of them, it did not seem an issue.

The line in question is:
if (atom->natoms > MAXSMALLINT) atom->tag_enable = 0;
and MAXSMALLINT is 2^31 = 2 billion.

Until LAMMPS supprts 64-bit atom IDs, you cannot create them

and then delete (most of) them, b/c as the error message says, delete_atoms

requires atom IDs.

I suppose we could print something when create_atoms is used to
create more than 2B atoms, so that the users knows the atoms don’t have IDs.

But I think you need to come up with a better way to initialize your problem.

You can define a region that is the intersection of multiple other regions, and
then use create_atoms to fill the new region. Then you shouldn’t have

more than 2B atoms in the first place.

Steve