[lammps-users] atom->x array size

Dear Lammps-users,

I am trying to understand how lammps deals with the forces on a particular atom due to all other atoms. In doing this I came across some code that sets the dimensions of atom->x to be (DELTA + nlocal) where nlocal is the number of atoms stated in the input file and DELTA is some number. In my case ( atom_vec_full ), DELTA = 10000. I'm not sure what this is for. Does anyone have any explanations?

Thanks,
Joyce

Where in the code do you mean? It could be
growing the local atom array when atoms are communicated
to a proc.

Steve

Hi Steve,

I’m looking at atom_vec_full.cpp line 57 where grow(int n) starts. Basically, is there way to go from a number larger than nlocal to the atom it corresponds to?

In the pair_lj_cut_coul_long.cpp code, function compute(), the for loop over jj (then mapped to j) often calls on atom->x[ j ][] when j > nlocal. I’d just like to know which atom is it referring to.

Thanks,
Joyce

atom->tag[i] should always give the global ID of the local atom i

Steve