Local r⁴ smoothing¶
When passed to halmd.mdsim.forces.pair_trunc, this function
transforms the potential 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
by the force module.
The smoothing function is
with smoothing parameter and cutoff distance
,
and its derivative
The C²-continuous potential is
and the C¹-continuous force is
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 .
(Source code, png, hires.png, pdf)

The following figure shows the absolute value of the force.
(Source code, png, hires.png, pdf)

- 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