avoid division by zero when using cutoff 0.0 with pair_modify shift yes
This commit is contained in:
@ -243,7 +243,7 @@ double PairBorn::init_one(int i, int j)
|
||||
born2[i][j] = 6.0*c[i][j];
|
||||
born3[i][j] = 8.0*d[i][j];
|
||||
|
||||
if (offset_flag) {
|
||||
if (offset_flag && (cut[i][j] > 0.0)) {
|
||||
double rexp = exp((sigma[i][j]-cut[i][j])*rhoinv[i][j]);
|
||||
offset[i][j] = a[i][j]*rexp - c[i][j]/pow(cut[i][j],6.0) +
|
||||
d[i][j]/pow(cut[i][j],8.0);
|
||||
|
||||
Reference in New Issue
Block a user