Bug in atom counts related to lost atoms

If LAMMPS is set to ignore or warn about lost atoms, there is a bug with
the atom tallys. For example, "create_atoms" will produce negative values
if more atoms are lost than are created. The following input reproduces
it:

# START
units metal
boundary p p f
lattice fcc 3
region simbox block 0 10 0 10 -5 15
region mbox block 0 10 0 10 0 10
create_box 1 simbox
create_atoms 1 region mbox
mass 1 16
pair_style lj/cut 2.5
pair_coeff * * 1.0 1.0
thermo_modify lost warn
velocity all set 0 0 1
fix 1 all nve
run 1000
create_atoms 1 single 0.1 0.1 0.1
# END

I get the following message at the end of the file:
   "Created -401 atoms"
There should be 1 created and 402 lost, in this case.

The following command can be used to correct the tallies:
    create_atoms 1 single INF INF INF
This command, in effect, attempts to create an atom infinitely far away
from the origin, which should always create nothing, but it WILL recompute
the atom tallies so subsequent calls to create_atoms are diagnostic.

One relevant question: is the "Dangerous builds = 5" (or other non-zero
number) produced by the above input because of the lost atoms?

Karl D. Hammond
[email protected]...

"You can never know everything, and part of what you know is always
   wrong. A portion of wisdom lies in knowing that. A portion of courage
   lies in going on anyway."
"Nothing ever goes as you expect. Expect nothing, and you will not be
   surprised."

yes - the count is off - I'll post a patch for this today.

Re: dangerous builds - that is different - see Section 2.7
of the manual for an explanation.

Thanks,
Steve