How to apply arbitrary forces in MD#

There several different methods to apply arbitrary forces on particles in MD:

  1. Implement a C++ component that evaluates the force/potential. Use one of the example plugins as a reference.

  2. Use the appropriate tabulated potential:

  3. Implement a Python subclass that evaluates the force/potential.

C++ components provide the highest performance, accuracy, and flexibility. Tabulated potentials provide moderate performance and accuracy is limited by the interpolation. The performance and accuracy of custom forces in Python depends entirely on the implementation.