remove debug logic
This commit is contained in:
@ -205,31 +205,17 @@ 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
|
||||||
@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user