From 2304cdd30df2c03ce5d45cb0d532eb23b92cdeac Mon Sep 17 00:00:00 2001 From: jrgissing Date: Sat, 7 Mar 2020 21:58:47 -0700 Subject: [PATCH] let fix pour know about molecule template molecule IDs --- src/GRANULAR/fix_pour.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/GRANULAR/fix_pour.cpp b/src/GRANULAR/fix_pour.cpp index 2255f64eb2..e04faa783b 100644 --- a/src/GRANULAR/fix_pour.cpp +++ b/src/GRANULAR/fix_pour.cpp @@ -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;