LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands

### fix oneway command

Syntax:

    fix ID group-ID oneway N region-ID direction

- ID, group-ID are documented in fix command
- oneway = style name of this fix command
- N = apply this fix every this many timesteps
- region-ID = ID of region where fix is active
- direction = x or -x or y or -y or z or -z = coordinate and direction of the oneway constraint

Examples:

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

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.

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

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

Restrictions: none

Related commands:

fix wall/reflect command

Default: none