neighbors of neighbors

Dear lammps users,

I am trying to implement my neural network potential and read previous posts that are relevant to me. I set the following lines in my init_style() function.

int irequest = neighbor->request(this,instance_me);
  neighbor->requests[irequest]->compute = 1;
  neighbor->requests[irequest]->half = 0;
  neighbor->requests[irequest]->full = 1;
  neighbor->requests[irequest]->ghost = 1;

I used a simulation block of 8 bases and printed out number of neighbors of neighbors for first atom (i=0). The ‘j’ atoms are the neighbors of ‘i’. The neighbors of ‘i’ suppose to have at least 38 or 40 neighbors but they have less neighbors than the neighbors of ‘i’. The neighbors colored in red are other bases. The following is the output.

number of neighbors of i=0 is 38
number of neighbors of j=253 is 29
number of neighbors of j=237 is 32
number of neighbors of j=240 is 29
number of neighbors of j=241 is 36
number of neighbors of j=199 is 32
number of neighbors of j=204 is 29
number of neighbors of j=205 is 36
number of neighbors of j=182 is 25
number of neighbors of j=183 is 35
number of neighbors of j=186 is 37
number of neighbors of j=187 is 37
number of neighbors of j=188 is 32
number of neighbors of j=189 is 39
number of neighbors of j=71 is 32
number of neighbors of j=72 is 29
number of neighbors of j=73 is 36
number of neighbors of j=54 is 25
number of neighbors of j=55 is 35
number of neighbors of j=56 is 37
number of neighbors of j=57 is 37
number of neighbors of j=58 is 32
number of neighbors of j=59 is 39
number of neighbors of j=16 is 25
number of neighbors of j=17 is 35
number of neighbors of j=18 is 32
number of neighbors of j=19 is 39
number of neighbors of j=22 is 37
number of neighbors of j=23 is 37
number of neighbors of j=1 is 38
number of neighbors of j=2 is 40
number of neighbors of j=3 is 40
number of neighbors of j=4 is 40
number of neighbors of j=5 is 40
number of neighbors of j=6 is 40
number of neighbors of j=7 is 40
number of neighbors of j=8 is 38
number of neighbors of j=27 is 38
number of neighbors of j=91 is 38

I am not sure if I have done something wrong or I do not understand how neighbors of neighbors are created. My cutoff distance is 6.0 A and used "neighbor 0.5 bin”.

I appreciate for any inputs.

Ganga P Purja Pun

i don’t understand what you are asking here and what you are complaining about.
LAMMPS will determine the number of neighbors and assemble the list of neighbors for the given neighborlist cutoff (which includes the so-called skin distance, see log file). what has this to do with “neighbors of neighbors”? those are just the neighbors of other atoms, the indices of which you find in the list of neighbors of the first atom.

axel.

I also see that you are enabling the ghost=1
flag for you neigh list request. If you are expecting
that you will get full neighbor lists (40 neighs each) for ghost atoms
which are neighbors of owned atoms, then that
is not possible for all ghost atoms. Some ghost atoms
will always have incomplete neighbor lists due
to the fact that ghosts only exist within a cutoff distance.

Steve

Thank you Steve. This explains !

Ganga