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 http://lammps.sandia.gov/doc/fix_rigid.html]
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
A_SOFT=50
TEMP=1.0
DAMP=~1.2
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?
Thanks,
Fred