fix bug in fix wall/morse that was computing the force incorrectly

This commit is contained in:
Axel Kohlmeyer
2023-02-23 15:20:43 -05:00
parent 2e5bc2f6b7
commit d3ac4a728d
5 changed files with 78 additions and 132 deletions

View File

@ -71,7 +71,7 @@ void FixWallMorse::wall_particle(int m, int which, double coord)
}
double dr = delta - sigma[m];
double dexp = exp(-alpha[m] * dr);
fwall = side * coeff1[m] * (dexp * dexp - dexp) / delta;
fwall = side * coeff1[m] * (dexp * dexp - dexp);
ewall[0] += epsilon[m] * (dexp * dexp - 2.0 * dexp) - offset[m];
f[i][dim] -= fwall;
ewall[m + 1] += fwall;