Moving Atomistic Wall

I am trying to simulate a polymer between two atomistic walls (fcc), where the walls can either be stationary or move at some velocity. The relevant section of the manual I found was this:

A simpler way to hold atoms stationary is to not include those atoms in your time integration fix. E.g. use “fix 1 mobile nve” instead of “fix 1 all nve”, where “mobile” is the group of atoms that you want to move. You can move atoms with a constant velocity by assigning them an initial velocity (via the velocity command), setting the force on them to 0.0 (via the fix setforce command), and integrating them as usual (e.g. via the fix nve command). [Pasted from]

I have borrowed from a number of sources on the LAMMPS site, and divided the atoms into “wallhi”, “walllo” and “flow” types, and the script to set velocity and force looks like this:

First snippet …

variable U equal “0.0 or any other small value”

velocity wallhi set $U NULL NULL units box

velocity walllo set -$U NULL NULL units box

Fixes …

fix setfhi wallhi setforce 0.0 0.0 0.0

fix setflo walllo setforce 0.0 0.0 0.0

However, our script only will run for stationary walls where the wall atoms are excluded from the integration. For example, this soft-potential push-off works if I select “flow” (i.e., stationary wall), but blows up of I select “all” … the value of U does not matter.

Fixes …

fix 1 all|flow nve

fix 2 all|flow langevin {TEMP} {TEMP} {DAMP} {RANDSEED}

variable prefactor equal ramp(0,${A_SOFT})

fix 3 all|flow adapt 1 pair soft a * * v_prefactor

The soft potential parameters look like this

pair_style soft 1.0

pair_coeff 1 1 0.0 1.0

pair_coeff 2 2 0.0 1.0

and other relevant values are




The only bond type is for the molecules in the chains.

Is there some problem with the way we are doing those fixes? Or is there some problem with the ordering?



I don't know the reason your system is exploding, but I'm curious to
know what "fix move" would do when applied to wallhi or walllo. (I
think you would continue to exclude the wall atoms from integration.)

Have you tried this?


What you're doing should work. You do need to
put the fix setforce 0.0 after the fix langevin if you
apply fix langevin to the wall particles, since
fix langevin imparts random forces to the particles.
Or you could just use fix langevin on the flow
particles. I suggest you dump the wall coords
frequently to a file and assure yourself they
are moving with a constant unperturbed velocity.