[lammps-users] Unexpected fix wall/region harmonic behavior

I apologize if this is a repost; I’ve been having trouble with my e-mail client, and I can’t be sure that my first e-mail to the list went out.

Hello all,

I am having problems using the wall/region harmonic fix, and closer inspection reveals that the wall-particle interaction energies are much larger than expected.

I may be misunderstanding how the wall potential is defined. Say I have a wall with an r_cutoff of 25 A. Based on the potential function in the manual …

E = \epsilon * (r - r_cutoff)^2, for r < r_cutoff

… I expect that the wall–particle energy when an atom reaches within 25 A of the wall would be zero (since r = r_cutoff), and increase as the particle gets closer to the wall (due to decreasing r, and therefore increasing (r - r_cutoff)^2).

However, what I find is that the wall–particle energy (as output by f_wall-ID) when an atom is at the cutoff distance (i.e. just entering the wall potential), is not zero, but actually equals …

E_cutoff = \epsilon * r_cutoff^2

… causing the atom to bounce off violently (often blowing up the system).

Can anyone confirm this? Is this a bug, or — much more likely, I’m sure — am I missing something?

Thanks!

Note: The E_cutoff value reported here is seen only in the 21-Dec-2010 Windows build of LAMMPS. The 15-Mar-2011 version on a Linux machine returns “nan” for the energy, but a similar trajectory to the Windows run. As expected after the 6-Feb-2011 bug fix, the wall forces reported by the later version are different, but still high for a particle just entering the wall potential — if this is a bug, I suspect that the 6-Feb-2011 fix for the forces did not fix it.