Identifying the molecule ID in from atom ID in local anglelist

Hi all,

I want to identify the molecule ID from atom ID stored in local anglelist. I code like following

for (n = 0; n < nanglelist; n++)

i1 = anglelist[n][0];
i2 = anglelist[n][1];
i3 = anglelist[n][2];
type = anglelist[n][3];

imol = molecule[i1];
if (molmap) imol = molmap[imol-idlo];
else imol–;


If this is correct for identifying the molecule ID. And I should know this inside the for loop.


I don’t know how you setup molmap, but the access of

anglelist (assuming LAMMPS created it) and molecule[]

is fine.