mstk.ommhelper.force.wall_power

mstk.ommhelper.force.wall_power(system, particles, direction, bound, k, cutoff, power=2)

Add a power wall for selected particles so that they cannot cross it.

Note that periodic box condition is not considered, so you need to make sure particles will not move to other cells during the simulation.

The energy equal to k when particle is located at the lower or higher bound, and equal to zero when particle is located between [lower bound + cutoff, higher bound - cutoff].

Parameters:
  • system (mm.System) –

  • particles (list of int) –

  • direction (['x', 'y', 'z']) –

  • bound (list of float) –

  • k (float) –

  • cutoff (float) –

  • power (int, optional) –

Returns:

force

Return type:

mm.CustomExternalForce