Fix move command

Dear LAMMPS users,

For fix move command, it is written in the manual that the linear style is identical to using the variable style with an equal-style variable that uses the vdisplace() function.

So these two commands should yield the same result:

variable V equal 1.0
variable x equal vdisplace(0.0,$V)
fix 1 boundary move variable v_x NULL NULL v_V NULL NULL

fix 2 all nvt temp 300.0 300.0 0.05

VS

fix 1 move boundary move linear 1.0 0.0 0.0
fix 2 all nvt temp 300.0 300.0 0.05

The first command works well but the former commands lead to high velocity for atoms in the boundary group and breaking down the simulation.

In sum, is there any other way to use a variable (instead of a constant value) in “fix move linear” command?

Cheers,

Jeong.

Correction: the latter command lines work well but the former command lines lead to high velocity.

Dear LAMMPS users,

For fix move command, it is written in the manual that the linear style is identical to using the variable style with an equal-style variable that uses the vdisplace() function.

So these two commands should yield the same result:

variable V equal 1.0
variable x equal vdisplace(0.0,$V)
fix 1 boundary move variable v_x NULL NULL v_V NULL NULL

fix 2 all nvt temp 300.0 300.0 0.05

​no, they should​ not. vdisplace(0.0,$V) starts for all atoms at coordinate 0.0. that is wrong. it would have to be a stored value of the current coordinate.

apart from that, you are time integrating the atoms in the group boundary twice (they are included in group all, and thus also time integrated by fix nvt). that is wrong and will result in bogus dynamics.

VS

fix 1 move boundary move linear 1.0 0.0 0.0
fix 2 all nvt temp 300.0 300.0 0.05

​this is equally wrong.

axel.​