- cggl_flag[ncg[mc] * DD_CGIBS] = dd->globalAtomGroupIndices[cg];
- /* We store the cg size in the lower 16 bits
- * and the place where the charge group should go
- * in the next 6 bits. This saves some communication volume.
- *
- * TODO: Remove the size, as it is now always 1.
- */
- const int numAtomsInGroup = 1;
- cggl_flag[ncg[mc] * DD_CGIBS + 1] = numAtomsInGroup | flag;
- ncg[mc] += 1;
- nat[mc] += numAtomsInGroup;
+ cggl_flag[nat[mc] * DD_CGIBS] = dd->globalAtomGroupIndices[cg];
+ cggl_flag[nat[mc] * DD_CGIBS + 1] = flag;
+ nat[mc]++;