Polyhedron error: Inconsistent face data for body of atom

Dear LAMMPS users and developers,
I am trying to run an example of a “degenerate” rounded/polyhedron consisting of a single sphere.
I am on Ubuntu 22.04.4 LTS, LAMMPS (2 Aug 2023 - Update 2).
Upon executing
lmp -in in.sphere
I get:
ERROR on proc 0: Inconsistent face data for body of atom 1 (BODY/pair_body_rounded_polyhedron.cpp:588)

What am I doing wrong?

Here is the in.sphere:

units       lj

atom_style  body rounded/polyhedron 1 1

read_data   data.sphere

variable cut_inner  equal 1
variable k_n        equal 100
variable k_na       equal 0
variable c_n        equal 0
variable c_t        equal 0
variable mu         equal 0
variable delta_ua   equal 1

pair_style body/rounded/polyhedron ${c_n} ${c_t} ${mu} ${delta_ua} ${cut_inner}
pair_coeff * * ${k_n} ${k_na}

comm_modify vel yes

neighbor     0.5 bin
neigh_modify every 1 delay 0 check yes

timestep     0.01

fix          1 all nve/body

thermo_style custom step ke pe etotal
thermo       1000

run          10000

Here is the data.sphere file:

LAMMPS data file for sphere
1 atoms        
1 bodies       
1 atom types   
0 15 xlo xhi
0 15 ylo yhi
-15 15 zlo zhi
                 
Atoms

1 1 1 1 4 5 0

Bodies

1 3 10
1 1 1
0.9 0.9 0.9 0 0 0
0 0 0
1.0

a) please see the forum guidelines for correctly typesetting data from files
b) in case of problems running LAMMPS, please always report which LAMMPS version you are using and what platform you are running on (also mentioned in the guidelines)
c) in order for somebody to reproduce and debug your issue, you also need to provide the matching input file and let us know your command line.

Bottom line, the easier and less effort you make it to investigate and reproduce your issue, the better your chance to get meaningful help instead of people reminding you what you should be doing when asking about issues.

The documentation says that:

For N = 1 or 2, […] E and F are ignored and no edges or faces are listed […]

I have assumed that any value of E and F will do. However, on LAMMPS 7 Feb 2024 - Update 1 I obtain the same error with the original data file, but it works with E,F = 0:

Bodies

1 3 10
1 0 0
0.9 0.9 0.9 0 0 0
0 0 0
1.0

I wouldn’t say it is a bug, but it’s certainly confusing.

2 Likes

Thanks, E,F=0 for N=1,2 works for LAMMPS (2 Aug 2023 - Update 2) as well.

It is a bug. There is an internal function that returns the number of faces of the body, but with fewer than 3 vertices, there cannot be any faces and this function must return the proper value regardless of what it listed in the data file.

This should be fixed in the next LAMMPS release. The change is here: Collected small fixes by akohlmey · Pull Request #4111 · lammps/lammps · GitHub

2 Likes