mstk.ommhelper.force.slab_correction

mstk.ommhelper.force.slab_correction(system)

Apply Yeh’s long range coulomb correction for slab geometry in z direction to eliminate the undesired interactions between periodic slabs.

It’s useful for 2-D systems simulated under 3-D periodic condition. For this correction to work correctly:

  • A vacuum space two times larger than slab thickness is required.

  • All particles should never diffuse across the z boundaries.

  • The box size should not change during the simulation.

Parameters:

system (mm.System) – The OpenMM system to be simulated

Returns:

force

Return type:

mm.CustomCVForce