[lammps-users] One question about losting atoms

Thank you very much for the advice. If adding some lines in my code to renew the atom->natoms just after the insertion, will it make any physical problem?
The result of mine is reliable? Thanks everyone whom answer me the question.


You should be able to change atom->natoms so long as you are not
doing a molecular simulation (only atomic). If molecular you would need
to also re-init the global map via calls to atom->map_init, etc.