remove debug logic

This commit is contained in:
Steve Plimpton
2021-10-11 16:20:19 -06:00
parent 7bed85ef19
commit eedd953258

View File

@ -205,32 +205,18 @@ int FixMolSwap::attempt_swap()
minmol + static_cast<tagint> (random->uniform() * (maxmol-minmol+1)); minmol + static_cast<tagint> (random->uniform() * (maxmol-minmol+1));
if (molID > maxmol) molID = maxmol; if (molID > maxmol) molID = maxmol;
//printf(" Attempt %ld molID %d\n",update->ntimestep,molID);
int *mask = atom->mask; int *mask = atom->mask;
int *type = atom->type; int *type = atom->type;
tagint *molecule = atom->molecule; tagint *molecule = atom->molecule;
int nlocal = atom->nlocal; int nlocal = atom->nlocal;
// DEBUG
int origitype = 0;
int origjtype = 0;
for (int i = 0; i < nlocal; i++) { for (int i = 0; i < nlocal; i++) {
if (molecule[i] != molID) continue; if (molecule[i] != molID) continue;
if (!(mask[i] & groupbit)) continue; if (!(mask[i] & groupbit)) continue;
if (type[i] == itype) { if (type[i] == itype) type[i] = jtype;
origitype++; else if (type[i] == jtype) type[i] = itype;
type[i] = jtype;
} else if (type[i] == jtype) {
origjtype++;
type[i] = itype;
}
} }
//printf(" ijtype %d %d orig %d %d count %d\n",
// itype,jtype,origitype,origjtype,origitype+origjtype);
// if unequal_cutoffs, call comm->borders() and rebuild neighbor list // if unequal_cutoffs, call comm->borders() and rebuild neighbor list
// else communicate ghost atoms // else communicate ghost atoms
// call to comm->exchange() is a no-op but clears ghost atoms // call to comm->exchange() is a no-op but clears ghost atoms
@ -250,13 +236,10 @@ int FixMolSwap::attempt_swap()
double energy_after = energy_full(); double energy_after = energy_full();
//printf(" eng before: %g, eng after %g\n",energy_before,energy_after);
// swap accepted // swap accepted
if (random->uniform() < exp(beta*(energy_before - energy_after))) { if (random->uniform() < exp(beta*(energy_before - energy_after))) {
energy_stored = energy_after; energy_stored = energy_after;
//printf(" accept\n");
return 1; return 1;
// swap not accepted // swap not accepted
@ -265,7 +248,6 @@ int FixMolSwap::attempt_swap()
// since will be done on next cycle or in Verlet when this fix is done // since will be done on next cycle or in Verlet when this fix is done
} else { } else {
//printf(" reject\n");
for (int i = 0; i < nlocal; i++) { for (int i = 0; i < nlocal; i++) {
if (molecule[i] != molID) continue; if (molecule[i] != molID) continue;
if (!(mask[i] & groupbit)) continue; if (!(mask[i] & groupbit)) continue;