Potential truncations

sharp

Create sharp truncation by setting the potential to zero for particle distances r larger than the cutoff distance r_c, i.e., by multiplying with a step function:

\tilde U(r) = U(r) \Theta(r_c - r)

Both potential and force are discontinuous at the cutoff.

Example:

potential = potential:truncate({"sharp", cutoff = 4})

shifted

Amend the sharp truncation by an energy shift such that the potential is continuous at the cutoff distance r_c:

\tilde U(r) = [U(r) - U(r_c)] \Theta(r_c - r)

The force is not affected by this and remains discontinuous at the cutoff.

Example:

potential = potential:truncate({"shifted", cutoff = 2.5})

force_shifted

Amend the energy-shifted potential by a linear term, effectively shifting the force to zero at the cutoff distance r_c:

\tilde U(r) = [U(r) - U(r_c) - (r - r_c) U'(r_c)] \Theta(r_c - r)

Both energy and force are continuous at the cutoff. Note that this modification globally tilts the potential with possible physical implications for, e.g., phase diagrams.

Example:

potential = potential:truncate({"force_shifted", cutoff = 2.5})

smooth_r4

Truncate the potential U(r) such that it remains a C²-continuous function at the cutoff, i.e., the force being continuously differentiable. As a consequence, momentum and energy drift are drastically diminished even from long runs using symplectic integrators such as halmd.mdsim.integrators.verlet.

The truncation is implemented by multiplication of the energy-shifted potential with the local smoothing function

g(\xi) = \frac{\xi^4}{1 + \xi^4}, \qquad \xi = \frac{r - r_c}{h} \,,

where r_c is the cutoff distance, and the parameter h \ll \sigma, which has the dimension of a length, controls the the range of smoothing. The C²-continuous truncated potential then reads

\tilde U(r) = [U(r) - U(r_c)] \, g\left(\frac{r - r_c}{h}\right) \Theta(r_c - r),

and the C¹-continuous force is

\lvert\tilde{\vec{F}}\left(\vec{r}\right)\rvert =
  \lvert\vec{F}\left(\vec{r}\right)\rvert g\left(\frac{r - r_c}{h}\right)
  - \frac{1}{h} U\left(r\right) g^\prime\left(\frac{r - r_c}{h}\right)
  \Theta(r_c - r)

with the derivative of the smoothing function g^\prime(\xi) = 4 \xi^3 \bigl(1 + \xi^4\bigr)^{-2}.

Example:

potential = potential:truncate({"smooth_r4", cutoff = 2.5, h = 0.005})

The following figure shows unmodified and C²-smooth variants of the Weeks-Chandler-Andersen potential, the repulsive part of the Lennard-Jones potential sharply cutoff at r_c = \sqrt[6]{2}.

(Source code, png, hires.png, pdf)

../../../../../_images/truncate-1.png

The following figure shows the absolute value of the force.

(Source code, png, hires.png, pdf)

../../../../../_images/truncate-2.png