Dear lammps users,
I could be overlooking something, but it seems to me as if there is
a bug in the tail correction (energy offset) in pair_born_coul_wolf
and pair_born_coul_long
Line 286 in pair_born_coul_long and line 305 in pair_born_coul_wolf
give the following:
if (offset_flag) {
double rexp = exp(-cut_lj[i][j]*rhoinv[i][j]);
offset[i][j] = a[i][j]*rexp - c[i][j]/pow(cut_lj[i][j],6.0) +
d[i][j]/pow(cut_lj[i][j],8.0);
} else offset[i][j] = 0.0;
The rexp looks a little suspicious to me. In line 146 of
pair_born_coul_wolf and in line 141 of pair_born_coul_long
this is given as:
rexp = exp((sigma[itype][jtype]-r)*rhoinv[itype][jtype]);
Shouldn't the rexp in the offset be as below?
rexp = exp((sigma[itype][jtype]-cut_lj[i][j])*rhoinv[itype][jtype]);
Is this a bug or am I missing something?
Thanks,
John