neighbors of angles' atoms

Hello,

I am trying to search the neighbors of each angle using the follow script. But it seem does not work very well. is there something wrong?

/* ---------------------------------------------------------------------- */

void Fixxxx::init()
{
   int irequest = neighbor->request((void *) this);
   neighbor->requests[irequest]->pair = 0;
   neighbor->requests[irequest]->fix = 1;
   neighbor->requests[irequest]->half = 0;
   neighbor->requests[irequest]->full = 1;
     .........
}

void Fixxxx::init_list(int id, NeighList *ptr)
{
   list = ptr;
}

/* ---------------------------------------------------------------------- */

void Fixxxx::initial_integrate(int vflag)
{
   .........

   int **anglelist = neighbor->anglelist;
   int nanglelist = neighbor->nanglelist;

   inum = list->inum;
   ilist = list->ilist;
   numneigh = list->numneigh;
   firstneigh = list->firstneigh;

   for (n = 0; n < nanglelist; n++) {
     i1 = anglelist[n][0];
     i2 = anglelist[n][1];
     i3 = anglelist[n][2];
      .........

     for (ii=0; ii<3; ii++){

       i = anglelist[n][ii];
       jlist = firstneigh[i];
       jnum = numneigh[i];

       for (jj=0; jj<jnum; jj++) {
         j = jlist[jj];
         j &= NEIGHMASK;

           .........

       }
     }
   }

/* ---------------------------------------------------------------------- */

Hello,

I am trying to search the neighbors of each angle using the follow
script. But it seem does not work very well. is there something wrong?

what do you mean by "does not work very well"? it is difficult to give
a recommendation, on such an unspecific description. if you go to the
doctor and say "i am in pain", the doctor will also have to ask you,
where you are hurting, since a pill against headaches will be unlikely
to help, if you have cut yourself in the finger. :wink:

Some of the indices in the anglelist are ghost atoms.
You can’t look for neighbors of ghost atoms, they
don’t exist.

Steve