"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c

:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Commands_all.html)

:line

fix oneway command :h3

[Syntax:]

fix ID group-ID oneway N region-ID direction :pre

ID, group-ID are documented in "fix"_fix.html command :ulb,l
oneway = style name of this fix command :l
N = apply this fix every this many timesteps :l
region-ID = ID of region where fix is active :l
direction = {x} or {-x} or {y} or {-y} or {z} or {-z} = coordinate and direction of the oneway constraint :l
:ule

[Examples:]

fix ions oneway 10 semi -x
fix all oneway 1 left -z
fix all oneway 1 right z :pre

[Description:]

Enforce that particles in the group and in a given region can only
move in one direction.  This is done by reversing a particle's
velocity component, if it has the wrong sign in the specified
dimension.  The effect is that the particle moves in one direction
only.

This can be used, for example, as a simple model of a semi-permeable
membrane, or as an implementation of Maxwell's demon.

:line

[Restart, fix_modify, output, run start/stop, minimize info:]

No information about this fix is written to "binary restart
files"_restart.html.  None of the "fix_modify"_fix_modify.html options
are relevant to this fix.  No global or per-atom quantities are stored
by this fix for access by various "output commands"_Howto_output.html.
No parameter of this fix can be used with the {start/stop} keywords of
the "run"_run.html command.  This fix is not invoked during "energy
minimization"_minimize.html.

[Restrictions:] none

[Related commands:]

"fix wall/reflect"_fix_wall_reflect.html command

[Default:] none

:line

