correctly initialize radius and molecule id

This commit is contained in:
Axel Kohlmeyer
2022-05-07 21:24:08 -04:00
parent 60b9fd2db8
commit e9b1ca16a3

View File

@ -908,8 +908,9 @@ int CreateAtoms::add_tricenter(const double vert[3][3], tagint molid, double rad
(center[1] < subhi[1]) && (center[2] >= sublo[2]) && (center[2] < subhi[2])) {
atom->avec->create_atom(ntype, center);
if (atom->radius_flag) atom->radius[ilocal] = ravg * radiusscale;
if (atom->molecule_flag) atom->molecule[ilocal] = molid;
int idx = atom->nlocal-1;
if (atom->radius_flag) atom->radius[idx] = ravg * radiusscale;
if (atom->molecule_flag) atom->molecule[idx] = molid;
++ilocal;
}
}