Planar wall potential

This module implements the external potential for a collection of planar walls.

Position vector \({\vec R}_i\) of the wall \(i\) is given by \({\hat n_i} \cdot {{\vec R}_i} = r_{0,i}\) , where \({\hat n} = {\vec n} / {|\vec n|}\) is the normalized outward normal vector to the wall surface. \(d_i= ({\vec r}_i \cdot \hat{n}_i - r_{0,i})\) is the distance of a particle, at position \({\vec r}\), from the wall \(i\).

\[U\left(d_i \right) = \varepsilon_i^\alpha \left( \frac{2}{15} \left(\frac{\sigma_i^\alpha}{d_i} \right)^9 - w_i^\alpha \left(\frac{\sigma_i^\alpha}{d_i} \right)^3 \right)\]

is the interaction energy of a particle of species \(\alpha\) due to the wall \(i\). While computing \(U\left(d_i \right)\) we always make \(d_i\) positive.

The potential is truncated at a cutoff distance \(r_c\) and further transformed to a \(C^2\) continuous function using halmd.mdsim.forces.pair_trunc.

The parameters \(\varepsilon\), \(\sigma\), \(w\) and \(r_c\) depend on both the wall and the species. For example, \(\varepsilon[i][\alpha]\) contains \(\varepsilon_i^\alpha\), where indices \(i\), \(\alpha\) run over the wall and species respectively.

class halmd.mdsim.potentials.external.planar_wall(args)

Construct the planar wall module.

Parameters:
  • args (table) – keyword arguments.

  • args.offset (table) – positions of the walls \(r_{0,i}\) in MD units.

  • args.surface_normal (number) – outward normal vectors to the wall surfaces \(\vec n\) in MD units.

  • args.epsilon (matrix) – interaction strengths \(\varepsilon_i^\alpha\) in MD units.

  • args.sigma (matrix) – interaction ranges \(\sigma_i^\alpha\) in MD units.

  • args.wetting (matrix) – wetting parameters \(w_i^\alpha\) in MD units.

  • args.cutoff (matrix) – cutoff distances \(r_{c,i}^\alpha\) in MD units.

  • args.smoothing (number) – smoothing parameter \(h\) for the \(C^2\) continuous truncation in MD units.

  • args.species (number) – number of particle species (optional)

  • args.memory (string) – select memory location (optional).

  • args.label (string) – instance label (optional).

If all elements of a parameter sequence are equal, a single value may be passed instead. In this case, species must be specified. If the argument species is omitted, it is inferred from the length of the parameter sequences.

The supported values for memory are “host” and “gpu”. If memory is not specified, the memory location is selected according to the compute device.

offset

Sequence with the wall position \(r_{0,i}\).

surface_normal

Sequence with outward normal vector to the wall surface \(\vec {n}_i\).

epsilon

Sequence with interaction strength \(\varepsilon_i^\alpha\).

sigma

Sequence with interaction range \(\sigma_i^\alpha\).

wetting

Sequence with wetting parameter \(w_i^\alpha\).

cutoff

Sequence with cutoff distances \(r_{c,i}^\alpha\).

smoothing

Sequence with smoothing parameter \(h\) for the \(C^2\) continuous truncation.

description

Name of potential for profiler.

memory

Device where the particle memory resides.