let fix pour know about molecule template molecule IDs

This commit is contained in:
jrgissing
2020-03-07 21:58:47 -07:00
parent 21ae5ac533
commit 2304cdd30d

View File

@ -632,7 +632,13 @@ void FixPour::pre_exchange()
int n = atom->nlocal - 1;
atom->tag[n] = maxtag_all + m+1;
if (mode == MOLECULE) {
if (atom->molecule_flag) atom->molecule[n] = maxmol_all+1;
if (atom->molecule_flag) {
if (onemols[imol]->moleculeflag) {
atom->molecule[n] = maxmol_all + onemols[imol]->molecule[m];
} else {
atom->molecule[n] = maxmol_all+1;
}
}
if (atom->molecular == 2) {
atom->molindex[n] = 0;
atom->molatom[n] = m;