forked from lijiext/lammps
correction to molecule-ID-increment logic
This commit is contained in:
parent
d717eeba66
commit
73186e4d26
|
@ -672,7 +672,13 @@ void FixPour::pre_exchange()
|
||||||
fixshake->set_molecule(nlocalprev,maxtag_all,imol,coord,vnew,quat);
|
fixshake->set_molecule(nlocalprev,maxtag_all,imol,coord,vnew,quat);
|
||||||
|
|
||||||
maxtag_all += natom;
|
maxtag_all += natom;
|
||||||
if (mode == MOLECULE && atom->molecule_flag) maxmol_all++;
|
if (mode == MOLECULE && atom->molecule_flag) {
|
||||||
|
if (onemols[imol]->moleculeflag) {
|
||||||
|
maxmol_all += onemols[imol]->nmolecules;
|
||||||
|
} else {
|
||||||
|
maxmol_all++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// warn if not successful with all insertions b/c too many attempts
|
// warn if not successful with all insertions b/c too many attempts
|
||||||
|
|
|
@ -609,7 +609,13 @@ void FixDeposit::pre_exchange()
|
||||||
maxtag_all += natom;
|
maxtag_all += natom;
|
||||||
if (maxtag_all >= MAXTAGINT)
|
if (maxtag_all >= MAXTAGINT)
|
||||||
error->all(FLERR,"New atom IDs exceed maximum allowed ID");
|
error->all(FLERR,"New atom IDs exceed maximum allowed ID");
|
||||||
if (mode == MOLECULE && atom->molecule_flag) maxmol_all++;
|
if (mode == MOLECULE && atom->molecule_flag) {
|
||||||
|
if (onemols[imol]->moleculeflag) {
|
||||||
|
maxmol_all += onemols[imol]->nmolecules;
|
||||||
|
} else {
|
||||||
|
maxmol_all++;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (atom->map_style) {
|
if (atom->map_style) {
|
||||||
atom->map_init();
|
atom->map_init();
|
||||||
atom->map_set();
|
atom->map_set();
|
||||||
|
|
|
@ -492,9 +492,9 @@ void CreateAtoms::command(int narg, char **arg)
|
||||||
for (int m = 0; m < natoms; m++) {
|
for (int m = 0; m < natoms; m++) {
|
||||||
if (molecule_flag) {
|
if (molecule_flag) {
|
||||||
if (onemol->moleculeflag) {
|
if (onemol->moleculeflag) {
|
||||||
molecule[ilocal] = moloffset + i + onemol->molecule[m];
|
molecule[ilocal] = moloffset + onemol->molecule[m];
|
||||||
} else {
|
} else {
|
||||||
molecule[ilocal] = moloffset + i+1;
|
molecule[ilocal] = moloffset + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (molecular == 2) {
|
if (molecular == 2) {
|
||||||
|
@ -530,6 +530,13 @@ void CreateAtoms::command(int narg, char **arg)
|
||||||
}
|
}
|
||||||
ilocal++;
|
ilocal++;
|
||||||
}
|
}
|
||||||
|
if (molecule_flag) {
|
||||||
|
if (onemol->moleculeflag) {
|
||||||
|
moloffset += onemol->nmolecules;
|
||||||
|
} else {
|
||||||
|
moloffset++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// perform irregular comm to migrate atoms to new owning procs
|
// perform irregular comm to migrate atoms to new owning procs
|
||||||
|
|
Loading…
Reference in New Issue