git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13000 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -1198,6 +1198,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) {
|
||||||
|
|
||||||
double rsq = 1.1;
|
double rsq = 1.1;
|
||||||
@ -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,11 +1245,13 @@ 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++) {
|
||||||
|
if (tmptag == atom->tag[i]) {
|
||||||
x[i][0] = xtmp[0];
|
x[i][0] = xtmp[0];
|
||||||
x[i][1] = xtmp[1];
|
x[i][1] = xtmp[1];
|
||||||
x[i][2] = xtmp[2];
|
x[i][2] = xtmp[2];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
energy_stored = energy_before;
|
energy_stored = energy_before;
|
||||||
}
|
}
|
||||||
update_gas_atoms_list();
|
update_gas_atoms_list();
|
||||||
|
|||||||
Reference in New Issue
Block a user