git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13000 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -1197,6 +1197,8 @@ void FixGCMC::attempt_atomic_translation_full()
|
|||||||
|
|
||||||
double **x = atom->x;
|
double **x = atom->x;
|
||||||
double xtmp[3];
|
double xtmp[3];
|
||||||
|
|
||||||
|
tagint tmptag = -1;
|
||||||
|
|
||||||
if (i >= 0) {
|
if (i >= 0) {
|
||||||
|
|
||||||
@ -1232,6 +1234,8 @@ void FixGCMC::attempt_atomic_translation_full()
|
|||||||
x[i][0] = coord[0];
|
x[i][0] = coord[0];
|
||||||
x[i][1] = coord[1];
|
x[i][1] = coord[1];
|
||||||
x[i][2] = coord[2];
|
x[i][2] = coord[2];
|
||||||
|
|
||||||
|
tmptag = atom->tag[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
double energy_after = energy_full();
|
double energy_after = energy_full();
|
||||||
@ -1241,10 +1245,12 @@ void FixGCMC::attempt_atomic_translation_full()
|
|||||||
energy_stored = energy_after;
|
energy_stored = energy_after;
|
||||||
ntranslation_successes += 1.0;
|
ntranslation_successes += 1.0;
|
||||||
} else {
|
} else {
|
||||||
if (i >= 0) {
|
for (int i = 0; i < atom->nlocal; i++) {
|
||||||
x[i][0] = xtmp[0];
|
if (tmptag == atom->tag[i]) {
|
||||||
x[i][1] = xtmp[1];
|
x[i][0] = xtmp[0];
|
||||||
x[i][2] = xtmp[2];
|
x[i][1] = xtmp[1];
|
||||||
|
x[i][2] = xtmp[2];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
energy_stored = energy_before;
|
energy_stored = energy_before;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user