fix bug in fix wall/morse that was computing forces incorrectly

This commit is contained in:
Axel Kohlmeyer
2023-02-23 15:38:20 -05:00
parent fff7b2a859
commit ae3f57e89a

View File

@ -18,7 +18,6 @@
#include <cmath>
using namespace LAMMPS_NS;
using namespace FixConst;
/* ---------------------------------------------------------------------- */
@ -72,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;