Local r⁴ smoothing

When passed to halmd.mdsim.forces.pair_trunc, this function transforms the potential V(r) into a C²-continuous function, and the force into a C¹-continuous function. The degree of smoothing is controlled with a dimensionless parameter. Before smoothing the potential is shifted to V(r_c)=0 by the force module.

The smoothing function is

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

with smoothing parameter h \ll 1 and cutoff distance r_c, and its derivative

g^\prime\left(\xi\right) = 4 \frac{\xi^3}{\left(1 + \xi^4\right)^2}.

The C²-continuous potential is

V_{C^2}\left(r\right) = V\left(r\right) g\left(\frac{r - r_c}{h r_c}\right),

and the C¹-continuous force is

\lvert\vec{F}_{C^1}\left(\vec{r}\right)\rvert =
  \lvert\vec{F}\left(\vec{r}\right)\rvert g\left(\frac{r - r_c}{h r_c}\right)
  - \frac{1}{h r_c} V\left(r\right) g^\prime\left(\frac{r - r_c}{h r_c}\right).

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

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

../../../../_images/local_r4-1.png

The following figure shows the absolute value of the force.

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

../../../../_images/local_r4-2.png
class halmd.mdsim.forces.trunc.local_r4(args)

Construct smoothing function.

Parameters:
  • args (table) – keyword arguments
  • args.h (number) – smoothing parameter
h

Smoothing parameter.

log(logger)

Output smoothing parameter to logger.

Parameters:logger – instance of halmd.io.log.logger