git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13000 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
pscrozi 2015-01-29 16:44:07 +00:00
parent 0e4e48d142
commit 53b2a08d9c
1 changed files with 10 additions and 4 deletions

View File

@ -1197,6 +1197,8 @@ void FixGCMC::attempt_atomic_translation_full()
double **x = atom->x;
double xtmp[3];
tagint tmptag = -1;
if (i >= 0) {
@ -1232,6 +1234,8 @@ void FixGCMC::attempt_atomic_translation_full()
x[i][0] = coord[0];
x[i][1] = coord[1];
x[i][2] = coord[2];
tmptag = atom->tag[i];
}
double energy_after = energy_full();
@ -1241,10 +1245,12 @@ void FixGCMC::attempt_atomic_translation_full()
energy_stored = energy_after;
ntranslation_successes += 1.0;
} else {
if (i >= 0) {
x[i][0] = xtmp[0];
x[i][1] = xtmp[1];
x[i][2] = xtmp[2];
for (int i = 0; i < atom->nlocal; i++) {
if (tmptag == atom->tag[i]) {
x[i][0] = xtmp[0];
x[i][1] = xtmp[1];
x[i][2] = xtmp[2];
}
}
energy_stored = energy_before;
}