correctly initialize radius and molecule id
This commit is contained in:
@ -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])) {
|
(center[1] < subhi[1]) && (center[2] >= sublo[2]) && (center[2] < subhi[2])) {
|
||||||
|
|
||||||
atom->avec->create_atom(ntype, center);
|
atom->avec->create_atom(ntype, center);
|
||||||
if (atom->radius_flag) atom->radius[ilocal] = ravg * radiusscale;
|
int idx = atom->nlocal-1;
|
||||||
if (atom->molecule_flag) atom->molecule[ilocal] = molid;
|
if (atom->radius_flag) atom->radius[idx] = ravg * radiusscale;
|
||||||
|
if (atom->molecule_flag) atom->molecule[idx] = molid;
|
||||||
++ilocal;
|
++ilocal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user